-
Notifications
You must be signed in to change notification settings - Fork 408
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
Feature request: openAPI - support for top level tags metadata #3533
Comments
Looking at this now |
I am classifying this issue as a feature request instead of a bug and assigning it to @rubenfonseca. |
Hi @MCR2019 thank you for opening this issue. It seems our top level OpenAPI object is only supporting strings at the moment. Please notice that according to the spec, tags in Operations are just lists of strings. The only place where a Tag is an object with additional fields is on the top level OpenAPI object: from aws_lambda_powertools.event_handler import APIGatewayRestResolver
from aws_lambda_powertools.event_handler.openapi.models import ExternalDocumentation, Tag
app = APIGatewayRestResolver(enable_validation=True)
@app.put("/example-resource", tags=["Example Tag"])
def put():
pass
if __name__ == "__main__":
print(
app.get_openapi_json_schema(
tags=[
Tag(
name="Example",
description="This is a description",
externalDocs=ExternalDocumentation(url="https://example.org", description="Example website"),
)
]
)
) I'll be working on adding support for this. |
|
This is now released under 2.31.0 version! |
Expected Behaviour
tag objects should support optional metadata such as
description
andexternalDocs
as in the openAPI spec: OAS(just adding the description would be great)
Current Behaviour
Currently only the required tag name is supported.
Code snippet
Possible Solution
No response
Steps to Reproduce
Powertools for AWS Lambda (Python) version
2.30.2
AWS Lambda function runtime
3.10
Packaging format used
PyPi
Debugging logs
No response
The text was updated successfully, but these errors were encountered: