git.iko.soy/typeable/compaREST
on master help sign in
Fixed boolean/number bug in schema (#74)
commitdf1f84172102a280b1e2819e75728ea3c0fb17b6 authoriko <ilyakooo0@gmail.com> dateMon 31 May 2021, 17:20 (5 years ago) parent6e454bc
2 files changed+3−3
src/OpenAPI/Checker/Validate/Schema.hs+2−2 test/golden/common/pathItem/operation/responses/change/mediaTypeObject/change/trace-tree.yaml+1−1
src/OpenAPI/Checker/Validate/Schema.hs+2−2
@@ -488,7 +488,7 @@ processSchema sch@(extract -> Schema {..}) = do
488488 }
489489 Just OpenApiNumber ->
490490 bottom
491− { forBoolean = top
491+ { forNumber = top
492492 }
493493 Just OpenApiInteger ->
494494 bottom
@@ -961,7 +961,7 @@ instance Issuable 'TypedSchemaLevel where
961961 | NoMatchingCondition [SomeCondition]
962962 -- ^ consumer declares that the value must satisfy a disjunction of some conditions, but producer's requirements couldn't be matched against any single one of them (TODO: split heuristic #71)
963963 | NoContradiction
964− -- ^ consumer indicates that values of this type are now allowed, but the producer does not do so (currently we only check immediate contradictions, c.f. #70)
964+ -- ^ producer indicates that values of this type are now allowed, but the consumer does not do so (currently we only check immediate contradictions, c.f. #70)
965965 deriving stock (Eq, Ord, Show)
966966 issueIsUnsupported _ = False
967967
test/golden/common/pathItem/operation/responses/change/mediaTypeObject/change/trace-tree.yaml+1−1
@@ -4,4 +4,4 @@ Left:
44 WithStatusCode 200:
55 ResponsePayload:
66 PayloadSchema:
7− OfType Boolean: NoContradiction
7+ OfType Number: NoContradiction