Skip to content

Commit 4734fe7

Browse files
author
Ole Lensmar
committed
added sample responses.json
1 parent 966b067 commit 4734fe7

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed

guidelines/sample-server/files/models.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,23 @@
8181
"format": "double"
8282
}
8383
}
84+
},
85+
"ErrorMessage": {
86+
"description": "A shared model for error message",
87+
"required" : ["error-code","reason"],
88+
"properties": {
89+
"error-code": {
90+
"type": "integer",
91+
"format": "int64"
92+
},
93+
"reason": {
94+
"description": "the reason for this error",
95+
"type": "string"
96+
},
97+
"description": {
98+
"description": "an optional longer description of this error message",
99+
"type": "string"
100+
}
101+
}
84102
}
85103
}

guidelines/sample-server/files/operations.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@
1616
"schema": {
1717
"$ref": "http://localhost:8000/models.json#/Health"
1818
}
19+
},
20+
"404": {
21+
"$ref": "http://localhost:8000/responses.json#/NotFoundError"
1922
}
2023
}
2124
}
2225
}
2326
}
27+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"NotFoundError": {
3+
"description": "Entity not found",
4+
"schema": {
5+
"$ref": "http://localhost:8080/models.json#/ErrorMessage"
6+
}
7+
}
8+
}

guidelines/sample-server/files/swagger.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
"$ref": "http://localhost:8000/models.json#/Health"
3737
}
3838
}
39+
},
40+
"404": {
41+
"$ref": "http://localhost:8000/responses.json#/NotFoundError"
3942
}
4043
}
4144
}

0 commit comments

Comments
 (0)