Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connector with build errors is generated when http:GET operation with request body given. #5482

Closed
aneeshafedo opened this issue Sep 27, 2021 · 1 comment

Comments

@aneeshafedo
Copy link

Description:

Problem

According to OpenAPI specification v3 GET, DELETE and HEAD are no longer allowed to have request body because it does not have defined semantics as per RFC 7231. Not validating the GET request with request body is an issue found in the swagger parser we are using in Ballerina OpenAPI tool.

Issue has added at swagger-api/swagger-parser on this regard.

Suggested solution

Throw an error when GET/DELETE/HEAD operation with request body found.

Steps to reproduce:

Affected Versions:

OS, DB, other environment details and versions:

Related Issues (optional):

Suggested Labels (optional):

Suggested Assignees (optional):

@LakshanSS
Copy link
Member

We can validate during the client code generation and throw a BallerinaOpenApiException.
I will add a fix for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants