swagger-blocks 1.3.3 → 1.3.4

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: 2873ec48557e17844d3484479b9bf11a32305299
4
- data.tar.gz: c37cefb45dd5ba969c60d36fd841673a2b5675c3
3
+ metadata.gz: e1f287d8e209522490c3d90b62948e11902c2926
4
+ data.tar.gz: 0d22ea28d1a2370ae8d896709b4ea52f3e66c221
5
5
  SHA512:
6
- metadata.gz: 9f0e29229dedb44d9b17629417ed2a959f6ef33103c1a33db1d99ba769ef3221b8f02fb7149c98f13510a37b6e69f8129416bc6265cf87b7b27beaf06a6b68eb
7
- data.tar.gz: 86d62c052a3e4934756c51e33b68e50611365cc7e6dcc1cb591495c37749176bef911af487d16747830bc12662c725959918e64d174d217c1bd47a06da4d8c79
6
+ metadata.gz: aacf4e7ca9eb945bda88b89d3bdf4869130a63f5667caf305efcefd4658b973faa112e695d24aa43942ad68843db120c6399817f8598a16688dcfd96cd14dcaa
7
+ data.tar.gz: ce5b0633b5e74fe5cd6a2e4971d0086ee5089d8b7b266677ed42c16e1c3754eb3562ead1e4b1a892979b25bde6d72339b900472766f6d5cf87765d3a790ba4ac
data/README.md CHANGED
@@ -413,6 +413,7 @@ Throw a ★ on it! :)
413
413
 
414
414
  ## Release notes
415
415
 
416
+ * v1.3.4: Fix support for fully-qualified URIs in `$ref` values.
416
417
  * v1.3.3: Bugfix to allow `parameter` inside `swagger_path`.
417
418
  * v1.3.2: Bugfix to allow `property` inside `items` for rare extended schema uses.
418
419
  * v1.3.1: Bugfix to allow nested objects via `property` nested in `property`.
@@ -234,7 +234,7 @@ module Swagger
234
234
  elsif is_swagger_2_0? && value.is_a?(Hash)
235
235
  result[key] = {}
236
236
  value.each_pair {|k, v| result[key][k] = (v.respond_to?(:as_json) ? v.as_json : v) }
237
- elsif is_swagger_2_0? && key.to_s.eql?('$ref') && (value.to_s !~ %r{^#/})
237
+ elsif is_swagger_2_0? && key.to_s.eql?('$ref') && (value.to_s !~ %r{^#/|https?://})
238
238
  result[key] = "#/definitions/#{value}"
239
239
  else
240
240
  result[key] = value
@@ -1,5 +1,5 @@
1
1
  module Swagger
2
2
  module Blocks
3
- VERSION = '1.3.3'
3
+ VERSION = '1.3.4'
4
4
  end
5
5
  end
@@ -126,7 +126,7 @@
126
126
  "default": {
127
127
  "description": "unexpected error",
128
128
  "schema": {
129
- "$ref": "#/definitions/ErrorModel"
129
+ "$ref": "http://example.com/schema.json#/definitions/ErrorModel"
130
130
  }
131
131
  }
132
132
  }
@@ -114,7 +114,7 @@ class PetControllerV2
114
114
  end
115
115
  response :default, description: 'unexpected error' do
116
116
  schema do
117
- key :'$ref', :ErrorModel
117
+ key :'$ref', 'http://example.com/schema.json#/definitions/ErrorModel'
118
118
  end
119
119
  end
120
120
  end
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.3.3
4
+ version: 1.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Fotinakis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-29 00:00:00.000000000 Z
11
+ date: 2016-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler