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

Include default response schema for error handling #51

Closed
joshbooker opened this issue Jan 12, 2016 · 1 comment
Closed

Include default response schema for error handling #51

joshbooker opened this issue Jan 12, 2016 · 1 comment

Comments

@joshbooker
Copy link

I believe the original code in ODataSwaggerUitlites included a generic default response on every operation which referenced the error schema in definitions section. Somewhere along the line this got lost. It would be great to fix so that every operation gets something like:

    "responses": {
      "200": {...
      },
      "default": {
        "description": "Unexpected error",
        "schema": { "$ref": "#/definitions/_Error" }
      }
    }

And also include schema in the definition section something like:

  "definitions": {
    "_Error": { "properties": { "error": { "$ref": "#/definitions/_InError" } } },
    "_InError": {
      "properties": {
        "code": { "type": "string" },
        "message": { "type": "string" }
      }
    }
  }
@rbeauchamp
Copy link
Owner

Closing this old feature request as it is not important enough for someone to spend the time to implement it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants