-
Notifications
You must be signed in to change notification settings - Fork 254
/
Copy pathlibrary-example-with-ext.json
103 lines (98 loc) · 2.99 KB
/
library-example-with-ext.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
{
"swagger": "2.0",
"info": {
"title": "Google Example Library API",
"description": "A simple Google Example Library API.",
"version": "v1"
},
"host": "library-example.googleapis.com",
"x-sampleone-book" : {"code": 123, "message": 999},
"x-sampleone-shelf" : {"foo1": 123, "bar": 999},
"x-sampleone-mysimplestring" : "hello world",
"x-sampleone-mysimpleint64" : 12345,
"x-sampleone-mysimplenumber" : 111.222,
"x-sampleone-mysimpleboolean" : true,
"x-sampletwo-book" : {"code": 123, "message": 999},
"x-sampletwo-shelf" : {"foo1": 123, "bar": 999},
"x-unhandled" : {"code": 123, "message": 999},
"parameters" : {
"paramAtSwaggerScope": {
"name": "paramAtSwaggerScope",
"in": "query",
"description": "test",
"required": true,
"type": "integer",
"format": "int32"
}
},
"paths": {
"/v1/{sharedParameter}/pets": {
"post": {
"operationId": "simpleMethod",
"parameters": [
{
"name": "myBodyRef",
"in": "body",
"schema": {
"properties": {
"myStringA": {
"type": "string"
}
}
}
},
{
"name": "paramToOverride",
"in": "query",
"description": "New description",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/paramAtSwaggerScope"
}
],
"responses": {
"default": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/SimpleDef"
}
}
}
},
"parameters": [
{
"name": "sharedParameter",
"in": "path",
"description": "Shared parameter",
"required": true,
"type": "string"
},
{
"name": "paramToOverride",
"in": "query",
"description": "Description to override",
"required": true,
"type": "string"
}
]
}
},
"definitions": {
"SimpleDef": {
"properties": {
"myStringA": {
"type": "string"
}
}
},
"SimpleDefWithBoolean": {
"properties": {
"active": {
"type": "boolean"
}
}
}
}
}