-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #284 from ahx/2.1.0
2.1.0
- Loading branch information
Showing
13 changed files
with
102 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
`bundle update` | ||
Dir.glob('Gemfile*') | ||
.reject { _1.end_with?('.lock') } | ||
.each do |filename| | ||
puts `BUNDLE_GEMFILE=#{filename} bundle update` | ||
end | ||
puts `cd benchmarks && bundle update && cd ..` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,40 @@ | ||
# frozen_string_literal: true | ||
|
||
module OpenapiFirst | ||
# @!visibility private | ||
# Base class for all errors | ||
class Error < StandardError; end | ||
# @!visibility private | ||
|
||
# Raised if YAML/JSON file was not found | ||
class FileNotFoundError < Error; end | ||
# @!visibility private | ||
|
||
# Raised if response body could not be parsed | ||
class ParseError < Error; end | ||
|
||
# @!visibility private | ||
# Raised during request validation if request was invalid | ||
class RequestInvalidError < Error | ||
def initialize(message, validated_request) | ||
super(message) | ||
@request = validated_request | ||
end | ||
|
||
# @attr_reader [OpenapiFirst::ValidatedRequest] request The validated request | ||
# @return [ValidatedRequest] The validated request | ||
attr_reader :request | ||
end | ||
|
||
# @!visibility private | ||
# Raised during request validation if request was not defined in the API description | ||
class NotFoundError < RequestInvalidError; end | ||
|
||
# @!visibility private | ||
# Raised during response validation if request was invalid | ||
class ResponseInvalidError < Error | ||
def initialize(message, validated_response) | ||
super(message) | ||
@response = validated_response | ||
end | ||
|
||
# @attr_reader [OpenapiFirst::ValidatedResponse] request The validated response | ||
# @return [ValidatedResponse] The validated response | ||
attr_reader :response | ||
end | ||
|
||
# @!visibility private | ||
# Raised during request validation if response was not defined in the API description | ||
class ResponseNotFoundError < ResponseInvalidError; end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module OpenapiFirst | ||
VERSION = '2.0.4' | ||
VERSION = '2.1.0' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters