Closed artcg closed 3 years ago
Awesome feature! Suppose it should support every eligible yaml not only simple struct with one response and description as in example, am I right?
Yep, could be anything in the path operation spec :)
Looks good for me
Closes https://github.com/sanic-org/sanic-openapi/issues/203
I decided to go with an approach where the user can specify their own yaml instead of going with a more complex parsing approach.
This has the upsides:
this has the downside:
Implementation notes:
For the future:
Somebody could add functools.wraps to the doc decorators if they would like to use them in conjunction with the docstring
I am not using those decorators so didnt look into that, actually the main point I wanted this feature was to avoid having to use the decorators
Heres a usage example: https://i.imgur.com/ViynuNY.png https://i.imgur.com/oORSqRa.png
Feedback welcome, tagging people who could be interested @denisovkv @ruckc @ioggstream