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

Schema for error response #276

Open
TetianaPerinha opened this issue Apr 18, 2024 · 2 comments
Open

Schema for error response #276

TetianaPerinha opened this issue Apr 18, 2024 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers medium priority Medium priority issue

Comments

@TetianaPerinha
Copy link
Collaborator

ACTUAL:

Some API return JSON like `

{message: "error text",...}

, and some like

{error: "error text",...}

EXPECTED:

The same schema for all the endpoints and for any errors status (4xx).
Use this

{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"message": {
"type": "string"
},
"httpStatusCode": {
"type": "integer"
},
"timestamp": {
"type": "string"
}
},
"required": [
"message",
"httpStatusCode",
"timestamp"
]

@TetianaPerinha TetianaPerinha added bug Something isn't working good first issue Good for newcomers medium priority Medium priority issue labels Apr 18, 2024
@annstriganova
Copy link
Contributor

annstriganova commented May 18, 2024

@anmol797
Copy link

anmol797 commented Jun 30, 2024

Hi , can i help here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers medium priority Medium priority issue
Projects
None yet
Development

No branches or pull requests

3 participants