-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path02-ajiting.swagger.json
222 lines (222 loc) · 6.39 KB
/
02-ajiting.swagger.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
{
"swagger": "2.0",
"info": {
"title": "ajiting-api",
"description": "ajiting 用の Web API です。",
"version": "1.0"
},
"host": "api.ajiting.example.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/v1/ajiting": {
"get": {
"summary": "みんなの #ajiting を一覧する",
"description": "みんながそれぞれに思う #ajiting を一覧します。\nquery が指定されている場合はその条件に従った #ajiting を絞り込みます。",
"operationId": "ListAjiting",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/ListAjitingResponse"
}
},
"403": {
"description": "リソースへのアクセス権がない場合のレスポンスです。",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"404": {
"description": "指定した条件に当てはまる ajiting がなかった場合に返すレスポンスです。",
"schema": {}
}
},
"parameters": [
{
"name": "query",
"description": "希望する ajiting の条件を指定するための検索クエリ.",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"AjitingService"
],
"security": []
}
},
"/v1/ajiting/{id}": {
"put": {
"summary": "#ajiting を更新する",
"description": "指定した内容によって #ajiting を更新します。",
"operationId": "UpdateAjiting",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/AjitingResponse"
}
},
"403": {
"description": "リソースへのアクセス権がない場合のレスポンスです。",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"404": {
"description": "リソースが見つからなかったときのレスポンスです。",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"parameters": [
{
"name": "id",
"description": "更新する ajiting の ID",
"in": "path",
"required": true,
"type": "integer",
"format": "int32"
},
{
"name": "body",
"description": "更新する ajiting オブジェクトの内容",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Ajiting"
}
}
],
"tags": [
"AjitingService"
]
}
}
},
"definitions": {
"Ajiting": {
"type": "object",
"properties": {
"description": {
"type": "string",
"title": "ajiting の説明"
},
"url": {
"type": "string",
"title": "ajiting の URL"
},
"location": {
"$ref": "#/definitions/AjitingGeoCoordinate",
"title": "ajiting がおこなわれる場所"
},
"free": {
"type": "array",
"items": {
"type": "string"
},
"title": "何が free な ajiting か"
}
},
"description": "ajiting の緯度経度情報や、どのような ajiting がおこなわれるか、何が free なのかを表します。",
"title": "ajiting を表現するオブジェクト"
},
"AjitingGeoCoordinate": {
"type": "object",
"properties": {
"latitude": {
"type": "string",
"description": "世界測地系 (WGS84) における緯度情報を表します。",
"title": "緯度",
"pattern": "^[\\-]?[0-9]{0,2}\\.[0-9]+$"
},
"longitude": {
"type": "string",
"description": "世界測地系 (WGS84) における経度情報を表します。",
"title": "経度",
"pattern": "^[\\-]?[0-9]{0,3}\\.[0-9]+$"
}
},
"description": "世界測地系 (WGS84) における緯度経度情報を表します。\n日本測地系 2000 や 日本測地系 2011 などの他の測地系の値は受け容れませんので、\n事前に変換をおこなっておく必要があります。",
"title": "緯度経度情報",
"required": [
"latitude",
"longitude"
]
},
"AjitingResponse": {
"type": "object",
"properties": {
"#ajiting": {
"$ref": "#/definitions/Ajiting"
}
},
"description": "T シャツの裏に印字されているように #ajiting をキーとする `Ajiting` を返します",
"title": "ajiting を返すためのレスポンス"
},
"ErrorResponse": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"status": {
"type": "integer",
"format": "int32"
},
"title": {
"type": "string"
},
"detail": {
"type": "string"
},
"instance": {
"type": "string"
}
},
"description": "[RFC7807](https://tools.ietf.org/html/rfc7807) に従ってエラーの内容を表します。",
"title": "エラーレスポンスオブジェクト"
},
"ListAjitingResponse": {
"type": "object",
"properties": {
"num": {
"type": "integer",
"format": "int32",
"title": "該当する ajiting の件数"
},
"ajitings": {
"type": "array",
"items": {
"$ref": "#/definitions/AjitingResponse"
},
"title": "該当する ajiting の一覧"
}
},
"title": "ajiting 一覧取得用レスポンス"
}
},
"securityDefinitions": {
"OAuth2": {
"type": "oauth2",
"flow": "accessCode",
"authorizationUrl": "https://ajiting.example.com/oauth/authorize",
"tokenUrl": "https://ajiting.example.com/oauth/token"
}
},
"security": [
{
"OAuth2": []
}
]
}