Open kalaiyarasiganeshalingam opened 11 months ago
In Ballerina there is a restriction not allowing request-body for an HTTP GET request. But, in the OpenAPI specification there is no restriction for this and hence, there can be OpenAPI specifications which contains a requestBody
definition for HTTP GET endpoints. In such cases the developer has to manually edit the OpenAPI spec and remove requestBody
definition from the relevant endpoints and continue the code-generation.
But since not-allowing a request-body for an HTTP GET is a Ballerina level restriction we should provide a better experience in such cases rather than stopping the code-generation.
An example OpenAPI spec can be found here [1]
[1] - https://github.com/stripe/openapi/blob/master/openapi/spec3.json
Description: Task: https://github.com/ballerina-platform/ballerina-standard-library/issues/4952
Some Microsoft Excel
get
APIs have a request body. Eg: https://learn.microsoft.com/en-us/graph/api/range-boundingrect?view=graph-rest-1.0OpenAPI Spec for the above API:
Getting this error when converting this spec to Ballerina: