openapi-rails 0.3.9 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11b07d542fe83151b401c7a36caca18f25c1c197
4
- data.tar.gz: 78e73108ae2b0ad1684c0c13be7f5a296e1b96ca
3
+ metadata.gz: 9d1c4996dee0f533e5deeead8e88b1d7b2a38393
4
+ data.tar.gz: 9eb5e92ce3688af3ee288812b4909c219c339988
5
5
  SHA512:
6
- metadata.gz: c3853a5e282c84dce66dd2ee948cff206eed5f3c4c9023b1d868519cbb8eddd0d896853b6ebfcc458372c2269b77fdebf64cc39a85af13c0899925b353f2763e
7
- data.tar.gz: 59184ece6abcf11fbb1eb693653a5ea12fd671e3214165c539d9cfe0824c828d0e85e074a647c02aa48127d9baff6e05b812b48301755da45f25b3885c9c5717
6
+ metadata.gz: 1f03ec375287a3213ed140dae0db15641f695172f75ec7c3024fa2ecc39098b132ba808b18bc0fe04386e54c82b035805cae53aa3711114c8d4e10419fe8e874
7
+ data.tar.gz: f268082be51bfbf45b7dbb9c4e130b5e7278ac90eefbbaf6392fb5af38a9e28152195facb99309c3b37a4f1d9c6d28d46474ab6c690aeb80cedad90c1d52fc97
@@ -1,10 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- openapi-rails (0.3.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.0.1)
16
- actionview (= 5.0.0.1)
17
- activesupport (= 5.0.0.1)
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.0.1)
23
- activesupport (= 5.0.0.1)
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
- activemodel (5.0.0.1)
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.2)
38
- concurrent-ruby (1.0.2)
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
- mongo (2.4.0)
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.1)
50
+ rails-dom-testing (2.0.2)
60
51
  activesupport (>= 4.2.0, < 6.0)
61
- nokogiri (~> 1.6.0)
52
+ nokogiri (~> 1.6)
62
53
  rails-html-sanitizer (1.0.3)
63
54
  loofah (~> 2.0)
64
- railties (5.0.0.1)
65
- actionpack (= 5.0.0.1)
66
- activesupport (= 5.0.0.1)
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.12.4
78
+ 1.13.7
data/README.md CHANGED
@@ -23,7 +23,7 @@ gem 'openapi-rails'
23
23
  For new projects we recommend to run generator to create basic setup:
24
24
 
25
25
  ```
26
- rake g openapi:config
26
+ rails g openapi:config
27
27
  ```
28
28
 
29
29
  If you have an existing project, please look through this readme file first to
@@ -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, [schema]
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
 
@@ -1,3 +1,3 @@
1
1
  module Openapi
2
- VERSION = '0.3.9'.freeze
2
+ VERSION = '0.4.0'.freeze
3
3
  end
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.3.9
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-01-22 00:00:00.000000000 Z
12
+ date: 2017-05-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: swagger-blocks