r2-oas 0.3.2 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +55 -1
  3. data/GEMSPEC.md +2 -2
  4. data/README.ja.md +73 -43
  5. data/README.md +75 -39
  6. data/lib/r2-oas.rb +4 -5
  7. data/lib/r2-oas/app_configuration.rb +17 -5
  8. data/lib/r2-oas/app_configuration/deprecation.rb +28 -0
  9. data/lib/r2-oas/configuration.rb +57 -11
  10. data/lib/r2-oas/configuration/paths_config.rb +6 -3
  11. data/lib/r2-oas/deploy/client.rb +1 -1
  12. data/lib/r2-oas/errors.rb +5 -0
  13. data/lib/r2-oas/helpers/file_helper.rb +68 -0
  14. data/lib/r2-oas/hooks/hook.rb +7 -5
  15. data/lib/r2-oas/lib/core_ext/all.rb +5 -0
  16. data/lib/r2-oas/lib/core_ext/string/filters.rb +29 -0
  17. data/lib/r2-oas/plugin/base.rb +44 -0
  18. data/lib/r2-oas/plugin/executor.rb +148 -0
  19. data/lib/r2-oas/plugin/hookable.rb +47 -0
  20. data/lib/r2-oas/plugin/public.rb +3 -0
  21. data/lib/r2-oas/plugin/transform/transform.rb +10 -0
  22. data/lib/r2-oas/plugin/transform/v3/transform.rb +20 -0
  23. data/lib/r2-oas/plugin/transform/v3/visitable.rb +37 -0
  24. data/lib/r2-oas/public.rb +3 -0
  25. data/lib/r2-oas/schema/base.rb +1 -1
  26. data/lib/r2-oas/schema/builder.rb +1 -1
  27. data/lib/r2-oas/schema/editor.rb +9 -2
  28. data/lib/r2-oas/schema/monitor.rb +1 -1
  29. data/lib/r2-oas/schema/ui.rb +1 -1
  30. data/lib/r2-oas/schema/v3/analyzer/path_analyzer.rb +1 -1
  31. data/lib/r2-oas/schema/v3/builder.rb +1 -1
  32. data/lib/r2-oas/schema/v3/builder/base_builder.rb +14 -2
  33. data/lib/r2-oas/schema/v3/builder/doc_builder.rb +10 -2
  34. data/lib/r2-oas/schema/v3/generator/base_generator.rb +7 -2
  35. data/lib/r2-oas/schema/v3/generator/doc_generator.rb +1 -1
  36. data/lib/r2-oas/schema/v3/manager/file/include_ref_base_file_manager.rb +3 -2
  37. data/lib/r2-oas/schema/v3/object/from_files/base_object.rb +62 -0
  38. data/lib/r2-oas/schema/v3/object/from_files/components/request_body_object.rb +103 -0
  39. data/lib/r2-oas/schema/v3/object/from_files/components/schema_object.rb +102 -0
  40. data/lib/r2-oas/schema/v3/object/from_files/components_object.rb +46 -0
  41. data/lib/r2-oas/schema/v3/object/from_files/external_document_object.rb +23 -0
  42. data/lib/r2-oas/schema/v3/object/from_files/info_object.rb +23 -0
  43. data/lib/r2-oas/schema/v3/object/from_files/openapi_object.rb +61 -0
  44. data/lib/r2-oas/schema/v3/object/from_files/path_item_object.rb +110 -0
  45. data/lib/r2-oas/schema/v3/object/from_files/paths_object.rb +33 -0
  46. data/lib/r2-oas/schema/v3/object/from_files/utils/all.rb +4 -0
  47. data/lib/r2-oas/schema/v3/object/from_files/utils/deep_methods.rb +27 -0
  48. data/lib/r2-oas/schema/v3/object/from_files/utils/refs.rb +151 -0
  49. data/lib/r2-oas/schema/v3/object/{public.rb → from_routes/all.rb} +0 -0
  50. data/lib/r2-oas/schema/v3/object/from_routes/base_object.rb +41 -0
  51. data/lib/r2-oas/schema/v3/object/{components → from_routes/components}/request_body_object.rb +19 -28
  52. data/lib/r2-oas/schema/v3/object/{components → from_routes/components}/schema_object.rb +12 -16
  53. data/lib/r2-oas/schema/v3/object/{components_object.rb → from_routes/components_object.rb} +19 -13
  54. data/lib/r2-oas/schema/v3/object/{external_document_object.rb → from_routes/external_document_object.rb} +9 -2
  55. data/lib/r2-oas/schema/v3/object/{info_object.rb → from_routes/info_object.rb} +9 -2
  56. data/lib/r2-oas/schema/v3/object/{openapi_object.rb → from_routes/openapi_object.rb} +16 -11
  57. data/lib/r2-oas/schema/v3/object/{path_item_object.rb → from_routes/path_item_object.rb} +8 -8
  58. data/lib/r2-oas/schema/v3/object/{paths_object.rb → from_routes/paths_object.rb} +13 -30
  59. data/lib/r2-oas/schema/v3/object/{server_object.rb → from_routes/server_object.rb} +0 -0
  60. data/lib/r2-oas/schema/v3/object/{tag_object.rb → from_routes/tag_object.rb} +2 -1
  61. data/lib/r2-oas/schema/v3/object/store.rb +54 -0
  62. data/lib/r2-oas/shared/all.rb +1 -0
  63. data/lib/r2-oas/shared/callable.rb +17 -0
  64. data/lib/r2-oas/store.rb +20 -16
  65. data/lib/r2-oas/support/deprecation.rb +26 -0
  66. data/lib/r2-oas/support/deprecation/behavior.rb +21 -0
  67. data/lib/r2-oas/support/deprecation/instance_delegator.rb +42 -0
  68. data/lib/r2-oas/support/deprecation/reporting.rb +91 -0
  69. data/lib/r2-oas/task.rb +1 -2
  70. data/lib/r2-oas/task_logging.rb +3 -7
  71. data/lib/r2-oas/tasks/common.rake +1 -2
  72. data/lib/r2-oas/tasks/main.rake +59 -9
  73. data/lib/r2-oas/version.rb +1 -1
  74. data/r2-oas.gemspec +2 -7
  75. metadata +55 -69
  76. data/.gitignore +0 -16
  77. data/.rspec +0 -3
  78. data/.rubocop.yml +0 -10
  79. data/.rubocop_todo.yml +0 -291
  80. data/.travis.yml +0 -26
  81. data/Appraisals +0 -13
  82. data/CODE_OF_CONDUCT.md +0 -74
  83. data/Gemfile +0 -12
  84. data/Rakefile +0 -8
  85. data/lib/r2-oas/app_configuration/tool.rb +0 -31
  86. data/lib/r2-oas/app_configuration/tool/paths/stats.rb +0 -43
  87. data/lib/r2-oas/pluggable_configuration.rb +0 -33
  88. data/lib/r2-oas/plugins/schema/v3/object/hookable_base_object.rb +0 -100
  89. data/lib/r2-oas/schema/v3/object/base_object.rb +0 -65
  90. data/lib/r2-oas/tasks/tool.rake +0 -83
  91. data/lib/r2-oas/tool/paths/ls.rb +0 -15
  92. data/lib/r2-oas/tool/paths/stats.rb +0 -84
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 517376839248a5dd6de6e70b753490e02a23ac70c967129fc7a578ec89da596c
4
- data.tar.gz: 7eedf1ebcd319c0b93ee1ac58556ce0e4788658e62b64eecbad825862770245f
3
+ metadata.gz: 7a8548f2c821fe7b76548b748dbe733ce0f11386d76ae046cc047b0fe0eb017b
4
+ data.tar.gz: ee6ebb9740a854142b929195a57206cf8cedfeb1f965e4217e048152effc03a0
5
5
  SHA512:
6
- metadata.gz: 20b7b68bbf6c4e8ec2d963301855d7bd078b78c31a98e8a01d421197a9e080682e459fb2a2b5541ca07580b995003f3fe17f88b97b1ab5295bdcda793d255c81
7
- data.tar.gz: 140b4b5c71b4e34ed9f7ef7796414699db821ac078d6ad0101530145d0e3084cfd3f4e7b0c85e6a6091a2213b91ce6f976d4a2ee44d20434ce75f4f848595bf1
6
+ metadata.gz: fcdf6903f652e7109c137b05123d6d244aaec02e9bb2a1fd657bc710ae549c6d84bd887c281a2f881e070d757299f17334200273bb2b3f9e6b988d16578a246b
7
+ data.tar.gz: 129cfd622a8bd4c5b55bd5415cb24f24d0b918ea7cd9781aec7127b41640c3fe116b5f7e4dfe20add9ec68993d075471d172bd4919fda957893dc8b747c48ce2
@@ -1,4 +1,58 @@
1
- # Change Log
1
+ # CHANGELOG
2
+
3
+ ## v0.5.0
4
+
5
+ 2020-01-29
6
+
7
+ - [`Breaking`] Remove `use_object_classes` option ([#171](https://github.com/yukihirop/r2-oas/pull/171))
8
+ - [`Feature`] Upgrade init command ([#176](https://github.com/yukihirop/r2-oas/pull/176))
9
+ - [`EOL`] EOL Ruby `2.3` and Support over Ruby `2.5.0` ([#170](https://github.com/yukihirop/r2-oas/pull/170))
10
+
11
+ Please see mileston [v0.5.0](https://github.com/yukihirop/r2-oas/milestone/5?closed=1)
12
+
13
+ ## v0.4.1
14
+
15
+ 2020-8-24
16
+
17
+ - [`Breaking`] Remove `tool` tasks because it is infrequently used, it costs ([#162](https://github.com/yukihirop/r2-oas/pull/162))
18
+ - `routes:oas:paths_ls`
19
+ - `routes:oas:paths_stats`
20
+ - [`Feature`] Add `SKIP_PLUGIN` enviroment variables ([#160](https://github.com/yukihirop/r2-oas/pull/160))
21
+
22
+ Please see milestone [v0.4.1](https://github.com/yukihirop/r2-oas/milestone/6?closed=1)
23
+
24
+ ## v0.4.0
25
+
26
+ 2020-07-22
27
+
28
+ - [`BigFeature`] 🎯 Implement plugin ([#154](https://github.com/yukihirop/r2-oas/pull/154))
29
+ - Please see [use plugins docs](https://yukihirop.github.io/r2-oas/#/usage/use_plugins)
30
+ - [`Feature`] Implement `routes:oas:init`([#154](https://github.com/yukihirop/r2-oas/pull/154))
31
+ - Please see [initialize docs](https://yukihirop.github.io/r2-oas/#/usage/initialize)
32
+ - [`Breaking`] Rename from `routes:oas:dist` to `routes:oas:build` ([#154](https://github.com/yukihirop/r2-oas/pull/154))
33
+ - [`Feature`] Allowed definition of custom rake tasks ([#152](https://github.com/yukihirop/r2-oas/pull/152))
34
+ - Please see [define tasks docs](https://yukihirop.github.io/r2-oas/#/usage/define_tasks)
35
+ - [`Deprecated`] Deprecated use of `R2OAS.use_object_classes=` ([#155](https://github.com/yukihirop/r2-oas/pull/155))
36
+
37
+ Please see milestone [v0.4.0](https://github.com/yukihirop/r2-oas/milestone/4?closed=1)
38
+
39
+ ## v0.3.4
40
+
41
+ 2020-07-11
42
+
43
+ - [`Other`] Modify gemspec `files` fields ([#147](https://github.com/yukihirop/r2-oas/pull/147))
44
+ - Add `r2-oas.gemspec` into gemspec `files`
45
+
46
+ ## v0.3.3
47
+
48
+ 2020-07-11
49
+
50
+ - [`FixBugs`] A cute pet store syndrome 🐈 ([f3f4c30](https://github.com/yukihirop/r2-oas/pull/144))
51
+ - [`FixBugs`] R2OAS.logger.level does not work ([f3f4c30](https://github.com/yukihirop/r2-oas/pull/144))
52
+ - [`Breaking`] Change default namespace type from `:underbar` to `:dot` ([f3f4c30](https://github.com/yukihirop/r2-oas/pull/144))
53
+ - [`Other`] Modify gemspec `files` fields ([f3f4c30](https://github.com/yukihirop/r2-oas/pull/144))
54
+
55
+ Please see milestone [v0.3.3](https://github.com/yukihirop/r2-oas/milestone/3?closed=1)
2
56
 
3
57
  ## v0.3.2
4
58
 
data/GEMSPEC.md CHANGED
@@ -6,12 +6,12 @@ Generate api docment(OpenAPI) side only from `Rails` routing.
6
6
 
7
7
  Provide rake tasks to management API Docment (OpenAPI) 🎉
8
8
 
9
-
9
+ $ bundle exec rake routes:oas:init
10
10
  $ bundle exec rake routes:oas:docs
11
11
  $ bundle exec rake routes:oas:ui
12
12
  $ bundle exec rake routes:oas:editor
13
13
  $ bundle exec rake routes:oas:monitor
14
- $ bundle exec rake routes:oas:dist
14
+ $ bundle exec rake routes:oas:build
15
15
  $ bundle exec rake routes:oas:clean
16
16
  $ bundle exec rake routes:oas:analyze
17
17
  $ bundle exec rake routes:oas:deploy
@@ -8,11 +8,12 @@
8
8
  Railsのルーティング情報からOpenAPI形式のドキュメントを生成し、閲覧・編集・管理するためのrakeタスクの提供をします。
9
9
 
10
10
  ```bash
11
+ bundle exec rake routes:oas:init # 初期化
11
12
  bundle exec rake routes:oas:docs # ドキュメント生成
12
13
  bundle exec rake routes:oas:ui # ドキュメント閲覧
13
14
  bundle exec rake routes:oas:editor # ドキュメント編集
14
15
  bundle exec rake routes:oas:monitor # ドキュメント監視
15
- bundle exec rake routes:oas:dist # ドキュメント配布
16
+ bundle exec rake routes:oas:build # ドキュメントビルド
16
17
  bundle exec rake routes:oas:clean # ドキュメント清掃
17
18
  bundle exec rake routes:oas:analyze # ドキュメント分解・分析
18
19
  bundle exec rake routes:oas:deploy # ドキュメントデプロイ
@@ -49,8 +50,17 @@ $ brew cask install chromedriver
49
50
  gemをrequire後、以下のrakeタスクを実行するだけです。
50
51
 
51
52
  ```bash
52
- bundle exec routes:oas:docs
53
- bundle exec routes:oas:editor
53
+ $ bundle exec rake routes:oas:init
54
+ create oas_docs
55
+ create oas_docs/.paths
56
+ create oas_docs/plugins/helpers
57
+ create oas_docs/tasks/helpers
58
+ create oas_docs/plugins/.gitkeep
59
+ create oas_docs/plugins/helpers/.gitkeep
60
+ create oas_docs/tasks/.gitkeep
61
+ create oas_docs/tasks/helpers/.gitkeep
62
+ $ bundle exec rake routes:oas:docs
63
+ $ bundle exec rake routes:oas:editor
54
64
  ```
55
65
 
56
66
  #### Generate docs
@@ -68,39 +78,70 @@ bundle exec routes:oas:editor
68
78
 
69
79
  ## 📖 Usage
70
80
 
71
- railsプロジェクトのルートディレクトリで以下のコマンドが実行可能です。
81
+
82
+ railsプロジェクトのルートディレクトリで以下のコマンドが実行可能です。
83
+ 一般的なコマンドの使用例を示します。
84
+
85
+ ### Initialize
86
+
87
+ `r2-oas`の初期化
72
88
 
73
89
  ```bash
74
- $ # ドキュメント生成
75
- $ bundle exec rake routes:oas:docs
76
- $ PATHS_FILE="oas_docs/schema/paths/api/v1/task.yml" bundle exec rake routes:oas:docs # pathsファイルを指定してドキュメント生成
90
+ $ bundle exec rake routes:oas:init
91
+ create oas_docs
92
+ create oas_docs/.paths
93
+ create oas_docs/plugins/helpers
94
+ create oas_docs/tasks/helpers
95
+ create oas_docs/plugins/.gitkeep
96
+ create oas_docs/plugins/helpers/.gitkeep
97
+ create oas_docs/tasks/.gitkeep
98
+ create oas_docs/tasks/helpers/.gitkeep
99
+ ```
77
100
 
78
- $ # SwaggerEditorでドキュメント編集
79
- $ bundle exec rake routes:oas:editor
80
- $ PATHS_FILE="oas_docs/schema/paths/api/v1/task.yml" bundle exec rake routes:oas:editor # pathsファイルを指定してドキュメント編集
81
- $ # SwaggerUIでドキュメント閲覧
82
- $ bundle exec rake routes:oas:ui
83
- $ PATHS_FILE="oas_docs/schema/paths/api/v1/task.yml" bundle exec rake routes:oas:ui # pathsファイルを指定してドキュメント閲覧
84
- $ # テキストエディタでドキュメント編集(初期設定時、git管理しないoas_docs/oas_doc.ymlを監視)
85
- $ bundle exec rake routes:oas:monitor
86
- $ PATHS_FILE="oas_docs/schema/paths/api/v1/task.yml" bundle exec rake routes:oas:monitor # pathsファイルを指定してドキュメント監視
87
-
88
- $ # ドキュメントを分解・分析
89
- $ OAS_FILE="~/Desktop/swagger.yml" bundle exec rake routes:oas:analyze
90
- $ # どこからも参照されてないcomponents/schemas(requestBodies, ...)を削除
91
- $ bundle exec rake routes:oas:clean
92
- $ # githubにホスティング
93
- $ bundle exec rake routes:oas:deploy
94
- $ # ドキュメントを配布(初期設定時、配布ファイルは、oas_docs/oas_doc.yml)
95
- $ bundle exec rake routes:oas:dist
96
- $ PATHS_FILE="oas_docs/schema/paths/api/v1/task.yml" bundle exec rake routes:oas:dist # pathsファイルを指定してドキュメント配布
97
-
98
- # pathsファイルのリスト取得
99
- $ bundle exec rake routes:oas:paths_ls
100
- # pathsファイルの編集履歴表示
101
- $ bundle exec rake routes:oas:paths_stats
101
+ ### Generate
102
+
103
+ ドキュメントの生成
104
+
105
+ ```bash
106
+ $ bundle exec rake routes:oas:docs # Generate docs
107
+ $ PATHS_FILE="oas_docs/schema/paths/api/v1/task.yml" bundle exec rake routes:oas:docs # Generate docs by specify unit paths
108
+ ```
109
+
110
+ ### Editor
111
+
112
+ SwaggerEditorの起動
113
+
114
+ ```bash
115
+ $ bundle exec rake routes:oas:editor # Start swagger editor
116
+ $ PATHS_FILE="oas_docs/schema/paths/api/v1/task.yml" bundle exec rake routes:oas:editor # Start swagger editor by specify unit paths
117
+ ```
118
+
119
+ ### UI
120
+
121
+ SwaggerUIの起動
122
+
123
+ ```bash
124
+ $ bundle exec rake routes:oas:ui # Start swagger ui
125
+ $ PATHS_FILE="oas_docs/schema/paths/api/v1/task.yml" bundle exec rake routes:oas:ui # Start swagger ui by specify unit paths
126
+ ```
127
+
128
+ ### Build
129
+
130
+ ドキュメントのビルド
131
+ ※プラグインが適用されます。
132
+
133
+ ```bash
134
+ $ bundle exec rake routes:oas:build
102
135
  ```
103
136
 
137
+ ### Analyze
138
+
139
+ ドキュメントの分割
140
+ OpenAPI形式のドキュメントを読み取り、それをいくつかの部分に分割してソースファイルを生成します
141
+
142
+ ```bash
143
+ $ OAS_FILE="~/Desktop/swagger.yml" bundle exec rake routes:oas:analyze
144
+ ```
104
145
 
105
146
  ## ⚾️ sample
106
147
 
@@ -117,7 +158,7 @@ $ bundle exec rake routes:oas:paths_stats
117
158
 
118
159
  ## ❤️ Support Ruby Version
119
160
 
120
- - Ruby (>= 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin18])
161
+ - Ruby (>= 2.5.0)
121
162
 
122
163
  ## ❤️ Support Rouging
123
164
 
@@ -151,13 +192,6 @@ OpenAPIの3.0.0をサポートしてます。
151
192
 
152
193
  公式ドキュメントはこちら => https://yukihirop.github.io/r2-oas/#/setting/configure
153
194
 
154
- ## 💊 Life Cycle Methods (Hook Metohds)
155
-
156
- ドキュメント生成時に、フックを可能にするメソッドを用意しております。
157
-
158
- 公式ドキュメントはこちら => https://yukihirop.github.io/r2-oas/#/usage/use_hook_methods
159
-
160
-
161
195
  ## Bundle and Rspec with multiple ruby ​​versions
162
196
 
163
197
  #### Bundle
@@ -168,8 +202,6 @@ OpenAPIの3.0.0をサポートしてます。
168
202
  .
169
203
  .
170
204
  ===== Bundle install for All Support Ruby Result =====
171
- ruby-2.3.3: 0
172
- ruby-2.4.2: 0
173
205
  ruby-2.5.8: 0
174
206
  ruby-2.6.6: 0
175
207
  ruby-2.7.1: 0
@@ -197,8 +229,6 @@ ruby-2.7.1: 0
197
229
  .
198
230
  .
199
231
  ===== Rspec for All Support Ruby Result =====
200
- ruby-2.3.3: 0
201
- ruby-2.4.2: 0
202
232
  ruby-2.5.8: 0
203
233
  ruby-2.6.6: 0
204
234
  ruby-2.7.1: 0
data/README.md CHANGED
@@ -10,11 +10,12 @@ Generate api docment(OpenAPI) side only from `Rails` routing.
10
10
  Provides a rake command to help `generate` , `view` , and `edit` OpenAPI documents.
11
11
 
12
12
  ```bash
13
+ bunlde exec rake routes:oas:init # initialize
13
14
  bundle exec rake routes:oas:docs # generate
14
15
  bundle exec rake routes:oas:ui # view
15
16
  bundle exec rake routes:oas:editor # edit
16
17
  bundle exec rake routes:oas:monitor # monitor
17
- bundle exec rake routes:oas:dist # distribute
18
+ bundle exec rake routes:oas:build # build
18
19
  bundle exec rake routes:oas:clean # clean
19
20
  bundle exec rake routes:oas:analyze # analyze
20
21
  bundle exec rake routes:oas:deploy # deploy
@@ -56,11 +57,24 @@ $ brew cask install chromedriver
56
57
 
57
58
  ## 🚀 Tutorial
58
59
 
59
- After requiring a gem,
60
+ After requiring a gem and Configure `Rakefile` in your rails project
61
+
62
+ ```rb
63
+ R2OAS.load_tasks
64
+ ```
60
65
 
61
66
  ```bash
62
- bundle exec routes:oas:docs
63
- bundle exec routes:oas:editor
67
+ $ bundle exec rake routes:oas:init
68
+ create oas_docs
69
+ create oas_docs/.paths
70
+ create oas_docs/plugins/helpers
71
+ create oas_docs/tasks/helpers
72
+ create oas_docs/plugins/.gitkeep
73
+ create oas_docs/plugins/helpers/.gitkeep
74
+ create oas_docs/tasks/.gitkeep
75
+ create oas_docs/tasks/helpers/.gitkeep
76
+ $ bundle exec rake routes:oas:docs
77
+ $ bundle exec rake routes:oas:editor
64
78
  ```
65
79
 
66
80
  #### Generate docs
@@ -74,38 +88,70 @@ bundle exec routes:oas:editor
74
88
 
75
89
  ## Usage
76
90
 
77
- You can execute the following command in the root directory of rails.
91
+ You can execute the following command in the root directory of rails.
92
+ The following are examples of typical command usage.
93
+
94
+ Full docs are available at https://yukihirop.github.io/r2-oas
95
+
96
+ ### Initialize
97
+
98
+ Initialize r2-oas.
99
+
100
+ ```bash
101
+ $ bundle exec rake routes:oas:init
102
+ create oas_docs
103
+ create oas_docs/.paths
104
+ create oas_docs/plugins/helpers
105
+ create oas_docs/tasks/helpers
106
+ create oas_docs/plugins/.gitkeep
107
+ create oas_docs/plugins/helpers/.gitkeep
108
+ create oas_docs/tasks/.gitkeep
109
+ create oas_docs/tasks/helpers/.gitkeep
110
+ ```
111
+
112
+ ### Generate
113
+
114
+ Generate docs.
78
115
 
79
116
  ```bash
80
- $ # Generate docs
81
- $ bundle exec rake routes:oas:docs # Generate docs
117
+ $ bundle exec rake routes:oas:docs # Generate docs
82
118
  $ PATHS_FILE="oas_docs/schema/paths/api/v1/task.yml" bundle exec rake routes:oas:docs # Generate docs by specify unit paths
119
+ ```
83
120
 
84
- $ # Start swagger editor
85
- $ bundle exec rake routes:oas:editor # Start swagger editor
121
+ ### Editor
122
+
123
+ Start swagger editor.
124
+
125
+ ```bash
126
+ $ bundle exec rake routes:oas:editor # Start swagger editor
86
127
  $ PATHS_FILE="oas_docs/schema/paths/api/v1/task.yml" bundle exec rake routes:oas:editor # Start swagger editor by specify unit paths
87
- $ # Start swagger ui
88
- $ bundle exec rake routes:oas:ui # Start swagger ui
128
+ ```
129
+
130
+ ### UI
131
+
132
+ Start swagger ui.
133
+
134
+ ```bash
135
+ $ bundle exec rake routes:oas:ui # Start swagger ui
89
136
  $ PATHS_FILE="oas_docs/schema/paths/api/v1/task.yml" bundle exec rake routes:oas:ui # Start swagger ui by specify unit paths
90
- $ # Monitor swagger document
91
- $ bundle exec rake routes:oas:monitor # Monitor swagger document
92
- $ PATHS_FILE="oas_docs/schema/paths/api/v1/task.yml" bundle exec rake routes:oas:monitor # Monitor swagger by specify unit paths
137
+ ```
138
+
139
+ ### Build
140
+
141
+ Build docs.
142
+ `Plugin is applied`
143
+
144
+ ```bash
145
+ $ bundle exec rake routes:oas:build
146
+ ```
147
+
148
+ ### Analyze
149
+
150
+ Analyze docs.
151
+ Reads OpenAPI format document and divides it into several parts to generate a source file
93
152
 
94
- $ # Analyze docs
153
+ ```bash
95
154
  $ OAS_FILE="~/Desktop/swagger.yml" bundle exec rake routes:oas:analyze
96
- $ # Clean docs
97
- $ bundle exec rake routes:oas:clean
98
- $ # Deploy docs
99
- $ bundle exec rake routes:oas:deploy
100
- $ # Distribute swagger document
101
- $ bundle exec rake routes:oas:dist
102
- $ # Distribute swagger document
103
- $ PATHS_FILE="oas_docs/schema/paths/api/v1/task.yml" bundle exec rake routes:oas:dist # Distribute swagger document by specify unit paths
104
-
105
- # Display paths list
106
- $ bundle exec rake routes:oas:paths_ls
107
- # Display paths stats
108
- $ bundle exec rake routes:oas:paths_stats
109
155
  ```
110
156
 
111
157
  ## 📚 Documents
@@ -118,7 +164,7 @@ Full docs are available at https://yukihirop.github.io/r2-oas
118
164
 
119
165
  ## ❤️ Support Ruby Version
120
166
 
121
- - Ruby (>= 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin18])
167
+ - Ruby (>= 2.5.0)
122
168
 
123
169
  ## ❤️ Support Rouging
124
170
 
@@ -150,12 +196,6 @@ All settings are `optional`
150
196
 
151
197
  Full docs are available at https://yukihirop.github.io/r2-oas/#/setting/configure
152
198
 
153
- ## 💊 Life Cycle Methods (Hook Metohds)
154
-
155
- Supported hook(life cycle methods) is like this:
156
-
157
- Full docs are available at https://yukihirop.github.io/r2-oas/#/usage/use_hook_methods
158
-
159
199
  ## Bundle and Rspec with multiple ruby ​​versions
160
200
 
161
201
  #### Bundle
@@ -166,8 +206,6 @@ Full docs are available at https://yukihirop.github.io/r2-oas/#/usage/use_hook_m
166
206
  .
167
207
  .
168
208
  ===== Bundle install for All Support Ruby Result =====
169
- ruby-2.3.3: 0
170
- ruby-2.4.2: 0
171
209
  ruby-2.5.8: 0
172
210
  ruby-2.6.6: 0
173
211
  ruby-2.7.1: 0
@@ -195,8 +233,6 @@ ruby-2.7.1: 0
195
233
  .
196
234
  .
197
235
  ===== Rspec for All Support Ruby Result =====
198
- ruby-2.3.3: 0
199
- ruby-2.4.2: 0
200
236
  ruby-2.5.8: 0
201
237
  ruby-2.6.6: 0
202
238
  ruby-2.7.1: 0
@@ -1,9 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'r2-oas/version'
4
- require 'r2-oas/configuration'
5
- require 'r2-oas/errors'
6
- require 'r2-oas/schema/v3/object/public'
4
+ require 'r2-oas/public'
7
5
 
8
6
  module R2OAS
9
7
  if !defined?(::Rails)
@@ -12,14 +10,15 @@ module R2OAS
12
10
  elsif ::Rails::VERSION::STRING >= '4.2.5.1'
13
11
  extend Configuration
14
12
  require 'r2-oas/task'
15
- require 'r2-oas/lib/core_ext/hash/deep_merge'
16
- require 'r2-oas/lib/core_ext/object/blank'
13
+ require 'r2-oas/plugin/public'
14
+ require 'r2-oas/lib/core_ext/all'
17
15
 
18
16
  autoload :Base, 'r2-oas/base'
19
17
  autoload :NoImplementError, 'r2-oas/errors'
20
18
  autoload :NoFileExistsError, 'r2-oas/errors'
21
19
  autoload :NoSupportError, 'r2-oas/errors'
22
20
  autoload :Sortable, 'r2-oas/shared/all'
21
+ autoload :Deprecation, 'r2-oas/support/deprecation'
23
22
 
24
23
  module Schema
25
24
  autoload :Base, 'r2-oas/schema/base'