Skip to content

Describing conditions that will cause an error response #166

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

Closed
mohsen1 opened this issue Oct 20, 2014 · 3 comments
Closed

Describing conditions that will cause an error response #166

mohsen1 opened this issue Oct 20, 2014 · 3 comments

Comments

@mohsen1
Copy link
Contributor

mohsen1 commented Oct 20, 2014

This is for Swagger.next

With Swagger we can define error responses but there is no way to describe what will cause an error response. Things like auth, missing or invalid parameter can easily described in the specs. Should we have a way for such description in Swagger?

@mohsen1
Copy link
Contributor Author

mohsen1 commented Oct 20, 2014

This will lead to better tooling for tests. If we describe how you can get an error, tooling can use that and test different responses

@webron
Copy link
Member

webron commented Oct 21, 2014

Wouldn't that just be part of the "description" of the response?
https://github.com/wordnik/swagger-spec/blob/master/versions/2.0.md#responseDescription

@jharmn
Copy link
Contributor

jharmn commented Feb 5, 2016

FWIW, this could also be defined by specifying HTTP status codes which occur for the given errors (401/403 for auth, 400 for validation errors etc).

#236 seems to address the perceived need for more error-specific handling of responses, let's look at it from that perspective.

@jharmn jharmn closed this as completed Feb 5, 2016
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

No branches or pull requests

3 participants