Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using both produces and response #207

Merged

Conversation

denisovkv
Copy link
Contributor

Closes #187

@artcg
Copy link
Contributor

artcg commented Mar 13, 2021

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

@denisovkv
Copy link
Contributor Author

@artcg forgot to push, thank you :)

artcg
artcg previously approved these changes Mar 13, 2021
@denisovkv denisovkv changed the title Feature/using both produces and response Using both produces and response Mar 13, 2021
@ahopkins
Copy link
Member

@denisovkv Can you take a look at this conflict?

@denisovkv
Copy link
Contributor Author

@ahopkins Done

@ahopkins ahopkins merged commit 9cd6d76 into sanic-org:master Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Support content_type when using doc.response() and respect doc.produces() when using both
3 participants