File tree Expand file tree Collapse file tree 6 files changed +146
-1
lines changed
guidelines/sample-server/files Expand file tree Collapse file tree 6 files changed +146
-1
lines changed Original file line number Diff line number Diff line change 8
8
"format" : " int64"
9
9
},
10
10
"tag" : {
11
- "description" : " a complex, shared property. Note the absolute reference" ,
12
11
"$ref" : " https://my.company.com/definitions/models.json#/models/Tag"
13
12
}
14
13
}
Original file line number Diff line number Diff line change
1
+ Model :
2
+ type : " object"
3
+ description : " A simple model"
4
+ properties :
5
+ id :
6
+ type : " integer"
7
+ format : " int64"
8
+ tag :
9
+ $ref : " https://my.company.com/definitions/models.yaml#/models/Tag"
10
+ Tag :
11
+ type : " object"
12
+ description : " A tag entity in the system"
13
+ properties :
14
+ name :
15
+ type : " string"
16
+ Health :
17
+ type : " object"
18
+ description : " An object representing the health of a server"
19
+ required :
20
+ - " liveThreadCount"
21
+ - " peakThreadCount"
22
+ - " startedThreadCount"
23
+ - " daemonThreadCount"
24
+ - " jvmMemory"
25
+ properties :
26
+ liveThreadCount :
27
+ type : " integer"
28
+ format : " int32"
29
+ peakThreadCount :
30
+ type : " integer"
31
+ format : " int32"
32
+ startedThreadCount :
33
+ type : " integer"
34
+ format : " int32"
35
+ daemonThreadCount :
36
+ type : " integer"
37
+ format : " int32"
38
+ jvmMemory :
39
+ $ref : " http://localhost:8000/models.yaml#/JVMMemory"
40
+ JVMMemory :
41
+ type : " object"
42
+ required :
43
+ - " allocated"
44
+ - " max"
45
+ - " free"
46
+ - " used"
47
+ - " percentUsed"
48
+ properties :
49
+ allocated :
50
+ type : " integer"
51
+ format : " int64"
52
+ max :
53
+ type : " integer"
54
+ format : " int64"
55
+ free :
56
+ type : " integer"
57
+ format : " int64"
58
+ used :
59
+ type : " integer"
60
+ format : " int64"
61
+ percentUsed :
62
+ type : " number"
63
+ format : " double"
64
+ ErrorMessage :
65
+ type : " object"
66
+ description : " A shared model for error message"
67
+ required :
68
+ - " errorCode"
69
+ - " reason"
70
+ properties :
71
+ errorCode :
72
+ type : " integer"
73
+ format : " int64"
74
+ reason :
75
+ description : " the reason for this error"
76
+ type : " string"
77
+ description :
78
+ description : " an optional longer description of this error message"
79
+ type : " string"
Original file line number Diff line number Diff line change
1
+ health :
2
+ get :
3
+ tags :
4
+ - " admin"
5
+ summary : " Returns server health information"
6
+ operationId : " getHealth"
7
+ produces :
8
+ - " application/json"
9
+ parameters : []
10
+ responses :
11
+ 200 :
12
+ description : " Health information from the server"
13
+ schema :
14
+ $ref : " http://localhost:8000/models.yaml#/Health"
15
+ 404 :
16
+ $ref : " http://localhost:8000/responses.yaml#/NotFoundError"
Original file line number Diff line number Diff line change
1
+ query :
2
+ skip :
3
+ name : " skip"
4
+ in : " query"
5
+ description : " Results to skip when paginating through a result set"
6
+ required : false
7
+ minimum : 0
8
+ type : " integer"
9
+ format : " int32"
10
+ limit :
11
+ name : " limit"
12
+ in : " query"
13
+ description : " Maximum number of results to return"
14
+ required : false
15
+ minimum : 0
16
+ type : " integer"
17
+ format : " int32"
Original file line number Diff line number Diff line change
1
+ NotFoundError :
2
+ description : " Entity not found"
3
+ schema :
4
+ $ref : " http://localhost:8000/models.yaml#/ErrorMessage"
Original file line number Diff line number Diff line change
1
+ swagger : " 2.0"
2
+ info :
3
+ description : " Sample server to demonstrate object reuse"
4
+ version : " 1.0.0"
5
+ title : " Swagger sample"
6
+ paths :
7
+ /health :
8
+ $ref : " http://localhost:8000/operations.yaml#/health"
9
+ /users :
10
+ get :
11
+ tags :
12
+ - " users"
13
+ summary : " Returns users in the system"
14
+ operationId : " getUsers"
15
+ produces :
16
+ - " application/json"
17
+ parameters :
18
+ -
19
+ $ref : " http://localhost:8000/parameters.yaml#/query/skip"
20
+ -
21
+ $ref : " http://localhost:8000/parameters.yaml#/query/limit"
22
+ responses :
23
+ 200 :
24
+ description : " Users in the system"
25
+ schema :
26
+ type : " array"
27
+ items :
28
+ $ref : " http://localhost:8000/models.yaml#/Health"
29
+ 404 :
30
+ $ref : " http://localhost:8000/responses.yaml#/NotFoundError"
You can’t perform that action at this time.
0 commit comments