Skip to content

Commit

Permalink
Merge pull request #271 from ahx/fix-error-response
Browse files Browse the repository at this point in the history
Fix setting error response again. 2.0.2
  • Loading branch information
ahx authored Jun 26, 2024
2 parents da6eda6 + a7e429c commit b2e7fb3
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/openapi_first/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/openapi_first/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module OpenapiFirst
VERSION = '2.0.1'
VERSION = '2.0.2'
end
2 changes: 1 addition & 1 deletion spec/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b2e7fb3

Please sign in to comment.