swagger-blocks 1.1.3 → 1.2.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: 31a1a447a188f72eeed1b9d53af76f64c8d32bf3
4
- data.tar.gz: 48b4620a81451150fb45fa44ad9eeb89230798c7
3
+ metadata.gz: ab191a7e9a7e6ce98804cf2bc2758b410d45a180
4
+ data.tar.gz: 1acad4d0e8ceef63c8cccc30e0d45a0080ad0e16
5
5
  SHA512:
6
- metadata.gz: 57ab194b9a26461679e347dd4ca1fe8b5501c7fca48c6e2b61c017fc27ef560e4d9f17b97585e274ffe29b70f44d6830bb4dc44f31bc33643626b2f0279c5fc9
7
- data.tar.gz: ad364023be29b25475e9c72947afe9b2274be31c10bcafc2481f7a0132ae4a5b684d2cd7e23e0e6fbefe30871cd8e68fa4fb6cba837aecd0ef16014a9a6b03c4
6
+ metadata.gz: eb3e2ec51fe800b455c77323d6810703350def5daa5b8d6955c7e67511c76a5db08a1da20a99248050a578967ef18ab9b6f9d7ab3a276dd849278537e6059498
7
+ data.tar.gz: f05b5583475152d4e73934ac05d5ed3c8af9e0c24a1a79d7f6549fd5fb151e8c97c484ee0e4e0cdb0f64962e3a5dac8b20a653f2d4921232e2492587f8e35251
data/README.md CHANGED
@@ -360,6 +360,7 @@ Throw a ★ on it! :)
360
360
 
361
361
  ## Release notes
362
362
 
363
+ * v1.2.0: Improved support for `$ref` Path Item Object parameters.
363
364
  * v1.1.3: Rename tags directive to tag for consistency.
364
365
  * v1.1.2: Bugfix for security definition support.
365
366
  * v1.1.1: Bugfix for tags node support.
@@ -1,5 +1,5 @@
1
1
  module Swagger
2
2
  module Blocks
3
- VERSION = '1.1.3'
3
+ VERSION = '1.2.0'
4
4
  end
5
5
  end
@@ -233,7 +233,7 @@ module Swagger
233
233
  elsif is_swagger_2_0? && value.is_a?(Hash)
234
234
  result[key] = {}
235
235
  value.each_pair {|k, v| result[key][k] = (v.respond_to?(:as_json) ? v.as_json : v) }
236
- elsif is_swagger_2_0? && key.to_s.eql?('$ref') && (value.to_s !~ %r{^#/definitions/})
236
+ elsif is_swagger_2_0? && key.to_s.eql?('$ref') && (value.to_s !~ %r{^#/})
237
237
  result[key] = "#/definitions/#{value}"
238
238
  else
239
239
  result[key] = value
@@ -753,4 +753,4 @@ module Swagger
753
753
  end
754
754
  end
755
755
  end
756
- end
756
+ end
@@ -120,7 +120,7 @@
120
120
  "200": {
121
121
  "description": "pet response",
122
122
  "schema": {
123
- "$ref": "#/definitions/Pet"
123
+ "$ref": "#/parameters/Pet"
124
124
  }
125
125
  },
126
126
  "default": {
@@ -115,7 +115,8 @@ class PetControllerV2
115
115
  response 200 do
116
116
  key :description, 'pet response'
117
117
  schema do
118
- key :'$ref', :Pet
118
+ # Wrong form here, but checks that #/ strings are not transformed.
119
+ key :'$ref', '#/parameters/Pet'
119
120
  end
120
121
  end
121
122
  response :default do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swagger-blocks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Fotinakis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-15 00:00:00.000000000 Z
11
+ date: 2015-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler