zero-rails_openapi 2.0.0 → 2.0.1

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: 275729646bbe765cc93239a7635934be22850304
4
- data.tar.gz: 48e99273f58abd736763251c7eeccdde63d1b4a6
3
+ metadata.gz: d3c5097304de83d6bf030739ecaa8286afa404cb
4
+ data.tar.gz: 5eb1fdb277d987bea4f7248e1ca5a8b4eb19936a
5
5
  SHA512:
6
- metadata.gz: 3d4fcda408a1af25b3d047a0720921688e4f590c7af728982bb0e4c2e0cad562dfbe3c372b4f4a82aa405c715ec1698f3b00ef2998d8a7830dc64c1fec8d90e7
7
- data.tar.gz: d0a1461de6816d79c0f7c4a95ce295d7fa5f1aff7c7fbbce34563770a9be52e2b26d0c3847721febc7ca679d7a286fb3da3e5f3fc755187e77d32523c553f9ef
6
+ metadata.gz: 95628e9b15a0f30adfc229625c6d5813778dc5b6d13959c515e8afbeddc00ae8d35a635caf93c4328773ce2aaff6a859f78276c70af582fd797acdba6842462a
7
+ data.tar.gz: 32891874cebfc0c4977d0ef550cf24a874493a184d554282cce16a2795079cf68c645ac78039ef9124745293d14914c2b43a6a472621a4187c8ab066a878dc17
data/README.md CHANGED
@@ -452,7 +452,7 @@
452
452
 
453
453
  ```ruby
454
454
  # ** Method Signature
455
- response code, desc, media_type = nil, data: { }
455
+ response code, desc, media_type = nil, data: { }, **options
456
456
  # ** Usage
457
457
  resp 200, 'success', :json, data: { name: 'test' }
458
458
  response 200, 'query result', :pdf, data: File
@@ -95,8 +95,8 @@ module OpenApi
95
95
  form data: { name => schema }
96
96
  end
97
97
 
98
- def response code, desc, media_type = nil, data: { }
99
- (self[:responses][code] ||= ResponseObj.new(desc)).absorb(desc, media_type, { data: data })
98
+ def response code, desc, media_type = nil, data: { }, **options
99
+ (self[:responses][code] ||= ResponseObj.new(desc)).absorb(desc, media_type, { data: data, **options })
100
100
  end
101
101
 
102
102
  alias_method :resp, :response
@@ -49,8 +49,8 @@ module OpenApi
49
49
  arrow_enable :body
50
50
  arrow_enable :body!
51
51
 
52
- def response component_key, desc, media_type = nil, data: { }
53
- (self[:responses][component_key] ||= ResponseObj.new(desc)).absorb(desc, media_type, { data: data })
52
+ def response component_key, desc, media_type = nil, data: { }, **options
53
+ (self[:responses][component_key] ||= ResponseObj.new(desc)).absorb(desc, media_type, { data: data, **options })
54
54
  end
55
55
 
56
56
  alias_method :resp, :response
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenApi
4
- VERSION = '2.0.0'
4
+ VERSION = '2.0.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zero-rails_openapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - zhandao