r2-oas 0.2.0 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +41 -0
- data/GEMSPEC.md +19 -22
- data/README.ja.md +61 -0
- data/README.md +60 -0
- data/lib/r2-oas.rb +2 -4
- data/lib/r2-oas/app_configuration.rb +1 -1
- data/lib/r2-oas/deploy/client.rb +33 -6
- data/lib/r2-oas/lib/core_ext/hash/deep_merge.rb +44 -0
- data/lib/r2-oas/lib/core_ext/object/blank.rb +135 -0
- data/lib/r2-oas/schema/editor.rb +13 -2
- data/lib/r2-oas/schema/ui.rb +0 -1
- data/lib/r2-oas/task_logging.rb +0 -4
- data/lib/r2-oas/tasks/common.rake +0 -1
- data/lib/r2-oas/tasks/tool.rake +9 -2
- data/lib/r2-oas/version.rb +1 -1
- data/r2-oas.gemspec +12 -13
- metadata +61 -78
- data/.github/ISSUE_TEMPLATE.md +0 -12
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -12
- data/.gitignore +0 -12
- data/.rspec +0 -3
- data/.rubocop.yml +0 -7
- data/.rubocop_todo.yml +0 -249
- data/.travis.yml +0 -24
- data/CODE_OF_CONDUCT.md +0 -74
- data/Gemfile +0 -12
- data/Gemfile.lock +0 -224
- data/Rakefile +0 -8
- data/bin/console +0 -12
- data/bin/setup +0 -8
- data/docs/.nojekyll +0 -0
- data/docs/README.md +0 -173
- data/docs/_sidebar.md +0 -23
- data/docs/attention/if_clash.md +0 -19
- data/docs/index.html +0 -29
- data/docs/schema/3.0.0.md +0 -155
- data/docs/setting/COC.md +0 -14
- data/docs/setting/CORS.md +0 -22
- data/docs/setting/configure.md +0 -176
- data/docs/usage/analyze_docs.md +0 -875
- data/docs/usage/clean_docs.md +0 -19
- data/docs/usage/deploy_docs.md +0 -839
- data/docs/usage/display_paths_list.md +0 -35
- data/docs/usage/display_paths_stats.md +0 -54
- data/docs/usage/edit_docs.md +0 -218
- data/docs/usage/generate_docs.md +0 -412
- data/docs/usage/monitor_docs.md +0 -219
- data/docs/usage/use_hook_methods.md +0 -236
- data/docs/usage/use_hook_to_generate_docs.md +0 -235
- data/docs/usage/use_schema_namespace.md +0 -181
- data/docs/usage/use_tag_namespace.md +0 -180
- data/docs/usage/view_docs.md +0 -262
- data/lib/r2-oas/deploy/swagger-ui/dist/favicon-16x16.png +0 -0
- data/lib/r2-oas/deploy/swagger-ui/dist/favicon-32x32.png +0 -0
- data/lib/r2-oas/deploy/swagger-ui/dist/oauth2-redirect.html +0 -68
- data/lib/r2-oas/deploy/swagger-ui/dist/swagger-ui-bundle.js +0 -134
- data/lib/r2-oas/deploy/swagger-ui/dist/swagger-ui-bundle.js.map +0 -1
- data/lib/r2-oas/deploy/swagger-ui/dist/swagger-ui-standalone-preset.js +0 -22
- data/lib/r2-oas/deploy/swagger-ui/dist/swagger-ui-standalone-preset.js.map +0 -1
- data/lib/r2-oas/deploy/swagger-ui/dist/swagger-ui.css +0 -4
- data/lib/r2-oas/deploy/swagger-ui/dist/swagger-ui.css.map +0 -1
- data/lib/r2-oas/deploy/swagger-ui/dist/swagger-ui.js +0 -9
- data/lib/r2-oas/deploy/swagger-ui/dist/swagger-ui.js.map +0 -1
data/docs/usage/clean_docs.md
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# Clean docs
|
2
|
-
|
3
|
-
Delete `components/schemas` and `components/requestBodies` files not in use.
|
4
|
-
|
5
|
-
## Prepare
|
6
|
-
|
7
|
-
Add this line to your application's Gemfile:
|
8
|
-
|
9
|
-
```ruby
|
10
|
-
group :development do
|
11
|
-
gem 'r2-oas'
|
12
|
-
end
|
13
|
-
```
|
14
|
-
|
15
|
-
## Command
|
16
|
-
|
17
|
-
```bash
|
18
|
-
$ bundle exec rake routes:oas:clean
|
19
|
-
```
|
data/docs/usage/deploy_docs.md
DELETED
@@ -1,839 +0,0 @@
|
|
1
|
-
# Deploy docs
|
2
|
-
|
3
|
-
## Prepare
|
4
|
-
|
5
|
-
Add this line to your application's Gemfile:
|
6
|
-
|
7
|
-
```ruby
|
8
|
-
group :development do
|
9
|
-
gem 'r2-oas'
|
10
|
-
end
|
11
|
-
```
|
12
|
-
|
13
|
-
## Command
|
14
|
-
|
15
|
-
```bash
|
16
|
-
$ bundle exec rake routes:oas:deploy
|
17
|
-
```
|
18
|
-
|
19
|
-
## Example
|
20
|
-
|
21
|
-
if there is `oas_doc.yml` like this:
|
22
|
-
|
23
|
-
<details>
|
24
|
-
|
25
|
-
```yaml
|
26
|
-
---
|
27
|
-
openapi: 3.0.0
|
28
|
-
paths:
|
29
|
-
"/users":
|
30
|
-
post:
|
31
|
-
tags:
|
32
|
-
- user
|
33
|
-
summary: post summary
|
34
|
-
description: post description
|
35
|
-
responses:
|
36
|
-
default:
|
37
|
-
description: ''
|
38
|
-
'200':
|
39
|
-
description: user description
|
40
|
-
content:
|
41
|
-
application/json:
|
42
|
-
schema:
|
43
|
-
"$ref": "#/components/schemas/User"
|
44
|
-
deprecated: false
|
45
|
-
"/users/new":
|
46
|
-
get:
|
47
|
-
tags:
|
48
|
-
- user
|
49
|
-
summary: get summary
|
50
|
-
description: get description
|
51
|
-
responses:
|
52
|
-
default:
|
53
|
-
description: ''
|
54
|
-
'200':
|
55
|
-
description: user description
|
56
|
-
content:
|
57
|
-
application/json:
|
58
|
-
schema:
|
59
|
-
"$ref": "#/components/schemas/User"
|
60
|
-
deprecated: false
|
61
|
-
"/users/:id/edit":
|
62
|
-
get:
|
63
|
-
tags:
|
64
|
-
- user
|
65
|
-
summary: get summary
|
66
|
-
description: get description
|
67
|
-
responses:
|
68
|
-
default:
|
69
|
-
description: ''
|
70
|
-
'200':
|
71
|
-
description: user description
|
72
|
-
content:
|
73
|
-
application/json:
|
74
|
-
schema:
|
75
|
-
"$ref": "#/components/schemas/User"
|
76
|
-
deprecated: false
|
77
|
-
parameters:
|
78
|
-
- name: id
|
79
|
-
in: path
|
80
|
-
description: id
|
81
|
-
required: true
|
82
|
-
schema:
|
83
|
-
type: integer
|
84
|
-
"/users/:id":
|
85
|
-
delete:
|
86
|
-
tags:
|
87
|
-
- user
|
88
|
-
summary: delete summary
|
89
|
-
description: delete description
|
90
|
-
responses:
|
91
|
-
default:
|
92
|
-
description: ''
|
93
|
-
'200':
|
94
|
-
description: user description
|
95
|
-
content:
|
96
|
-
application/json:
|
97
|
-
schema:
|
98
|
-
"$ref": "#/components/schemas/User"
|
99
|
-
deprecated: false
|
100
|
-
parameters:
|
101
|
-
- name: id
|
102
|
-
in: path
|
103
|
-
description: id
|
104
|
-
required: true
|
105
|
-
schema:
|
106
|
-
type: integer
|
107
|
-
"/api/v1/tasks":
|
108
|
-
post:
|
109
|
-
tags:
|
110
|
-
- api/v1/task
|
111
|
-
summary: post summary
|
112
|
-
description: post description
|
113
|
-
responses:
|
114
|
-
default:
|
115
|
-
description: ''
|
116
|
-
'200':
|
117
|
-
description: api/v1/task description
|
118
|
-
content:
|
119
|
-
application/json:
|
120
|
-
schema:
|
121
|
-
"$ref": "#/components/schemas/Task"
|
122
|
-
deprecated: false
|
123
|
-
"/api/v1/tasks/new":
|
124
|
-
get:
|
125
|
-
tags:
|
126
|
-
- api/v1/task
|
127
|
-
summary: get summary
|
128
|
-
description: get description
|
129
|
-
responses:
|
130
|
-
default:
|
131
|
-
description: ''
|
132
|
-
'200':
|
133
|
-
description: api/v1/task description
|
134
|
-
content:
|
135
|
-
application/json:
|
136
|
-
schema:
|
137
|
-
"$ref": "#/components/schemas/Task"
|
138
|
-
deprecated: false
|
139
|
-
"/api/v1/tasks/:id/edit":
|
140
|
-
get:
|
141
|
-
tags:
|
142
|
-
- api/v1/task
|
143
|
-
summary: get summary
|
144
|
-
description: get description
|
145
|
-
responses:
|
146
|
-
default:
|
147
|
-
description: ''
|
148
|
-
'200':
|
149
|
-
description: api/v1/task description
|
150
|
-
content:
|
151
|
-
application/json:
|
152
|
-
schema:
|
153
|
-
"$ref": "#/components/schemas/Task"
|
154
|
-
deprecated: false
|
155
|
-
parameters:
|
156
|
-
- name: id
|
157
|
-
in: path
|
158
|
-
description: id
|
159
|
-
required: true
|
160
|
-
schema:
|
161
|
-
type: integer
|
162
|
-
"/api/v1/tasks/:id":
|
163
|
-
delete:
|
164
|
-
tags:
|
165
|
-
- api/v1/task
|
166
|
-
summary: delete summary
|
167
|
-
description: delete description
|
168
|
-
responses:
|
169
|
-
default:
|
170
|
-
description: ''
|
171
|
-
'200':
|
172
|
-
description: api/v1/task description
|
173
|
-
content:
|
174
|
-
application/json:
|
175
|
-
schema:
|
176
|
-
"$ref": "#/components/schemas/Task"
|
177
|
-
deprecated: false
|
178
|
-
parameters:
|
179
|
-
- name: id
|
180
|
-
in: path
|
181
|
-
description: id
|
182
|
-
required: true
|
183
|
-
schema:
|
184
|
-
type: integer
|
185
|
-
"/api/v1/posts":
|
186
|
-
post:
|
187
|
-
tags:
|
188
|
-
- api/v1/post
|
189
|
-
summary: post summary
|
190
|
-
description: post description
|
191
|
-
responses:
|
192
|
-
default:
|
193
|
-
description: ''
|
194
|
-
'200':
|
195
|
-
description: api/v1/post description
|
196
|
-
content:
|
197
|
-
application/json:
|
198
|
-
schema:
|
199
|
-
"$ref": "#/components/schemas/Post"
|
200
|
-
deprecated: false
|
201
|
-
"/api/v1/posts/new":
|
202
|
-
get:
|
203
|
-
tags:
|
204
|
-
- api/v1/post
|
205
|
-
summary: get summary
|
206
|
-
description: get description
|
207
|
-
responses:
|
208
|
-
default:
|
209
|
-
description: ''
|
210
|
-
'200':
|
211
|
-
description: api/v1/post description
|
212
|
-
content:
|
213
|
-
application/json:
|
214
|
-
schema:
|
215
|
-
"$ref": "#/components/schemas/Post"
|
216
|
-
deprecated: false
|
217
|
-
"/api/v1/posts/:id/edit":
|
218
|
-
get:
|
219
|
-
tags:
|
220
|
-
- api/v1/post
|
221
|
-
summary: get summary
|
222
|
-
description: get description
|
223
|
-
responses:
|
224
|
-
default:
|
225
|
-
description: ''
|
226
|
-
'200':
|
227
|
-
description: api/v1/post description
|
228
|
-
content:
|
229
|
-
application/json:
|
230
|
-
schema:
|
231
|
-
"$ref": "#/components/schemas/Post"
|
232
|
-
deprecated: false
|
233
|
-
parameters:
|
234
|
-
- name: id
|
235
|
-
in: path
|
236
|
-
description: id
|
237
|
-
required: true
|
238
|
-
schema:
|
239
|
-
type: integer
|
240
|
-
"/api/v1/posts/:id":
|
241
|
-
delete:
|
242
|
-
tags:
|
243
|
-
- api/v1/post
|
244
|
-
summary: delete summary
|
245
|
-
description: delete description
|
246
|
-
responses:
|
247
|
-
default:
|
248
|
-
description: ''
|
249
|
-
'200':
|
250
|
-
description: api/v1/post description
|
251
|
-
content:
|
252
|
-
application/json:
|
253
|
-
schema:
|
254
|
-
"$ref": "#/components/schemas/Post"
|
255
|
-
deprecated: false
|
256
|
-
parameters:
|
257
|
-
- name: id
|
258
|
-
in: path
|
259
|
-
description: id
|
260
|
-
required: true
|
261
|
-
schema:
|
262
|
-
type: integer
|
263
|
-
"/api/v2/posts":
|
264
|
-
post:
|
265
|
-
tags:
|
266
|
-
- api/v2/post
|
267
|
-
summary: post summary
|
268
|
-
description: post description
|
269
|
-
responses:
|
270
|
-
default:
|
271
|
-
description: ''
|
272
|
-
'200':
|
273
|
-
description: responses description
|
274
|
-
content:
|
275
|
-
application/json:
|
276
|
-
schema:
|
277
|
-
"$ref": "#/components/schemas/Post"
|
278
|
-
deprecated: false
|
279
|
-
"/api/v2/posts/new":
|
280
|
-
get:
|
281
|
-
tags:
|
282
|
-
- api/v2/post
|
283
|
-
summary: get summary
|
284
|
-
description: get description
|
285
|
-
responses:
|
286
|
-
default:
|
287
|
-
description: ''
|
288
|
-
'200':
|
289
|
-
description: responses description
|
290
|
-
content:
|
291
|
-
application/json:
|
292
|
-
schema:
|
293
|
-
"$ref": "#/components/schemas/Post"
|
294
|
-
deprecated: false
|
295
|
-
"/api/v2/posts/:id/edit":
|
296
|
-
get:
|
297
|
-
tags:
|
298
|
-
- api/v2/post
|
299
|
-
summary: get summary
|
300
|
-
description: get description
|
301
|
-
responses:
|
302
|
-
default:
|
303
|
-
description: ''
|
304
|
-
'200':
|
305
|
-
description: responses description
|
306
|
-
content:
|
307
|
-
application/json:
|
308
|
-
schema:
|
309
|
-
"$ref": "#/components/schemas/Post"
|
310
|
-
deprecated: false
|
311
|
-
parameters:
|
312
|
-
- name: id
|
313
|
-
in: path
|
314
|
-
description: id
|
315
|
-
required: true
|
316
|
-
schema:
|
317
|
-
type: integer
|
318
|
-
"/api/v2/posts/:id":
|
319
|
-
delete:
|
320
|
-
tags:
|
321
|
-
- api/v2/post
|
322
|
-
summary: delete summary
|
323
|
-
description: delete description
|
324
|
-
responses:
|
325
|
-
default:
|
326
|
-
description: ''
|
327
|
-
'200':
|
328
|
-
description: responses description
|
329
|
-
content:
|
330
|
-
application/json:
|
331
|
-
schema:
|
332
|
-
"$ref": "#/components/schemas/Post"
|
333
|
-
deprecated: false
|
334
|
-
parameters:
|
335
|
-
- name: id
|
336
|
-
in: path
|
337
|
-
description: id
|
338
|
-
required: true
|
339
|
-
schema:
|
340
|
-
type: integer
|
341
|
-
"/tasks":
|
342
|
-
post:
|
343
|
-
tags:
|
344
|
-
- task
|
345
|
-
summary: post summary
|
346
|
-
description: post description
|
347
|
-
responses:
|
348
|
-
default:
|
349
|
-
description: ''
|
350
|
-
'200':
|
351
|
-
description: task description
|
352
|
-
content:
|
353
|
-
application/json:
|
354
|
-
schema:
|
355
|
-
"$ref": "#/components/schemas/Task"
|
356
|
-
deprecated: false
|
357
|
-
"/tasks/new":
|
358
|
-
get:
|
359
|
-
tags:
|
360
|
-
- task
|
361
|
-
summary: get summary
|
362
|
-
description: get description
|
363
|
-
responses:
|
364
|
-
default:
|
365
|
-
description: ''
|
366
|
-
'200':
|
367
|
-
description: task description
|
368
|
-
content:
|
369
|
-
application/json:
|
370
|
-
schema:
|
371
|
-
"$ref": "#/components/schemas/Task"
|
372
|
-
deprecated: false
|
373
|
-
"/tasks/:id/edit":
|
374
|
-
get:
|
375
|
-
tags:
|
376
|
-
- task
|
377
|
-
summary: get summary
|
378
|
-
description: get description
|
379
|
-
responses:
|
380
|
-
default:
|
381
|
-
description: ''
|
382
|
-
'200':
|
383
|
-
description: task description
|
384
|
-
content:
|
385
|
-
application/json:
|
386
|
-
schema:
|
387
|
-
"$ref": "#/components/schemas/Task"
|
388
|
-
deprecated: false
|
389
|
-
parameters:
|
390
|
-
- name: id
|
391
|
-
in: path
|
392
|
-
description: id
|
393
|
-
required: true
|
394
|
-
schema:
|
395
|
-
type: integer
|
396
|
-
"/tasks/:id":
|
397
|
-
delete:
|
398
|
-
tags:
|
399
|
-
- task
|
400
|
-
summary: delete summary
|
401
|
-
description: delete description
|
402
|
-
responses:
|
403
|
-
default:
|
404
|
-
description: ''
|
405
|
-
'200':
|
406
|
-
description: task description
|
407
|
-
content:
|
408
|
-
application/json:
|
409
|
-
schema:
|
410
|
-
"$ref": "#/components/schemas/Task"
|
411
|
-
deprecated: false
|
412
|
-
parameters:
|
413
|
-
- name: id
|
414
|
-
in: path
|
415
|
-
description: id
|
416
|
-
required: true
|
417
|
-
schema:
|
418
|
-
type: integer
|
419
|
-
"/subadmin":
|
420
|
-
get:
|
421
|
-
tags:
|
422
|
-
- rails_admin/engine
|
423
|
-
summary: get summary
|
424
|
-
description: get description
|
425
|
-
responses:
|
426
|
-
default:
|
427
|
-
description: ''
|
428
|
-
'200':
|
429
|
-
description: rails_admin/engine description
|
430
|
-
content:
|
431
|
-
application/json:
|
432
|
-
schema:
|
433
|
-
"$ref": "#/components/schemas/Engine"
|
434
|
-
deprecated: false
|
435
|
-
"/admin":
|
436
|
-
get:
|
437
|
-
tags:
|
438
|
-
- rails_admin/engine
|
439
|
-
summary: get summary
|
440
|
-
description: get description
|
441
|
-
responses:
|
442
|
-
default:
|
443
|
-
description: ''
|
444
|
-
'200':
|
445
|
-
description: rails_admin/engine description
|
446
|
-
content:
|
447
|
-
application/json:
|
448
|
-
schema:
|
449
|
-
"$ref": "#/components/schemas/Engine"
|
450
|
-
deprecated: false
|
451
|
-
"/":
|
452
|
-
get:
|
453
|
-
tags:
|
454
|
-
- rails_admin/main
|
455
|
-
summary: get summary
|
456
|
-
description: get description
|
457
|
-
responses:
|
458
|
-
default:
|
459
|
-
description: ''
|
460
|
-
'200':
|
461
|
-
description: rails_admin/main description
|
462
|
-
content:
|
463
|
-
application/json:
|
464
|
-
schema:
|
465
|
-
"$ref": "#/components/schemas/Main"
|
466
|
-
deprecated: false
|
467
|
-
"/:model_name":
|
468
|
-
post:
|
469
|
-
tags:
|
470
|
-
- rails_admin/main
|
471
|
-
summary: post summary
|
472
|
-
description: post description
|
473
|
-
responses:
|
474
|
-
default:
|
475
|
-
description: ''
|
476
|
-
'200':
|
477
|
-
description: rails_admin/main description
|
478
|
-
content:
|
479
|
-
application/json:
|
480
|
-
schema:
|
481
|
-
"$ref": "#/components/schemas/Main"
|
482
|
-
deprecated: false
|
483
|
-
parameters:
|
484
|
-
- name: model_name
|
485
|
-
in: path
|
486
|
-
description: model_name
|
487
|
-
required: true
|
488
|
-
schema:
|
489
|
-
type: string
|
490
|
-
"/:model_name/new":
|
491
|
-
post:
|
492
|
-
tags:
|
493
|
-
- rails_admin/main
|
494
|
-
summary: post summary
|
495
|
-
description: post description
|
496
|
-
responses:
|
497
|
-
default:
|
498
|
-
description: ''
|
499
|
-
'200':
|
500
|
-
description: rails_admin/main description
|
501
|
-
content:
|
502
|
-
application/json:
|
503
|
-
schema:
|
504
|
-
"$ref": "#/components/schemas/Main"
|
505
|
-
deprecated: false
|
506
|
-
parameters:
|
507
|
-
- name: model_name
|
508
|
-
in: path
|
509
|
-
description: model_name
|
510
|
-
required: true
|
511
|
-
schema:
|
512
|
-
type: string
|
513
|
-
"/:model_name/export":
|
514
|
-
post:
|
515
|
-
tags:
|
516
|
-
- rails_admin/main
|
517
|
-
summary: post summary
|
518
|
-
description: post description
|
519
|
-
responses:
|
520
|
-
default:
|
521
|
-
description: ''
|
522
|
-
'200':
|
523
|
-
description: rails_admin/main description
|
524
|
-
content:
|
525
|
-
application/json:
|
526
|
-
schema:
|
527
|
-
"$ref": "#/components/schemas/Main"
|
528
|
-
deprecated: false
|
529
|
-
parameters:
|
530
|
-
- name: model_name
|
531
|
-
in: path
|
532
|
-
description: model_name
|
533
|
-
required: true
|
534
|
-
schema:
|
535
|
-
type: string
|
536
|
-
"/:model_name/bulk_delete":
|
537
|
-
delete:
|
538
|
-
tags:
|
539
|
-
- rails_admin/main
|
540
|
-
summary: delete summary
|
541
|
-
description: delete description
|
542
|
-
responses:
|
543
|
-
default:
|
544
|
-
description: ''
|
545
|
-
'200':
|
546
|
-
description: rails_admin/main description
|
547
|
-
content:
|
548
|
-
application/json:
|
549
|
-
schema:
|
550
|
-
"$ref": "#/components/schemas/Main"
|
551
|
-
deprecated: false
|
552
|
-
parameters:
|
553
|
-
- name: model_name
|
554
|
-
in: path
|
555
|
-
description: model_name
|
556
|
-
required: true
|
557
|
-
schema:
|
558
|
-
type: string
|
559
|
-
"/:model_name/bulk_action":
|
560
|
-
post:
|
561
|
-
tags:
|
562
|
-
- rails_admin/main
|
563
|
-
summary: post summary
|
564
|
-
description: post description
|
565
|
-
responses:
|
566
|
-
default:
|
567
|
-
description: ''
|
568
|
-
'200':
|
569
|
-
description: rails_admin/main description
|
570
|
-
content:
|
571
|
-
application/json:
|
572
|
-
schema:
|
573
|
-
"$ref": "#/components/schemas/Main"
|
574
|
-
deprecated: false
|
575
|
-
parameters:
|
576
|
-
- name: model_name
|
577
|
-
in: path
|
578
|
-
description: model_name
|
579
|
-
required: true
|
580
|
-
schema:
|
581
|
-
type: string
|
582
|
-
"/:model_name/:id":
|
583
|
-
get:
|
584
|
-
tags:
|
585
|
-
- rails_admin/main
|
586
|
-
summary: get summary
|
587
|
-
description: get description
|
588
|
-
responses:
|
589
|
-
default:
|
590
|
-
description: ''
|
591
|
-
'200':
|
592
|
-
description: rails_admin/main description
|
593
|
-
content:
|
594
|
-
application/json:
|
595
|
-
schema:
|
596
|
-
"$ref": "#/components/schemas/Main"
|
597
|
-
deprecated: false
|
598
|
-
parameters:
|
599
|
-
- name: model_name
|
600
|
-
in: path
|
601
|
-
description: model_name
|
602
|
-
required: true
|
603
|
-
schema:
|
604
|
-
type: string
|
605
|
-
- name: id
|
606
|
-
in: path
|
607
|
-
description: id
|
608
|
-
required: true
|
609
|
-
schema:
|
610
|
-
type: integer
|
611
|
-
"/:model_name/:id/edit":
|
612
|
-
put:
|
613
|
-
tags:
|
614
|
-
- rails_admin/main
|
615
|
-
summary: put summary
|
616
|
-
description: put description
|
617
|
-
responses:
|
618
|
-
default:
|
619
|
-
description: ''
|
620
|
-
'200':
|
621
|
-
description: rails_admin/main description
|
622
|
-
content:
|
623
|
-
application/json:
|
624
|
-
schema:
|
625
|
-
"$ref": "#/components/schemas/Main"
|
626
|
-
deprecated: false
|
627
|
-
parameters:
|
628
|
-
- name: model_name
|
629
|
-
in: path
|
630
|
-
description: model_name
|
631
|
-
required: true
|
632
|
-
schema:
|
633
|
-
type: string
|
634
|
-
- name: id
|
635
|
-
in: path
|
636
|
-
description: id
|
637
|
-
required: true
|
638
|
-
schema:
|
639
|
-
type: integer
|
640
|
-
"/:model_name/:id/delete":
|
641
|
-
delete:
|
642
|
-
tags:
|
643
|
-
- rails_admin/main
|
644
|
-
summary: delete summary
|
645
|
-
description: delete description
|
646
|
-
responses:
|
647
|
-
default:
|
648
|
-
description: ''
|
649
|
-
'200':
|
650
|
-
description: rails_admin/main description
|
651
|
-
content:
|
652
|
-
application/json:
|
653
|
-
schema:
|
654
|
-
"$ref": "#/components/schemas/Main"
|
655
|
-
deprecated: false
|
656
|
-
parameters:
|
657
|
-
- name: model_name
|
658
|
-
in: path
|
659
|
-
description: model_name
|
660
|
-
required: true
|
661
|
-
schema:
|
662
|
-
type: string
|
663
|
-
- name: id
|
664
|
-
in: path
|
665
|
-
description: id
|
666
|
-
required: true
|
667
|
-
schema:
|
668
|
-
type: integer
|
669
|
-
"/:model_name/:id/show_in_app":
|
670
|
-
get:
|
671
|
-
tags:
|
672
|
-
- rails_admin/main
|
673
|
-
summary: get summary
|
674
|
-
description: get description
|
675
|
-
responses:
|
676
|
-
default:
|
677
|
-
description: ''
|
678
|
-
'200':
|
679
|
-
description: rails_admin/main description
|
680
|
-
content:
|
681
|
-
application/json:
|
682
|
-
schema:
|
683
|
-
"$ref": "#/components/schemas/Main"
|
684
|
-
deprecated: false
|
685
|
-
parameters:
|
686
|
-
- name: model_name
|
687
|
-
in: path
|
688
|
-
description: model_name
|
689
|
-
required: true
|
690
|
-
schema:
|
691
|
-
type: string
|
692
|
-
- name: id
|
693
|
-
in: path
|
694
|
-
description: id
|
695
|
-
required: true
|
696
|
-
schema:
|
697
|
-
type: integer
|
698
|
-
externalDocs:
|
699
|
-
description: ''
|
700
|
-
url: ''
|
701
|
-
tags:
|
702
|
-
- name: rails_admin/engine
|
703
|
-
description: rails_admin/engine description
|
704
|
-
externalDocs:
|
705
|
-
description: description
|
706
|
-
url: url
|
707
|
-
- name: api/v2/post
|
708
|
-
description: api/v2/post description
|
709
|
-
externalDocs:
|
710
|
-
description: description
|
711
|
-
url: url
|
712
|
-
- name: api/v1/post
|
713
|
-
description: api/v1/post description
|
714
|
-
externalDocs:
|
715
|
-
description: description
|
716
|
-
url: url
|
717
|
-
- name: api/v1/task
|
718
|
-
description: api/v1/task description
|
719
|
-
externalDocs:
|
720
|
-
description: description
|
721
|
-
url: url
|
722
|
-
- name: task
|
723
|
-
description: task description
|
724
|
-
externalDocs:
|
725
|
-
description: description
|
726
|
-
url: url
|
727
|
-
- name: user
|
728
|
-
description: user description
|
729
|
-
externalDocs:
|
730
|
-
description: description
|
731
|
-
url: url
|
732
|
-
- name: rails_admin/main
|
733
|
-
description: rails_admin/main description
|
734
|
-
externalDocs:
|
735
|
-
description: description
|
736
|
-
url: url
|
737
|
-
components:
|
738
|
-
schemas:
|
739
|
-
User:
|
740
|
-
type: object
|
741
|
-
properties:
|
742
|
-
id:
|
743
|
-
type: integer
|
744
|
-
format: int64
|
745
|
-
Task:
|
746
|
-
type: object
|
747
|
-
properties:
|
748
|
-
id:
|
749
|
-
type: integer
|
750
|
-
format: int64
|
751
|
-
Engine:
|
752
|
-
type: object
|
753
|
-
properties:
|
754
|
-
id:
|
755
|
-
type: integer
|
756
|
-
format: int64
|
757
|
-
Main:
|
758
|
-
type: object
|
759
|
-
properties:
|
760
|
-
id:
|
761
|
-
type: integer
|
762
|
-
format: int64
|
763
|
-
Post:
|
764
|
-
type: object
|
765
|
-
properties:
|
766
|
-
id:
|
767
|
-
type: integer
|
768
|
-
format: int64
|
769
|
-
info:
|
770
|
-
title: Swagger API Document Title
|
771
|
-
description: |-
|
772
|
-
This is a sample server Petstore server. You can find out more about
|
773
|
-
Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net,
|
774
|
-
#swagger](http://swagger.io/irc/). For this sample, you can use the api key
|
775
|
-
`special-key` to test the authorization filters.
|
776
|
-
termsOfService: http://swagger.io/terms/
|
777
|
-
contact:
|
778
|
-
name: ''
|
779
|
-
url: ''
|
780
|
-
license:
|
781
|
-
name: ''
|
782
|
-
url: ''
|
783
|
-
version: 1.0.0
|
784
|
-
servers:
|
785
|
-
- url: http://localhost:3000
|
786
|
-
description: localhost
|
787
|
-
```
|
788
|
-
|
789
|
-
</details>
|
790
|
-
|
791
|
-
```
|
792
|
-
$ be rake routes:oas:deploy
|
793
|
-
I, [2019-05-06T19:32:52.014417 #22431] INFO -- : [R2-OAS] start
|
794
|
-
I, [2019-05-06T19:32:52.075691 #22431] INFO -- : [Build OAS schema files] start
|
795
|
-
I, [2019-05-06T19:32:52.075731 #22431] INFO -- : [Build OAS schema files] end
|
796
|
-
I, [2019-05-06T19:32:52.075743 #22431] INFO -- : [Build OAS docs from schema files] start
|
797
|
-
I, [2019-05-06T19:32:52.079267 #22431] INFO -- : Use schema file: oas_docs/src/openapi.yml
|
798
|
-
I, [2019-05-06T19:32:52.080334 #22431] INFO -- : Use schema file: oas_docs/src/paths/user.yml
|
799
|
-
I, [2019-05-06T19:32:52.081189 #22431] INFO -- : Use schema file: oas_docs/src/paths/api/v1/task.yml
|
800
|
-
I, [2019-05-06T19:32:52.081944 #22431] INFO -- : Use schema file: oas_docs/src/paths/api/v1/post.yml
|
801
|
-
I, [2019-05-06T19:32:52.082838 #22431] INFO -- : Use schema file: oas_docs/src/paths/api/v2/post.yml
|
802
|
-
I, [2019-05-06T19:32:52.083719 #22431] INFO -- : Use schema file: oas_docs/src/paths/task.yml
|
803
|
-
I, [2019-05-06T19:32:52.084185 #22431] INFO -- : Use schema file: oas_docs/src/paths/rails_admin/engine.yml
|
804
|
-
I, [2019-05-06T19:32:52.085796 #22431] INFO -- : Use schema file: oas_docs/src/paths/rails_admin/main.yml
|
805
|
-
I, [2019-05-06T19:32:52.086063 #22431] INFO -- : Use schema file: oas_docs/src/externalDocs.yml
|
806
|
-
I, [2019-05-06T19:32:52.086555 #22431] INFO -- : Use schema file: oas_docs/src/tags.yml
|
807
|
-
I, [2019-05-06T19:32:52.087145 #22431] INFO -- : Use schema file: oas_docs/src/components/schemas/user.yml
|
808
|
-
I, [2019-05-06T19:32:52.087667 #22431] INFO -- : Use schema file: oas_docs/src/components/schemas/task.yml
|
809
|
-
I, [2019-05-06T19:32:52.087955 #22431] INFO -- : Use schema file: oas_docs/src/components/schemas/engine.yml
|
810
|
-
I, [2019-05-06T19:32:52.088281 #22431] INFO -- : Use schema file: oas_docs/src/components/schemas/main.yml
|
811
|
-
I, [2019-05-06T19:32:52.088567 #22431] INFO -- : Use schema file: oas_docs/src/components/schemas/post.yml
|
812
|
-
I, [2019-05-06T19:32:52.088867 #22431] INFO -- : Use schema file: oas_docs/src/info.yml
|
813
|
-
I, [2019-05-06T19:32:52.089136 #22431] INFO -- : Use schema file: oas_docs/src/servers.yml
|
814
|
-
I, [2019-05-06T19:32:52.100673 #22431] INFO -- : [Build OAS docs from schema files] end
|
815
|
-
I, [2019-05-06T19:32:52.133732 #22431] INFO -- : [R2-OAS] end
|
816
|
-
```
|
817
|
-
|
818
|
-
Generate docs like this:
|
819
|
-
|
820
|
-
```
|
821
|
-
$ tree docs
|
822
|
-
docs
|
823
|
-
├── dist
|
824
|
-
│ ├── favicon-16x16.png
|
825
|
-
│ ├── favicon-32x32.png
|
826
|
-
│ ├── oauth2-redirect.html
|
827
|
-
│ ├── swagger-ui-bundle.js
|
828
|
-
│ ├── swagger-ui-bundle.js.map
|
829
|
-
│ ├── swagger-ui-standalone-preset.js
|
830
|
-
│ ├── swagger-ui-standalone-preset.js.map
|
831
|
-
│ ├── swagger-ui.css
|
832
|
-
│ ├── swagger-ui.css.map
|
833
|
-
│ ├── swagger-ui.js
|
834
|
-
│ └── swagger-ui.js.map
|
835
|
-
├── index.html
|
836
|
-
└── oas_doc.yml
|
837
|
-
|
838
|
-
1 directory, 13 files
|
839
|
-
```
|