-
Notifications
You must be signed in to change notification settings - Fork 410
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: Examples should serialize under parameters when using Path parameters #5587
Comments
In FastAPI, the example definitions for JSON Schema and OpenAPI are handled separately. openapi_examples: Optional[Dict[str, Example]] = None https://fastapi.tiangolo.com/tutorial/schema-extra-example/#using-the-openapi_examples-parameter https://github.com/fastapi/fastapi/blob/0.115.5/fastapi/params.py#L69 |
Adding this item to work in the next iteration starting next week. |
I have a PR to fix this issue and will merge it next week. |
|
This is now released under 3.7.0 version! |
Expected Behaviour
Original report: https://github.com/aws-powertools/powertools-lambda-python/pull/5575/files#r1846670069
The
examples
should be underparameters
, not underschema
.https://swagger.io/specification/#parameter-object
I was not able to change the output location of the
examples
. In this PR, it will only enable the definition ofexamples
in the Schema Object.https://swagger.io/specification/#schema-object
wrong
expected
Current Behaviour
This is being serialized under schema and not showing in SwaggerUI.
Code snippet
Possible Solution
No response
Steps to Reproduce
Run the code above
Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.13
Packaging format used
Lambda Layers, PyPi
Debugging logs
The text was updated successfully, but these errors were encountered: