Closed mnebuerquo closed 5 years ago
You should hint return value as subclass of aptstar.types.Type. schema can handle that, but it still not renderred correctly for docs page.
@tomchristie
Closing this off given that 0.6 is moving to a framework-agnostic suite of API tools, and will no longer include the server. See https://discuss.apistar.org/t/api-star-as-a-framework-independant-tool/614 and #624.
Maybe this is a documentation issue, or maybe it's something I'm missing. I created a sample api, and was trying out the swagger with it. It seems to work nicely except I'm not getting the responses to show up in the swagger page. I think this is because there isn't a responses section in the schema for each api endpoint.
Here's a link to my example api: https://github.com/mnebuerquo/apistar-example
To see it in action, just git clone, then
docker-compose up
. There are links in the readme for the pages you can test.Here is one of my route handlers:
The swagger shows the argument
gameid
as a string, thanks to the annotation. The response should be indicated with the dict argument, but it does not generate anything in the responses section in the schema.