From b1bbd61e9933a01e1409e19efe37b46fc22a3843 Mon Sep 17 00:00:00 2001 From: Mike Fotinakis Date: Thu, 27 Aug 2015 21:44:05 -0700 Subject: [PATCH] Add test for ref transforms and bump minor version. --- README.md | 1 + lib/swagger/blocks/version.rb | 2 +- spec/lib/swagger_v2_api_declaration.json | 2 +- spec/lib/swagger_v2_blocks_spec.rb | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 799f335..7b85793 100644 --- a/README.md +++ b/README.md @@ -360,6 +360,7 @@ Throw a ★ on it! :) ## Release notes +* v1.2.0: Improved support for `$ref` Path Item Object parameters. * v1.1.3: Rename tags directive to tag for consistency. * v1.1.2: Bugfix for security definition support. * v1.1.1: Bugfix for tags node support. diff --git a/lib/swagger/blocks/version.rb b/lib/swagger/blocks/version.rb index 6ae71a5..2586391 100644 --- a/lib/swagger/blocks/version.rb +++ b/lib/swagger/blocks/version.rb @@ -1,5 +1,5 @@ module Swagger module Blocks - VERSION = '1.1.3' + VERSION = '1.2.0' end end diff --git a/spec/lib/swagger_v2_api_declaration.json b/spec/lib/swagger_v2_api_declaration.json index 1858146..3222fdc 100644 --- a/spec/lib/swagger_v2_api_declaration.json +++ b/spec/lib/swagger_v2_api_declaration.json @@ -120,7 +120,7 @@ "200": { "description": "pet response", "schema": { - "$ref": "#/definitions/Pet" + "$ref": "#/parameters/Pet" } }, "default": { diff --git a/spec/lib/swagger_v2_blocks_spec.rb b/spec/lib/swagger_v2_blocks_spec.rb index 9d16a15..00e892c 100644 --- a/spec/lib/swagger_v2_blocks_spec.rb +++ b/spec/lib/swagger_v2_blocks_spec.rb @@ -115,7 +115,8 @@ class PetControllerV2 response 200 do key :description, 'pet response' schema do - key :'$ref', :Pet + # Wrong form here, but checks that #/ strings are not transformed. + key :'$ref', '#/parameters/Pet' end end response :default do