Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix setting error response again. 2.0.2 #271

Merged
merged 1 commit into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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