You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/06/16 07:36:00 UTC

[jira] [Commented] (OFBIZ-13288) Add support to have multiple rest.xml file per component

    [ https://issues.apache.org/jira/browse/OFBIZ-13288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18089309#comment-18089309 ] 

ASF subversion and git services commented on OFBIZ-13288:
---------------------------------------------------------

Commit 7342acff382e44c80db1f5ac02415caf4e79f281 in ofbiz-framework's branch refs/heads/trunk from Deepak Dixit
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=7342acff38 ]

Added support for multiple rest.xml files per component (#141)

* Added support for multiple rest.xml files per component
(OFBIZ-13288)

- Enhanced loadApiDefinitions to scan and load all rest.xml files from the component's api folder, instead of being restricted to a single file
- Introduced duplicate path handling: when multiple rest.xml files define the same endpoint path, the most recently loaded definition takes precedence
- Added a new path attribute in ModelApi class (with getter/setter methods) to capture the API entry path and improve flexibility in routing
- Refactored OFBizOpenApiReader to build nested URLs using the ModelApi path, ensuring consistency between swagger documentation and runtime endpoints

* Use ServiceNameContextHolder to set the service name in ServiceRequestHandler

* Adds example-product.rest.xml showcasing multiple rest.xml files per component

> Add support to have multiple rest.xml file per component
> --------------------------------------------------------
>
>                 Key: OFBIZ-13288
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13288
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: rest-api
>    Affects Versions: Upcoming Branch
>            Reporter: Deepak Dixit
>            Assignee: Deepak Dixit
>            Priority: Minor
>             Fix For: Upcoming Branch
>
>
> As per the current implementation, only one rest.xml file is allowed per component.
>  
> It would be better to allow multiple rest.xml files per component, as this would let users publish REST endpoints according to different business scenarios.
>  
> Currently, REST endpoints are registered with the component name. We can make this more flexible by allowing users to create multiple rest.xml files



--
This message was sent by Atlassian Jira
(v8.20.10#820010)