chore(deps): update dependency openapi_first to v2 #754
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
"~>0.20"
->"~>2.0"
Release Notes
ahx/openapi_first (openapi_first)
v2.1.1
Compare Source
v2.1.0
Compare Source
OpenapiFirst::Definition#[]
to access the raw Hash representation of the OAS document. Example:api['components'].fetch('schemas', 'Stations')
v2.0.4
Compare Source
v2.0.3
Compare Source
Fix
OpenapiFirst::Test.register
https://github.com/ahx/openapi_first/issues/276Request validation middleware now accepts
error_response: false
do disable rendering a response. This is useful if you just want to collect metrics (via hooks) during a migration phase.v2.0.2
Compare Source
v2.0.0
Compare Source
New Features
Test Assertions! 📋 You can now use
assert_api_conform
for contract testing in your rack-test / Rails integration tests. See Readme for details.New option for
Middlewares::ResponseValidation
::raise_error
(default: true). If set tofalse
, the middleware will not aise an error if the response is invalid. 🤫Hooks 🪝🪝 (see Readme for details). You can use these to collect metrics, write error logs etc.:
after_request_validation
after_response_validation
after_request_body_property_validation
after_request_parameter_property_validation
Exceptions such as
OpenapiFirst::ResponseInvalidError
not respond to#request
to get information about the validated request 💁🏻Performance improvements 🚴🏻♀️
Validation failures returned by
ValidatedRequest#error
always returns a#message
. So you can callmy_validated_request.error.message if validated_request.invalid?
and always get a human-readable error message. 😴Breaking Changes
Manual validation
v1.4.3
Compare Source
v1.4.2
Compare Source
v1.4.1
Compare Source
v1.4.0
Changed
Some redundant methods to validate or inspect requests/responses will be removed in 2.0. So this release deprecates these methods.
OpenapiFirst::RuntimeRequest#validate
,#validate!
,#validate_response
,#response
.Use
OpenapiFirst.load('openapi.yaml').validate_request(rack_request, raise_error: true/false)
insteadOpenapiFirst::RuntimeResponse#validate
.Use
OpenapiFirst.load('openapi.yaml').validate_response(rack_request, rack_response, raise_error: true/false)
instead.v1.3.6
v1.3.5
Compare Source
/some/{kebab-cased}
path parameters (#245)v1.3.4
Compare Source
Operation#query_parameters
,Operation#path_parameters
etc. now only returns parameters that are defined on the operation level not on the PathItem. UsePathItem#query_parameters
to get those.v1.3.2
Compare Source
Changed
Fixed
v1.3.1
Compare Source
v1.3.0
Compare Source
No breaking changes
New features:
Definition#validate_request
,Definition#validate_response
,RuntimeRequest#validate_response
(see readme) #222Fixes:
v1.2.1
Compare Source
v1.1.1
Compare Source
ActionDispatch::Response::RackBody
)known?
,status
,body
,headers
,content_type
methods to inspect the parsed response (RuntimeResponse
)OpenapiFirst::ParseError
which is raised by low-level interfaces likerequest.body
if the body could not be parsed.v1.0.0
Compare Source
env[OpenapiFirst::OPERATION]
. Useenv[OpenapiFirst::REQUEST]
instead.env[OpenapiFirst::REQUEST_BODY]
,env[OpenapiFirst::PARAMS]
. Useenv[OpenapiFirst::REQUEST].body env[OpenapiFirst::REQUEST].params
instead./{a}..{b}
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.