Replies: 2 comments 3 replies
-
@MCR2019 Hi! I simplified the problem and implemented it based on the expectation that when I see:
Here is my code. hello_world/app.py
template.yml
Usage
This is endpoint generated swagger doc. Does this answer the question? |
Beta Was this translation helpful? Give feedback.
3 replies
-
I'm closing this discussion as resolved. Please reopen if you need. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
There a good chance that I'm not doing things in the correct way here but interested in other peoples thoughts on the following.
I'm using an
APIGatewayRestResolver
withenable_validation=True
and specifying the return type as aPydantic
model.The
Pydantic
model has aField
where I setalias
as well asserialization_alias
. So the field in the response has the key specified byseriliazation_alias
as I'd expect.Where I generate an openAPI spec though, the response in the schema has the
alias
value.Hopefully this example code make this clearer:
In the above code the response body is:
{"post_town": "test value"}
however in the generated openAPI spec the response schema is:Any help would be great!
Beta Was this translation helpful? Give feedback.
All reactions