Skip to content

Commit

Permalink
Merge pull request #47 from tuwilof/fix_when_less_than_one
Browse files Browse the repository at this point in the history
Fix when less than one
  • Loading branch information
tuwilof authored Dec 6, 2024
2 parents efbfafd + 17156d4 commit d69b07c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change log

### 1.8.3 - 2024-12-06

* patch
* fix the non-json check of the request body if the schema is less than one
* delete homepage for fix

### 1.8.2 - 2024-04-03

* patch
Expand Down
1 change: 0 additions & 1 deletion esplanade.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Gem::Specification.new do |spec|
spec.email = ['d.efimov@fun-box.ru']

spec.summary = 'Validate requests and responses against API Blueprint specifications'
spec.homepage = 'https://github.com/tuwilof/esplanade'
spec.license = 'MIT'

spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
Expand Down
2 changes: 1 addition & 1 deletion lib/esplanade/request/validation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def initialize(doc, raw)
def valid!
raise ContentTypeIsNotJson.new(**mini_message) unless @doc.content_type == 'application/json'

@error ||= if @doc.json_schemas.size == 1
@error ||= if @doc.json_schemas.size <= 1
one_json_schema
else
more_than_one_json_schema
Expand Down
2 changes: 1 addition & 1 deletion lib/esplanade/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Esplanade
VERSION = '1.8.2'.freeze
VERSION = '1.8.3'.freeze
end

0 comments on commit d69b07c

Please sign in to comment.