-
Notifications
You must be signed in to change notification settings - Fork 45
/
incorrect-error-response.json
45 lines (45 loc) · 1.38 KB
/
incorrect-error-response.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
"swagger": "2.0",
"info": {
"title": "Incorrect Returned Error Model",
"description": "Test to see when throwing an HttpResponseError whether we swallow error model deserialization errors",
"version": "1.0.0"
},
"host": "localhost:3000",
"schemes": ["http"],
"produces": ["text/html"],
"consumes": ["application/json"],
"paths": {
"/incorrectError": {
"get": {
"operationId": "getIncorrectErrorFromServer",
"description": "Get an error response from the server that is not as described in our Error object. Want to swallow the deserialization error and still return an HttpResponseError to the users.",
"responses": {
"200": {
"description": "We will only return an error, so should expect a call to this service to fail."
},
"default": {
"description": "Error response from server. Will not abide by the defined Error model. Want to swallow the deserialization error and still return the overall HttpResponseError to users.",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
}
},
"definitions": {
"Error": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}