sanic-org / sanic-openapi

Easily document your Sanic API with a UI
https://sanic-openapi.readthedocs.io/
MIT License
505 stars 108 forks source link

Using both produces and response #207

Closed denisovkiv closed 3 years ago

denisovkiv commented 3 years ago

Closes #187

artcg commented 3 years ago

Nice job, looks like you can also remove the block of code

if len(route_spec.response) == 0:
                responses["200"] = {
                    "schema": serialize_schema(route_spec.produces.field) if route_spec.produces else None,
                    "description": route_spec.produces.description if route_spec.produces else None,
                }

As the code you wrote replaces that

denisovkiv commented 3 years ago

@artcg forgot to push, thank you :)

ahopkins commented 3 years ago

@denisovkv Can you take a look at this conflict?

denisovkiv commented 3 years ago

@ahopkins Done