openapi-rails 0.3.9 → 0.4.0
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/Gemfile.lock +16 -25
- data/README.md +1 -1
- data/lib/openapi/mongoid/spec_builder.rb +17 -3
- data/lib/openapi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9d1c4996dee0f533e5deeead8e88b1d7b2a38393
|
|
4
|
+
data.tar.gz: 9eb5e92ce3688af3ee288812b4909c219c339988
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1f03ec375287a3213ed140dae0db15641f695172f75ec7c3024fa2ecc39098b132ba808b18bc0fe04386e54c82b035805cae53aa3711114c8d4e10419fe8e874
|
|
7
|
+
data.tar.gz: f268082be51bfbf45b7dbb9c4e130b5e7278ac90eefbbaf6392fb5af38a9e28152195facb99309c3b37a4f1d9c6d28d46474ab6c690aeb80cedad90c1d52fc97
|
data/Gemfile.lock
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
openapi-rails (0.3.
|
|
4
|
+
openapi-rails (0.3.9)
|
|
5
5
|
bson_ext
|
|
6
6
|
has_scope
|
|
7
|
-
mongoid
|
|
8
7
|
responders (~> 2.3)
|
|
9
8
|
swagger-blocks (~> 2.0)
|
|
10
9
|
yajl-ruby
|
|
@@ -12,30 +11,27 @@ PATH
|
|
|
12
11
|
GEM
|
|
13
12
|
remote: http://rubygems.org/
|
|
14
13
|
specs:
|
|
15
|
-
actionpack (5.0.
|
|
16
|
-
actionview (= 5.0.
|
|
17
|
-
activesupport (= 5.0.
|
|
14
|
+
actionpack (5.0.1)
|
|
15
|
+
actionview (= 5.0.1)
|
|
16
|
+
activesupport (= 5.0.1)
|
|
18
17
|
rack (~> 2.0)
|
|
19
18
|
rack-test (~> 0.6.3)
|
|
20
19
|
rails-dom-testing (~> 2.0)
|
|
21
20
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
|
22
|
-
actionview (5.0.
|
|
23
|
-
activesupport (= 5.0.
|
|
21
|
+
actionview (5.0.1)
|
|
22
|
+
activesupport (= 5.0.1)
|
|
24
23
|
builder (~> 3.1)
|
|
25
24
|
erubis (~> 2.7.0)
|
|
26
25
|
rails-dom-testing (~> 2.0)
|
|
27
26
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
|
28
|
-
|
|
29
|
-
activesupport (= 5.0.0.1)
|
|
30
|
-
activesupport (5.0.0.1)
|
|
27
|
+
activesupport (5.0.1)
|
|
31
28
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
32
29
|
i18n (~> 0.7)
|
|
33
30
|
minitest (~> 5.1)
|
|
34
31
|
tzinfo (~> 1.1)
|
|
35
|
-
bson (4.2.0)
|
|
36
32
|
bson_ext (1.5.1)
|
|
37
|
-
builder (3.2.
|
|
38
|
-
concurrent-ruby (1.0.
|
|
33
|
+
builder (3.2.3)
|
|
34
|
+
concurrent-ruby (1.0.4)
|
|
39
35
|
erubis (2.7.0)
|
|
40
36
|
has_scope (0.7.0)
|
|
41
37
|
actionpack (>= 4.1, < 5.1)
|
|
@@ -46,24 +42,19 @@ GEM
|
|
|
46
42
|
method_source (0.8.2)
|
|
47
43
|
mini_portile2 (2.1.0)
|
|
48
44
|
minitest (5.10.1)
|
|
49
|
-
|
|
50
|
-
bson (~> 4.2.0)
|
|
51
|
-
mongoid (6.0.3)
|
|
52
|
-
activemodel (~> 5.0)
|
|
53
|
-
mongo (~> 2.3)
|
|
54
|
-
nokogiri (1.6.8.1)
|
|
45
|
+
nokogiri (1.7.0.1)
|
|
55
46
|
mini_portile2 (~> 2.1.0)
|
|
56
47
|
rack (2.0.1)
|
|
57
48
|
rack-test (0.6.3)
|
|
58
49
|
rack (>= 1.0)
|
|
59
|
-
rails-dom-testing (2.0.
|
|
50
|
+
rails-dom-testing (2.0.2)
|
|
60
51
|
activesupport (>= 4.2.0, < 6.0)
|
|
61
|
-
nokogiri (~> 1.6
|
|
52
|
+
nokogiri (~> 1.6)
|
|
62
53
|
rails-html-sanitizer (1.0.3)
|
|
63
54
|
loofah (~> 2.0)
|
|
64
|
-
railties (5.0.
|
|
65
|
-
actionpack (= 5.0.
|
|
66
|
-
activesupport (= 5.0.
|
|
55
|
+
railties (5.0.1)
|
|
56
|
+
actionpack (= 5.0.1)
|
|
57
|
+
activesupport (= 5.0.1)
|
|
67
58
|
method_source
|
|
68
59
|
rake (>= 0.8.7)
|
|
69
60
|
thor (>= 0.18.1, < 2.0)
|
|
@@ -84,4 +75,4 @@ DEPENDENCIES
|
|
|
84
75
|
openapi-rails!
|
|
85
76
|
|
|
86
77
|
BUNDLED WITH
|
|
87
|
-
1.
|
|
78
|
+
1.13.7
|
data/README.md
CHANGED
|
@@ -3,15 +3,13 @@ module Openapi
|
|
|
3
3
|
include Swagger::Blocks
|
|
4
4
|
|
|
5
5
|
def self.build_specification(config, controller_classes)
|
|
6
|
-
schema = Rails.env.production? ? 'https' : 'http'
|
|
7
|
-
|
|
8
6
|
swagger_root do
|
|
9
7
|
key :swagger, '2.0'
|
|
10
8
|
key :host, ENV['HOST'] || 'localhost:3000'
|
|
11
9
|
key :basePath, config[:base_path] || '/api'
|
|
12
10
|
key :consumes, %w(application/json)
|
|
13
11
|
key :produces, %w(application/json text/csv)
|
|
14
|
-
key :schemes, [
|
|
12
|
+
key :schemes, ['https', 'http']
|
|
15
13
|
|
|
16
14
|
info do
|
|
17
15
|
key :title, config[:title] || 'Default'
|
|
@@ -307,6 +305,14 @@ module Openapi
|
|
|
307
305
|
key :'$ref', name
|
|
308
306
|
end
|
|
309
307
|
end
|
|
308
|
+
|
|
309
|
+
response 422 do
|
|
310
|
+
key :description, 'Unprocessable entity error'
|
|
311
|
+
schema do
|
|
312
|
+
key :'$ref', name
|
|
313
|
+
end
|
|
314
|
+
end
|
|
315
|
+
|
|
310
316
|
end
|
|
311
317
|
end
|
|
312
318
|
end
|
|
@@ -411,6 +417,14 @@ module Openapi
|
|
|
411
417
|
key :'$ref', name
|
|
412
418
|
end
|
|
413
419
|
end
|
|
420
|
+
|
|
421
|
+
response 422 do
|
|
422
|
+
key :description, 'Unprocessable entity error'
|
|
423
|
+
schema do
|
|
424
|
+
key :'$ref', name
|
|
425
|
+
end
|
|
426
|
+
end
|
|
427
|
+
|
|
414
428
|
end
|
|
415
429
|
end
|
|
416
430
|
|
data/lib/openapi/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: openapi-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alexander Kravets
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2017-
|
|
12
|
+
date: 2017-05-24 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: swagger-blocks
|