Hello Everyone,
We want to make this formal with proper community consensus and I will try to keep this short. In [1] Mathieu Lirzin is providing some (in my opinion) good work on converting the Control Servlet logic to be able to handle the different HTTP methods (GET, POST, etc ...) The purpose of the work in this JIRA is simple. You should be able to call a request with a different HTTP methods by using a format like <request-map uri="ping" method="post">. You can find a more detailed discussion in [2]. This is the first step of a multi-step process to be able to integrate REST API with OFBiz. So, this is a proposal to apply the following: 1- Enhance the controller to be able to accommodate one-or-more HTTP methods (method="GET,POST") 2- Enhance the controller to further be able to get "patterns" that can be mapped to REST APIs. So a request like https://host/control/request/customer/orders/1/orderName can be processed as a resource Please correct me if I was wrong on anything written here Mathieu, and please everyone provide your feedback if you approve of moving forward with this initiative. [1] https://issues.apache.org/jira/browse/OFBIZ-10438 [2] https://s.apache.org/ec2r |
Thanks Taher for the great proposal!
+1. I tested Swagger OpenAPI editor[1], both 2.0 and 3.0.n regulations support multiple methods for one uri/path, here is my test code (yaml format): openapi: "3.0.1" info: title: OFBiz OpenAPI Test description: OFBiz OpenAPI Test version: 1.0.0 tags: - name: "pet" description: "Everything about your Pets" externalDocs: description: "Find out more" url: "http://swagger.io" paths: /webtools/control/pet: get: tags: - "pet" summary: "Add a new pet to the store" description: "" operationId: "addPet" parameters: - in: "query" name: "body" description: "Pet object that needs to be added to the store" required: true schema: $ref: "#/components/schemas/Pet" responses: 405: description: "Invalid input" post: tags: - "pet" summary: "Update an existing pet" description: "" operationId: "updatePet" parameters: - in: "query" name: "body" description: "Pet object that needs to be added to the store" required: true schema: $ref: "#/components/schemas/Pet" responses: 400: description: "Invalid ID supplied" 404: description: "Pet not found" 405: description: "Validation exception" components: schemas: Category: type: "object" properties: id: type: "integer" format: "int64" name: type: "string" xml: name: "Category" Tag: type: "object" properties: id: type: "integer" format: "int64" name: type: "string" xml: name: "Tag" Pet: type: "object" required: - "name" - "photoUrls" properties: id: type: "integer" format: "int64" category: $ref: "#/components/schemas/Category" name: type: "string" example: "doggie" photoUrls: type: "array" xml: name: "photoUrl" wrapped: true items: type: "string" tags: type: "array" xml: name: "tag" wrapped: true items: $ref: "#/components/schemas/Tag" status: type: "string" description: "pet status in the store" enum: - "available" - "pending" - "sold" xml: name: "Pet" externalDocs: description: "Find out more about Swagger" url: "http://swagger.io" Kind Regards, Shi Jinghai [1] https://editor.swagger.io/ -----邮件原件----- 发件人: Taher Alkhateeb [mailto:[hidden email]] 发送时间: 2018年8月9日 23:31 收件人: OFBIZ Development Mailing List 主题: [Proposal] Enhance the controller logic to accommodate HTTP methods and prepare for REST Hello Everyone, We want to make this formal with proper community consensus and I will try to keep this short. In [1] Mathieu Lirzin is providing some (in my opinion) good work on converting the Control Servlet logic to be able to handle the different HTTP methods (GET, POST, etc ...) The purpose of the work in this JIRA is simple. You should be able to call a request with a different HTTP methods by using a format like <request-map uri="ping" method="post">. You can find a more detailed discussion in [2]. This is the first step of a multi-step process to be able to integrate REST API with OFBiz. So, this is a proposal to apply the following: 1- Enhance the controller to be able to accommodate one-or-more HTTP methods (method="GET,POST") 2- Enhance the controller to further be able to get "patterns" that can be mapped to REST APIs. So a request like https://host/control/request/customer/orders/1/orderName can be processed as a resource Please correct me if I was wrong on anything written here Mathieu, and please everyone provide your feedback if you approve of moving forward with this initiative. [1] https://issues.apache.org/jira/browse/OFBIZ-10438 [2] https://s.apache.org/ec2r |
Well, I guess Shi rushed another commit without a proper review. And
now we have a bug reported in [1]. The strange thing is that Shi suggested he's no longer interested in this work! [1] https://lists.apache.org/thread.html/9f669ab211ca47282a5d2b0640d9ec08a683c6883aae31b836746124@%3Cdev.ofbiz.apache.org%3E On Fri, Aug 10, 2018 at 10:51 AM Shi Jinghai <[hidden email]> wrote: > > Thanks Taher for the great proposal! > > +1. > > I tested Swagger OpenAPI editor[1], both 2.0 and 3.0.n regulations support multiple methods for one uri/path, here is my test code (yaml format): > > openapi: "3.0.1" > info: > title: OFBiz OpenAPI Test > description: OFBiz OpenAPI Test > version: 1.0.0 > > tags: > - name: "pet" > description: "Everything about your Pets" > externalDocs: > description: "Find out more" > url: "http://swagger.io" > > paths: > /webtools/control/pet: > get: > tags: > - "pet" > summary: "Add a new pet to the store" > description: "" > operationId: "addPet" > parameters: > - in: "query" > name: "body" > description: "Pet object that needs to be added to the store" > required: true > schema: > $ref: "#/components/schemas/Pet" > responses: > 405: > description: "Invalid input" > post: > tags: > - "pet" > summary: "Update an existing pet" > description: "" > operationId: "updatePet" > parameters: > - in: "query" > name: "body" > description: "Pet object that needs to be added to the store" > required: true > schema: > $ref: "#/components/schemas/Pet" > responses: > 400: > description: "Invalid ID supplied" > 404: > description: "Pet not found" > 405: > description: "Validation exception" > > components: > schemas: > Category: > type: "object" > properties: > id: > type: "integer" > format: "int64" > name: > type: "string" > xml: > name: "Category" > Tag: > type: "object" > properties: > id: > type: "integer" > format: "int64" > name: > type: "string" > xml: > name: "Tag" > Pet: > type: "object" > required: > - "name" > - "photoUrls" > properties: > id: > type: "integer" > format: "int64" > category: > $ref: "#/components/schemas/Category" > name: > type: "string" > example: "doggie" > photoUrls: > type: "array" > xml: > name: "photoUrl" > wrapped: true > items: > type: "string" > tags: > type: "array" > xml: > name: "tag" > wrapped: true > items: > $ref: "#/components/schemas/Tag" > status: > type: "string" > description: "pet status in the store" > enum: > - "available" > - "pending" > - "sold" > xml: > name: "Pet" > externalDocs: > description: "Find out more about Swagger" > url: "http://swagger.io" > > Kind Regards, > > Shi Jinghai > > [1] https://editor.swagger.io/ > > -----邮件原件----- > 发件人: Taher Alkhateeb [mailto:[hidden email]] > 发送时间: 2018年8月9日 23:31 > 收件人: OFBIZ Development Mailing List > 主题: [Proposal] Enhance the controller logic to accommodate HTTP methods and prepare for REST > > Hello Everyone, > > We want to make this formal with proper community consensus and I will > try to keep this short. > > In [1] Mathieu Lirzin is providing some (in my opinion) good work on > converting the Control Servlet logic to be able to handle the > different HTTP methods (GET, POST, etc ...) The purpose of the work in > this JIRA is simple. You should be able to call a request with a > different HTTP methods by using a format like <request-map uri="ping" > method="post">. You can find a more detailed discussion in [2]. This > is the first step of a multi-step process to be able to integrate REST > API with OFBiz. > > So, this is a proposal to apply the following: > 1- Enhance the controller to be able to accommodate one-or-more HTTP > methods (method="GET,POST") > 2- Enhance the controller to further be able to get "patterns" that > can be mapped to REST APIs. So a request like > https://host/control/request/customer/orders/1/orderName can be > processed as a resource > > Please correct me if I was wrong on anything written here Mathieu, and > please everyone provide your feedback if you approve of moving forward > with this initiative. > > [1] https://issues.apache.org/jira/browse/OFBIZ-10438 > [2] https://s.apache.org/ec2r |
In reply to this post by taher
Thanks Taher!
I noticed this bug report, and I have tested it, I cannot reproduce it in my local and online trunk demo environments. As Rishi Solanki suggested, if it's a bug, please reopen the OFBIZ-10438 or create a new jira. I'm waiting a further feedback from Deepak Nigam or anyone else. Kind Regards, Shi Jinghai -----邮件原件----- 发件人: Taher Alkhateeb [mailto:[hidden email]] 发送时间: 2018年8月20日 2:33 收件人: OFBIZ Development Mailing List 主题: Re: [Proposal] Enhance the controller logic to accommodate HTTP methods and prepare for REST Well, I guess Shi rushed another commit without a proper review. And now we have a bug reported in [1]. The strange thing is that Shi suggested he's no longer interested in this work! [1] https://lists.apache.org/thread.html/9f669ab211ca47282a5d2b0640d9ec08a683c6883aae31b836746124@%3Cdev.ofbiz.apache.org%3E On Fri, Aug 10, 2018 at 10:51 AM Shi Jinghai <[hidden email]> wrote: > > Thanks Taher for the great proposal! > > +1. > > I tested Swagger OpenAPI editor[1], both 2.0 and 3.0.n regulations support multiple methods for one uri/path, here is my test code (yaml format): > > openapi: "3.0.1" > info: > title: OFBiz OpenAPI Test > description: OFBiz OpenAPI Test > version: 1.0.0 > > tags: > - name: "pet" > description: "Everything about your Pets" > externalDocs: > description: "Find out more" > url: "http://swagger.io" > > paths: > /webtools/control/pet: > get: > tags: > - "pet" > summary: "Add a new pet to the store" > description: "" > operationId: "addPet" > parameters: > - in: "query" > name: "body" > description: "Pet object that needs to be added to the store" > required: true > schema: > $ref: "#/components/schemas/Pet" > responses: > 405: > description: "Invalid input" > post: > tags: > - "pet" > summary: "Update an existing pet" > description: "" > operationId: "updatePet" > parameters: > - in: "query" > name: "body" > description: "Pet object that needs to be added to the store" > required: true > schema: > $ref: "#/components/schemas/Pet" > responses: > 400: > description: "Invalid ID supplied" > 404: > description: "Pet not found" > 405: > description: "Validation exception" > > components: > schemas: > Category: > type: "object" > properties: > id: > type: "integer" > format: "int64" > name: > type: "string" > xml: > name: "Category" > Tag: > type: "object" > properties: > id: > type: "integer" > format: "int64" > name: > type: "string" > xml: > name: "Tag" > Pet: > type: "object" > required: > - "name" > - "photoUrls" > properties: > id: > type: "integer" > format: "int64" > category: > $ref: "#/components/schemas/Category" > name: > type: "string" > example: "doggie" > photoUrls: > type: "array" > xml: > name: "photoUrl" > wrapped: true > items: > type: "string" > tags: > type: "array" > xml: > name: "tag" > wrapped: true > items: > $ref: "#/components/schemas/Tag" > status: > type: "string" > description: "pet status in the store" > enum: > - "available" > - "pending" > - "sold" > xml: > name: "Pet" > externalDocs: > description: "Find out more about Swagger" > url: "http://swagger.io" > > Kind Regards, > > Shi Jinghai > > [1] https://editor.swagger.io/ > > -----邮件原件----- > 发件人: Taher Alkhateeb [mailto:[hidden email]] > 发送时间: 2018年8月9日 23:31 > 收件人: OFBIZ Development Mailing List > 主题: [Proposal] Enhance the controller logic to accommodate HTTP methods and prepare for REST > > Hello Everyone, > > We want to make this formal with proper community consensus and I will > try to keep this short. > > In [1] Mathieu Lirzin is providing some (in my opinion) good work on > converting the Control Servlet logic to be able to handle the > different HTTP methods (GET, POST, etc ...) The purpose of the work in > this JIRA is simple. You should be able to call a request with a > different HTTP methods by using a format like <request-map uri="ping" > method="post">. You can find a more detailed discussion in [2]. This > is the first step of a multi-step process to be able to integrate REST > API with OFBiz. > > So, this is a proposal to apply the following: > 1- Enhance the controller to be able to accommodate one-or-more HTTP > methods (method="GET,POST") > 2- Enhance the controller to further be able to get "patterns" that > can be mapped to REST APIs. So a request like > https://host/control/request/customer/orders/1/orderName can be > processed as a resource > > Please correct me if I was wrong on anything written here Mathieu, and > please everyone provide your feedback if you approve of moving forward > with this initiative. > > [1] https://issues.apache.org/jira/browse/OFBIZ-10438 > [2] https://s.apache.org/ec2r |
Administrator
|
In reply to this post by taher
Hi Taher,
Thank you for summarizing. I agree with this proposal After I have applied Mathieu's last OFBIZ-10438 at r1839451, I think we are ready to continue this work Jacques Le 09/08/2018 à 17:31, Taher Alkhateeb a écrit : > Hello Everyone, > > We want to make this formal with proper community consensus and I will > try to keep this short. > > In [1] Mathieu Lirzin is providing some (in my opinion) good work on > converting the Control Servlet logic to be able to handle the > different HTTP methods (GET, POST, etc ...) The purpose of the work in > this JIRA is simple. You should be able to call a request with a > different HTTP methods by using a format like <request-map uri="ping" > method="post">. You can find a more detailed discussion in [2]. This > is the first step of a multi-step process to be able to integrate REST > API with OFBiz. > > So, this is a proposal to apply the following: > 1- Enhance the controller to be able to accommodate one-or-more HTTP > methods (method="GET,POST") > 2- Enhance the controller to further be able to get "patterns" that > can be mapped to REST APIs. So a request like > https://host/control/request/customer/orders/1/orderName can be > processed as a resource > > Please correct me if I was wrong on anything written here Mathieu, and > please everyone provide your feedback if you approve of moving forward > with this initiative. > > [1] https://issues.apache.org/jira/browse/OFBIZ-10438 > [2] https://s.apache.org/ec2r > |
Hi Shi,
Verified the fix by Mathieu on the local machine, the system is working fine now. Thanks & Regards -- Deepak Nigam HotWax Systems Pvt. Ltd. On Wed, Aug 29, 2018 at 11:01 AM Jacques Le Roux < [hidden email]> wrote: > Hi Taher, > > Thank you for summarizing. I agree with this proposal > > After I have applied Mathieu's last OFBIZ-10438 at r1839451, I think we > are ready to continue this work > > Jacques > > Le 09/08/2018 à 17:31, Taher Alkhateeb a écrit : > > Hello Everyone, > > > > We want to make this formal with proper community consensus and I will > > try to keep this short. > > > > In [1] Mathieu Lirzin is providing some (in my opinion) good work on > > converting the Control Servlet logic to be able to handle the > > different HTTP methods (GET, POST, etc ...) The purpose of the work in > > this JIRA is simple. You should be able to call a request with a > > different HTTP methods by using a format like <request-map uri="ping" > > method="post">. You can find a more detailed discussion in [2]. This > > is the first step of a multi-step process to be able to integrate REST > > API with OFBiz. > > > > So, this is a proposal to apply the following: > > 1- Enhance the controller to be able to accommodate one-or-more HTTP > > methods (method="GET,POST") > > 2- Enhance the controller to further be able to get "patterns" that > > can be mapped to REST APIs. So a request like > > https://host/control/request/customer/orders/1/orderName can be > > processed as a resource > > > > Please correct me if I was wrong on anything written here Mathieu, and > > please everyone provide your feedback if you approve of moving forward > > with this initiative. > > > > [1] https://issues.apache.org/jira/browse/OFBIZ-10438 > > [2] https://s.apache.org/ec2r > > > > |
In reply to this post by taher
+1 to move forward.
Julien. Le 09/08/2018 à 17:31, Taher Alkhateeb a écrit : > Hello Everyone, > > We want to make this formal with proper community consensus and I will > try to keep this short. > > In [1] Mathieu Lirzin is providing some (in my opinion) good work on > converting the Control Servlet logic to be able to handle the > different HTTP methods (GET, POST, etc ...) The purpose of the work in > this JIRA is simple. You should be able to call a request with a > different HTTP methods by using a format like <request-map uri="ping" > method="post">. You can find a more detailed discussion in [2]. This > is the first step of a multi-step process to be able to integrate REST > API with OFBiz. > > So, this is a proposal to apply the following: > 1- Enhance the controller to be able to accommodate one-or-more HTTP > methods (method="GET,POST") > 2- Enhance the controller to further be able to get "patterns" that > can be mapped to REST APIs. So a request like > https://host/control/request/customer/orders/1/orderName can be > processed as a resource > > Please correct me if I was wrong on anything written here Mathieu, and > please everyone provide your feedback if you approve of moving forward > with this initiative. > > [1] https://issues.apache.org/jira/browse/OFBIZ-10438 > [2] https://s.apache.org/ec2r > |
Free forum by Nabble | Edit this page |