-
Notifications
You must be signed in to change notification settings - Fork 409
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
Bug: openAPI json spec generation - path tags validation failure - property type must be string #3520
Comments
Looking at this one now |
Thank you for confirming the bug and for taking the initiative to open this bug report. It's great to know that operation tags should be a simple list of strings, and your effort in addressing this issue is truly appreciated. I'm working right now on the fix. |
|
This is now released under 2.30.2 version! |
Thank you! |
Expected Behaviour
When generating the openAPI json schema using
get_openapi_json_schema()
and specifying path tags, the produced schema should validate against OAS 3.0.0 or 3.1.0 and path tags should be an array of strings.OAS3.1.0
' operation:
$comment: https://spec.openapis.org/oas/v3.1.0#operation-object
type: object
properties:
tags:
type: array
items:
type: string'
Current Behaviour
When generating the openAPI json schema using
get_openapi_json_schema()
and specifying path tags, the produced schema raises a validation error against OAS 3.0.0 or 3.1.0 with the following error:property type must be string
Code snippet
Possible Solution
No response
Steps to Reproduce
"paths": { "/example-resource": { "put": { "tags": [ { "name": "Examples" } ], "summary": "PUT /example-resource",
Which is not correct as OAS 3.1.0 (and 3.0.0) (OAS3.1.0) specify an array of strings:
operation: $comment: https://spec.openapis.org/oas/v3.1.0#operation-object type: object properties: tags: type: array items: type: string
Powertools for AWS Lambda (Python) version
2.30.1
AWS Lambda function runtime
3.10
Packaging format used
PyPi
Debugging logs
No response
The text was updated successfully, but these errors were encountered: