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

Adding json input/output support to openapi v2 #34

Merged
merged 1 commit into from
Aug 10, 2019

Conversation

brockhaywood
Copy link
Contributor

@brockhaywood brockhaywood commented Jan 4, 2019

Borrows heavily from #20

Copy link
Member

@ikalnytskyi ikalnytskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @brockhaywood! Thank you for your patch and sorry for ignoring your PR for so long.

@@ -65,9 +73,98 @@ def _httpresource(endpoint, method, properties):
for line in header['description'].splitlines():
yield '{indent}{indent}{line}'.format(**locals())

for status, response in responses.items():
if not is_2xx_response(status):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why non-2xx are ignored? All other responses pretty often have the schema too, so why ignore them?

yield '{indent}:status {status}:'.format(**locals())
for line in response['description'].splitlines():
for line in response.get('description', '').splitlines():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have you changed __getitem__ to .get here? According to OpenAPI v2 spec (link), description is required attribute of response object.

@ikalnytskyi
Copy link
Member

I applied some inline changes and did rebasing. Thanks!

@ikalnytskyi ikalnytskyi merged commit 38bbd15 into sphinx-contrib:master Aug 10, 2019
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.

None yet

2 participants