Sunagatov / Iced-Latte

a online Marketplace for coffee retail (Backend)
https://iced-latte.uk
MIT License
588 stars 96 forks source link

Schema for error response #276

Open TetianaPerinha opened 2 months ago

TetianaPerinha commented 2 months ago

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" ]

annstriganova commented 1 month ago

Link to the expected schema https://github.com/Sunagatov/Iced-Latte/blob/development/src/test/resources/security/model/schema/security-schema-failed.json

anmol797 commented 2 days ago

Hi , can i help here