From a7e429cbce32bf7970b4cb831f824e36517f8973 Mon Sep 17 00:00:00 2001 From: Andreas Haller Date: Wed, 26 Jun 2024 10:19:20 +0200 Subject: [PATCH] Fix setting error response again. 2.0.2 --- CHANGELOG.md | 4 +++- Gemfile.lock | 2 +- benchmarks/Gemfile.lock | 2 +- lib/openapi_first/configuration.rb | 2 +- lib/openapi_first/version.rb | 2 +- spec/configuration_spec.rb | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb50d13..a1d47b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,12 @@ ## Unreleased -## 2.0.1 +## 2.0.2 - Fix setting custom error response (thanks @gobijan) +## 2.0.1 (Janked) + ## 2.0.0 ### New Features diff --git a/Gemfile.lock b/Gemfile.lock index 51eca37..65711da 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - openapi_first (2.0.1) + openapi_first (2.0.2) hana (~> 1.3) json_schemer (>= 2.1, < 3.0) multi_json (~> 1.15) diff --git a/benchmarks/Gemfile.lock b/benchmarks/Gemfile.lock index 6819a98..7872021 100644 --- a/benchmarks/Gemfile.lock +++ b/benchmarks/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - openapi_first (2.0.1) + openapi_first (2.0.2) hana (~> 1.3) json_schemer (>= 2.1, < 3.0) multi_json (~> 1.15) diff --git a/lib/openapi_first/configuration.rb b/lib/openapi_first/configuration.rb index cb91bad..832c514 100644 --- a/lib/openapi_first/configuration.rb +++ b/lib/openapi_first/configuration.rb @@ -34,7 +34,7 @@ def clone def request_validation_error_response=(mod) @request_validation_error_response = if mod.is_a?(Symbol) - OpenapiFirst.find_error_response(:default) + OpenapiFirst.find_error_response(mod) else mod end diff --git a/lib/openapi_first/version.rb b/lib/openapi_first/version.rb index 59297a9..f220e4c 100644 --- a/lib/openapi_first/version.rb +++ b/lib/openapi_first/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module OpenapiFirst - VERSION = '2.0.1' + VERSION = '2.0.2' end diff --git a/spec/configuration_spec.rb b/spec/configuration_spec.rb index 346dfd5..16f2442 100644 --- a/spec/configuration_spec.rb +++ b/spec/configuration_spec.rb @@ -54,7 +54,7 @@ it 'sets the error response' do config = OpenapiFirst::Configuration.new config.request_validation_error_response = :jsonapi - expect(config.request_validation_error_response).to be(OpenapiFirst::ErrorResponses::Default) + expect(config.request_validation_error_response).to be(OpenapiFirst::ErrorResponses::Jsonapi) end end