You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
There is an issue with the OpenAPI generation in Pode where GET operations are incorrectly allowing the inclusion of a Request Body. According to the OpenAPI Specification, GET operations should not have a request body, but Pode currently does not enforce this restriction.
Steps to Reproduce:
Define a route in Pode with a GET operation that includes a request body.
Generate the OpenAPI documentation for the route.
Observe that the generated documentation includes a request body for the GET operation.
Expected Behavior:
The OpenAPI generation should not include a request body for GET operations as per the OpenAPI Specification.
Actual Behavior:
The generated OpenAPI documentation includes a request body for GET operations.
Example:
Add-PodeRoute-PassThru -Method Get -Path '/pet'-ScriptBlock {
# code here
} |Set-PodeOARouteInfo-Summary 'Add a new pet to the store'-Description 'Add a new pet to the store'-Tags 'pet'-OperationId 'addPet'-PassThru |Set-PodeOARequest-RequestBody (New-PodeOARequestBody-Description 'Create a new pet in the store'-Required -Content (
New-PodeOAContentMediaType-MediaType 'application/json','application/xml'-Content 'Pet'
)) -PassThru |Add-PodeOAResponse-StatusCode 200-Description 'Successful operation'-Content (New-PodeOAContentMediaType-MediaType 'application/json','application/xml'-Content 'Pet') -PassThru |Add-PodeOAResponse-StatusCode 405-Description 'Invalid input'
Additional Context:
The OpenAPI Specification (OAS3) clearly states that a request body is not supported in GET operations. This needs to be enforced in the OpenAPI generation within Pode to ensure compliance with the specification.
Description:
There is an issue with the OpenAPI generation in Pode where GET operations are incorrectly allowing the inclusion of a Request Body. According to the OpenAPI Specification, GET operations should not have a request body, but Pode currently does not enforce this restriction.
Steps to Reproduce:
Expected Behavior:
The OpenAPI generation should not include a request body for GET operations as per the OpenAPI Specification.
Actual Behavior:
The generated OpenAPI documentation includes a request body for GET operations.
Example:
Additional Context:
The OpenAPI Specification (OAS3) clearly states that a request body is not supported in GET operations. This needs to be enforced in the OpenAPI generation within Pode to ensure compliance with the specification.
References:
GET
operation section which states that a request body is not supported.)The text was updated successfully, but these errors were encountered: