Replies: 2 comments
-
Hi @MCR2019 this makes sense, FastAPI supports it this way, so we could work on adding support in Powertools too. I'm converting this to a Feature Request ticket! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Closing in favour of #3542 |
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
-
Really excited about the quite new powertools openAPI spec generation so thank to all those who've worked on it and those working on it now :)
I'm trying to get it working for an endpoint and following the documentation on how to specify responses here:
Customizing API Operations docs
Specifically I'd like to add custom reponses which the documentation shows as:
I'd really like to be able to specify the content/schema of the response, maybe as a Pydantic Model which would then generate the response schema in the openAPI spec. (in the same way that the function response type is used).
At the moment I'm only able to get it to work with a basic string which doesn't represent the actual return type/structure.
Is there any more info on what the intention is for how this should be used with a fuller example?
I'm aware that this functionality is quite new so I'm not sure if this is something already on the to do list?
Any info would be great, and thanks again!
Beta Was this translation helpful? Give feedback.
All reactions