zero-rails_openapi 1.5.3 → 1.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +41 -41
- data/README.md +9 -9
- data/README_zh.md +4 -2
- data/lib/open_api/version.rb +1 -1
- data/zero-rails_openapi.gemspec +2 -2
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a1ad9dd33921ca9718211e6c4b3a4952e7c9462
|
4
|
+
data.tar.gz: 5983dbcfc189d115bcd79b6b0495b77f450af71e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d0b87971da06837b09304c04d8319bced499990d3634f8146cee33e87ee914c34995a648bc2b019606a8502c38759c593194e334a5745ea72be14c3b4f1c498
|
7
|
+
data.tar.gz: 39055363665e740d3a88d2672622fbc5f5d80949dc1973b7d3346b4a52522a6e1ab86136d1584c517f0229af27a83b6784013a7dd9b63037a69f027870891183
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
## [Unreleased]
|
4
4
|
|
5
|
+
## [1.5.4] - 2018/2/15 - [view diff](https://github.com/zhandao/zero-rails_openapi/compare/v1.5.3...v1.5.4)
|
6
|
+
|
7
|
+
Thanks to @austbot, fix - colorize fails at runtime.
|
8
|
+
|
5
9
|
## [1.5.3] - 2018/1/25 - [view diff](https://github.com/zhandao/zero-rails_openapi/compare/v1.5.2...v1.5.3)
|
6
10
|
|
7
11
|
## Added
|
data/Gemfile.lock
CHANGED
@@ -1,46 +1,47 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
zero-rails_openapi (1.5.
|
4
|
+
zero-rails_openapi (1.5.4)
|
5
5
|
activesupport (>= 3)
|
6
|
+
colorize (= 0.8.1)
|
6
7
|
rails (>= 3)
|
7
8
|
|
8
9
|
GEM
|
9
10
|
remote: https://rubygems.org/
|
10
11
|
specs:
|
11
|
-
actioncable (5.1.
|
12
|
-
actionpack (= 5.1.
|
12
|
+
actioncable (5.1.5)
|
13
|
+
actionpack (= 5.1.5)
|
13
14
|
nio4r (~> 2.0)
|
14
15
|
websocket-driver (~> 0.6.1)
|
15
|
-
actionmailer (5.1.
|
16
|
-
actionpack (= 5.1.
|
17
|
-
actionview (= 5.1.
|
18
|
-
activejob (= 5.1.
|
16
|
+
actionmailer (5.1.5)
|
17
|
+
actionpack (= 5.1.5)
|
18
|
+
actionview (= 5.1.5)
|
19
|
+
activejob (= 5.1.5)
|
19
20
|
mail (~> 2.5, >= 2.5.4)
|
20
21
|
rails-dom-testing (~> 2.0)
|
21
|
-
actionpack (5.1.
|
22
|
-
actionview (= 5.1.
|
23
|
-
activesupport (= 5.1.
|
22
|
+
actionpack (5.1.5)
|
23
|
+
actionview (= 5.1.5)
|
24
|
+
activesupport (= 5.1.5)
|
24
25
|
rack (~> 2.0)
|
25
26
|
rack-test (>= 0.6.3)
|
26
27
|
rails-dom-testing (~> 2.0)
|
27
28
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
28
|
-
actionview (5.1.
|
29
|
-
activesupport (= 5.1.
|
29
|
+
actionview (5.1.5)
|
30
|
+
activesupport (= 5.1.5)
|
30
31
|
builder (~> 3.1)
|
31
32
|
erubi (~> 1.4)
|
32
33
|
rails-dom-testing (~> 2.0)
|
33
34
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
34
|
-
activejob (5.1.
|
35
|
-
activesupport (= 5.1.
|
35
|
+
activejob (5.1.5)
|
36
|
+
activesupport (= 5.1.5)
|
36
37
|
globalid (>= 0.3.6)
|
37
|
-
activemodel (5.1.
|
38
|
-
activesupport (= 5.1.
|
39
|
-
activerecord (5.1.
|
40
|
-
activemodel (= 5.1.
|
41
|
-
activesupport (= 5.1.
|
38
|
+
activemodel (5.1.5)
|
39
|
+
activesupport (= 5.1.5)
|
40
|
+
activerecord (5.1.5)
|
41
|
+
activemodel (= 5.1.5)
|
42
|
+
activesupport (= 5.1.5)
|
42
43
|
arel (~> 8.0)
|
43
|
-
activesupport (5.1.
|
44
|
+
activesupport (5.1.5)
|
44
45
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
45
46
|
i18n (~> 0.7)
|
46
47
|
minitest (~> 5.1)
|
@@ -55,10 +56,10 @@ GEM
|
|
55
56
|
erubi (1.7.0)
|
56
57
|
globalid (0.4.1)
|
57
58
|
activesupport (>= 4.2.0)
|
58
|
-
i18n (0.9.
|
59
|
+
i18n (0.9.5)
|
59
60
|
concurrent-ruby (~> 1.0)
|
60
61
|
json (2.1.0)
|
61
|
-
loofah (2.
|
62
|
+
loofah (2.2.0)
|
62
63
|
crass (~> 1.0.2)
|
63
64
|
nokogiri (>= 1.5.9)
|
64
65
|
mail (2.7.0)
|
@@ -66,33 +67,33 @@ GEM
|
|
66
67
|
method_source (0.9.0)
|
67
68
|
mini_mime (1.0.0)
|
68
69
|
mini_portile2 (2.3.0)
|
69
|
-
minitest (5.11.
|
70
|
+
minitest (5.11.3)
|
70
71
|
nio4r (2.2.0)
|
71
|
-
nokogiri (1.8.
|
72
|
+
nokogiri (1.8.2)
|
72
73
|
mini_portile2 (~> 2.3.0)
|
73
|
-
rack (2.0.
|
74
|
+
rack (2.0.4)
|
74
75
|
rack-test (0.8.2)
|
75
76
|
rack (>= 1.0, < 3)
|
76
|
-
rails (5.1.
|
77
|
-
actioncable (= 5.1.
|
78
|
-
actionmailer (= 5.1.
|
79
|
-
actionpack (= 5.1.
|
80
|
-
actionview (= 5.1.
|
81
|
-
activejob (= 5.1.
|
82
|
-
activemodel (= 5.1.
|
83
|
-
activerecord (= 5.1.
|
84
|
-
activesupport (= 5.1.
|
77
|
+
rails (5.1.5)
|
78
|
+
actioncable (= 5.1.5)
|
79
|
+
actionmailer (= 5.1.5)
|
80
|
+
actionpack (= 5.1.5)
|
81
|
+
actionview (= 5.1.5)
|
82
|
+
activejob (= 5.1.5)
|
83
|
+
activemodel (= 5.1.5)
|
84
|
+
activerecord (= 5.1.5)
|
85
|
+
activesupport (= 5.1.5)
|
85
86
|
bundler (>= 1.3.0)
|
86
|
-
railties (= 5.1.
|
87
|
+
railties (= 5.1.5)
|
87
88
|
sprockets-rails (>= 2.0.0)
|
88
89
|
rails-dom-testing (2.0.3)
|
89
90
|
activesupport (>= 4.2.0)
|
90
91
|
nokogiri (>= 1.6)
|
91
92
|
rails-html-sanitizer (1.0.3)
|
92
93
|
loofah (~> 2.0)
|
93
|
-
railties (5.1.
|
94
|
-
actionpack (= 5.1.
|
95
|
-
activesupport (= 5.1.
|
94
|
+
railties (5.1.5)
|
95
|
+
actionpack (= 5.1.5)
|
96
|
+
activesupport (= 5.1.5)
|
96
97
|
method_source
|
97
98
|
rake (>= 0.8.7)
|
98
99
|
thor (>= 0.18.1, < 2.0)
|
@@ -124,7 +125,7 @@ GEM
|
|
124
125
|
sprockets (>= 3.0.0)
|
125
126
|
thor (0.20.0)
|
126
127
|
thread_safe (0.3.6)
|
127
|
-
tzinfo (1.2.
|
128
|
+
tzinfo (1.2.5)
|
128
129
|
thread_safe (~> 0.1)
|
129
130
|
websocket-driver (0.6.5)
|
130
131
|
websocket-extensions (>= 0.1.0)
|
@@ -135,11 +136,10 @@ PLATFORMS
|
|
135
136
|
|
136
137
|
DEPENDENCIES
|
137
138
|
bundler (~> 1.16.a)
|
138
|
-
colorize
|
139
139
|
rake (~> 10.0)
|
140
140
|
rspec (~> 3.0)
|
141
141
|
simplecov
|
142
142
|
zero-rails_openapi!
|
143
143
|
|
144
144
|
BUNDLED WITH
|
145
|
-
1.16.
|
145
|
+
1.16.1
|
data/README.md
CHANGED
@@ -7,16 +7,15 @@
|
|
7
7
|
[![Gitter Chat](https://badges.gitter.im/zero-rails_openapi/Lobby.svg)](https://gitter.im/zero-rails_openapi/Lobby)
|
8
8
|
[![Help Contribute to Open Source](https://www.codetriage.com/zhandao/zero-rails_openapi/badges/users.svg)](https://www.codetriage.com/zhandao/zero-rails_openapi)
|
9
9
|
|
10
|
-
Concise DSL for generating OpenAPI Specification 3 (**OAS3**, formerly Swagger3) JSON documentation for Rails application
|
11
|
-
then you can use Swagger UI 3.2.0+ to show the documentation.
|
10
|
+
Concise DSL for generating OpenAPI Specification 3 (**OAS3**, formerly Swagger3) JSON documentation for Rails application.
|
12
11
|
|
13
12
|
## Contributing
|
14
13
|
|
15
14
|
**Hi, here is ZhanDao = ▽ =
|
16
|
-
|
17
|
-
I'm looking forward to your issue and PR
|
15
|
+
It may be a very useful tool if you want to write API document clearly.
|
16
|
+
I'm looking forward to your issue and PR!**
|
18
17
|
|
19
|
-
|
18
|
+
If you have any questions, please read the test code first.
|
20
19
|
such as [api DSL](spec/api_info_obj_spec.rb) and [schema Obj](spec/oas_objs/schema_obj_spec.rb).
|
21
20
|
|
22
21
|
## Table of Contents
|
@@ -113,6 +112,8 @@
|
|
113
112
|
require 'open_api'
|
114
113
|
|
115
114
|
OpenApi::Config.tap do |c|
|
115
|
+
c.file_output_path = 'public/open_api'
|
116
|
+
|
116
117
|
c.instance_eval do
|
117
118
|
open_api :homepage_api, base_doc_class: ApiDoc
|
118
119
|
info version: '1.0.0', title: 'Homepage APIs'
|
@@ -121,7 +122,7 @@
|
|
121
122
|
```
|
122
123
|
|
123
124
|
For more detailed configuration: [open_api.rb](documentation/examples/open_api.rb)
|
124
|
-
See all the settings
|
125
|
+
See all the settings options: [config.rb](lib/open_api/config.rb)
|
125
126
|
See all the Document Definition DSL: [config_dsl.rb](lib/open_api/config_dsl.rb)
|
126
127
|
|
127
128
|
## Usage - DSL
|
@@ -223,8 +224,7 @@
|
|
223
224
|
|
224
225
|
#### (5) `api` [required]
|
225
226
|
|
226
|
-
Define the specified API
|
227
|
-
(or we could say controller action).
|
227
|
+
Define the specified API (or we could say controller action).
|
228
228
|
|
229
229
|
```ruby
|
230
230
|
# method signature
|
@@ -270,7 +270,7 @@
|
|
270
270
|
# method signature
|
271
271
|
desc(desc, param_descs = { })
|
272
272
|
# usage
|
273
|
-
desc
|
273
|
+
desc "current API's description",
|
274
274
|
id: 'desc of the parameter :id',
|
275
275
|
email: 'desc of the parameter :email'
|
276
276
|
```
|
data/README_zh.md
CHANGED
@@ -17,8 +17,8 @@
|
|
17
17
|
有什么想法敬请 PR,谢过!
|
18
18
|
另外,走过路过不妨来个 star?**
|
19
19
|
|
20
|
-
|
21
|
-
|
20
|
+
另外,如果对其行为表现有任何疑惑,请先阅读测试代码,这其中已表明我的大多数考量。
|
21
|
+
可一读:[api DSL](spec/api_info_obj_spec.rb) 以及 [schema Obj](spec/oas_objs/schema_obj_spec.rb)。
|
22
22
|
|
23
23
|
|
24
24
|
## Table of Contents
|
@@ -108,6 +108,8 @@
|
|
108
108
|
require 'open_api'
|
109
109
|
|
110
110
|
OpenApi::Config.tap do |c|
|
111
|
+
c.file_output_path = 'public/open_api'
|
112
|
+
|
111
113
|
c.instance_eval do
|
112
114
|
open_api :homepage_api, base_doc_class: ApiDoc
|
113
115
|
info version: '1.0.0', title: 'Homepage APIs'
|
data/lib/open_api/version.rb
CHANGED
data/zero-rails_openapi.gemspec
CHANGED
@@ -27,8 +27,8 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.add_development_dependency 'rake', '~> 10.0'
|
28
28
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
29
29
|
spec.add_development_dependency 'simplecov'
|
30
|
-
|
31
|
-
|
30
|
+
|
31
|
+
spec.add_runtime_dependency 'colorize', '0.8.1'
|
32
32
|
spec.add_runtime_dependency 'rails', '>= 3'
|
33
33
|
spec.add_runtime_dependency 'activesupport', '>= 3'
|
34
34
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zero-rails_openapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zhandao
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: colorize
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
76
|
-
type: :
|
75
|
+
version: 0.8.1
|
76
|
+
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 0.8.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rails
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
178
|
version: '0'
|
179
179
|
requirements: []
|
180
180
|
rubyforge_project:
|
181
|
-
rubygems_version: 2.6.
|
181
|
+
rubygems_version: 2.6.13
|
182
182
|
signing_key:
|
183
183
|
specification_version: 4
|
184
184
|
summary: Concise DSL for generating OpenAPI3 documentation.
|