[
https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497656#comment-13497656
]
Scott Gray commented on OFBIZ-4274:
-----------------------------------
I've only looked at rest-conf.xml at this stage but the following issues come
to mind:
1. No support for sub-resources e.g. GET: /parties/10000/contactmechs/ While
this could also be possible using contactmechs?partyId=10000, I don't think we
should restrict APIs to a non-hierarchical structure.
2. I think it might be better to structure the document by resource with child
elements for methods e.g.
{code:xml}
<resource name="example">
<post>
<security https="true" auth="true"/>
<invoke-service name="createExample">
<!--
The servlet will convert trailing path elements into a List, so they can
be queried by code.
-->
<service-param name="exampleId" value="${pathElements[0]}"/>
</invoke-service>
<response-hyperlink resource="exampleItem"/>
<response-hyperlink url="http://www.mydomain.com"/>
</post>
<!-- Updates (or creates) an Example -->
<put>
<security https="true" auth="true"/>
<invoke-service name="updateExample">
<service-param name="exampleId" value="${pathElements[0]}"/>
</invoke-service>
<response-hyperlink resource="exampleItem"/>
</put>
</resource>
{code}
3. I think we're also missing the distinction between collection and instance
methods whereby GET: /party/ and GET:/party/10000 access different services and
return different results.
That's all that comes to mind right now.
> Implement a REST Servlet
> ------------------------
>
> Key: OFBIZ-4274
> URL: https://issues.apache.org/jira/browse/OFBIZ-4274
> Project: OFBiz
> Issue Type: New Feature
> Components: framework
> Reporter: Adrian Crum
> Priority: Minor
> Attachments: rest-conf.xml, RestExampleSchema.xsd,
> RestXmlRepresentation.xml
>
>
> Implement a REST servlet that will map REST requests to OFBiz services.
> Details are in the comments.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira