From f5a83abe14bed15746effca645afce96b1b70556 Mon Sep 17 00:00:00 2001 From: zhandao Date: Fri, 6 Apr 2018 15:47:33 +0800 Subject: [PATCH] [release] version 1.5.7 --- CHANGELOG.md | 11 +++++++++++ Gemfile.lock | 2 +- lib/open_api/generator.rb | 5 +++-- lib/open_api/version.rb | 2 +- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3aca91..58f50e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ ## [Unreleased] +## [1.5.7] - 2018/4/6 - [view diff](https://github.com/zhandao/zero-rails_openapi/compare/v1.5.6...v1.5.7) + +## Changed + +1. issue [#16](#https://github.com/zhandao/zero-rails_openapi/issues/16) DSL in `base_doc_class` can not be generated. + +## Fixed + +1. issue [#15](#https://github.com/zhandao/zero-rails_openapi/issues/15) colorize was not required. +2. securitySchemes defined by config DSL was not be generated. + ## [1.5.6] - 2018/3/23 - [view diff](https://github.com/zhandao/zero-rails_openapi/compare/v1.5.5...v1.5.6) ## Changed diff --git a/Gemfile.lock b/Gemfile.lock index eec8b64..0970900 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - zero-rails_openapi (1.5.6) + zero-rails_openapi (1.5.7) activesupport (>= 3) colorize rails (>= 3) diff --git a/lib/open_api/generator.rb b/lib/open_api/generator.rb index dfc84a0..2c091c4 100644 --- a/lib/open_api/generator.rb +++ b/lib/open_api/generator.rb @@ -28,8 +28,9 @@ def generate_doc(doc_name) doc = { openapi: '3.0.0', **settings.slice(:info, :servers) }.merge!( security: settings[:global_security], tags: [ ], paths: { }, components: { - securitySchemes: { }, schemas: { }, parameters: { }, requestBodies: { } - }.merge!(settings[:components] || { }) + securitySchemes: settings[:securitySchemes] || { }, + schemas: { }, parameters: { }, requestBodies: { } + } ) [(bdc = settings[:base_doc_class]), *bdc.descendants].each do |ctrl| diff --git a/lib/open_api/version.rb b/lib/open_api/version.rb index da62b18..7c06934 100644 --- a/lib/open_api/version.rb +++ b/lib/open_api/version.rb @@ -1,3 +1,3 @@ module OpenApi - VERSION = '1.5.6' + VERSION = '1.5.7' end