|
[ https://issues.apache.org/jira/browse/OFBIZ-11007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Artemiy Rozovyk updated OFBIZ-11007: ------------------------------------ Description: Following the discussion on making OFBiz RESTful OFBIZ-4274 i implemented the support of segmented URIs without interfering with current mechanisms of URI resolution nor with _overrideView()_ feature. Combined with work on associating URIs and HTTP methods done by [~mthl] in OFBIZ-10438 , we are now able to provide RESTful APIs as follows: {code:java} <request-map uri="foo/bar" method="get"> ... <request-map uri="foo/bar/{baz}" method="get"> ... <request-map uri="foo/bar/{baz}" method="post"> ... {code} After we matched a request-map having parametrized URI as in {code:java} uri="foo/bar/{baz}" {code} the value is available inside the request attributes with the corresponding key (here _"baz"_) The *restful_URIs.patch* allows segmented URI support. The *entitymaint_example.patch* is a modified _entitymaint_ part that serves as an example of possible application of new system. Any questions or comments are welcomed. was: Following the discussion on making OFBiz RESTful OFBIZ-4274 i implemented the support of segmented URIs without interfering with current mechanisms of URI resolution nor with _overrideView()_ feature. Combined with work on associating URIs and HTTP methods done by [~mthl] in OFBIZ-10438 , we are now able to provide RESTful APIs as follows: {code:java} <request-map uri="foo/bar" method="get"> ... <request-map uri="foo/bar/{baz}" method="get"> ... <request-map uri="foo/bar/{baz}" method="post"> ... {code} After we matched a request-map having parametrized URI as in {code:java} uri="foo/bar/{baz}" {code} the value is available inside the request attributes with the corresponding key (here _"baz"_) The *restful_URIs.patch* allows segmented URI support. The *entitymaint_example.patch* is a modified _entitymaint_ part that serves as an example of possible application of the new system. Any questions or comments are welcomed. > REST: adding segmented URI support > ---------------------------------- > > Key: OFBIZ-11007 > URL: https://issues.apache.org/jira/browse/OFBIZ-11007 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: Trunk > Environment: > Reporter: Artemiy Rozovyk > Priority: Minor > Labels: URI, rest_api > Fix For: Upcoming Branch > > Attachments: entitymaint_example.patch, restful_URIs.patch > > > Following the discussion on making OFBiz RESTful OFBIZ-4274 i implemented the support of segmented URIs without interfering with current mechanisms of URI resolution nor with _overrideView()_ feature. > Combined with work on associating URIs and HTTP methods done by [~mthl] in OFBIZ-10438 , we are now able to provide RESTful APIs as follows: > {code:java} > <request-map uri="foo/bar" method="get"> > ... > <request-map uri="foo/bar/{baz}" method="get"> > ... > <request-map uri="foo/bar/{baz}" method="post"> > ... > {code} > After we matched a request-map having parametrized URI as in > {code:java} > uri="foo/bar/{baz}" > {code} > the value is available inside the request attributes with the corresponding key (here _"baz"_) > The *restful_URIs.patch* allows segmented URI support. > The *entitymaint_example.patch* is a modified _entitymaint_ part that serves as an example of possible application of new system. > Any questions or comments are welcomed. -- This message was sent by Atlassian JIRA (v7.6.3#76005) |
| Free forum by Nabble | Edit this page |
