aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc
diff options
context:
space:
mode:
Diffstat (limited to 'support/doc')
-rw-r--r--support/doc/api/openapi.yaml19
1 files changed, 16 insertions, 3 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index 7316b0b58..1a0822c8f 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -39,12 +39,25 @@ info:
39 39
40 The API uses standard HTTP status codes to indicate the success or failure 40 The API uses standard HTTP status codes to indicate the success or failure
41 of the API call. The body of the response will be JSON in the following 41 of the API call. The body of the response will be JSON in the following
42 format. 42 formats.
43 43
44 ``` 44 ```
45 { 45 {
46 "code": "unauthorized_request", // example inner error code 46 "error": "Account not found" // error debug message
47 "error": "Token is invalid." // example exposed error message 47 }
48 ```
49
50 Some errors benefit from a more detailed message:
51 ```
52 {
53 "errors": {
54 "id": { // where 'id' is the name of the parameter concerned by the error.
55 "value": "a117eb-c6a9-4756-bb09-2a956239f", // value that triggered the error.
56 "msg": "Should have an valid id", // error debug message
57 "param": "id",
58 "location": "params" // 'params', 'body', 'header', 'query' or 'cookies'
59 }
60 }
48 } 61 }
49 ``` 62 ```
50 63