You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# OAS document that uses 3.1 features:
# 'null' type
# type array
openapi: 3.1.0
info:
version: 1.0.0
title: Example
license:
name: MIT
identifier: MIT
servers:
- url: http://api.example.xyz/v1
paths:
/somePath:
get:
operationId: getSomePath
responses:
'200':
description: OK
content:
application/json:
schema: {}
components:
schemas:
ArrayContainsValue:
type: array
contains:
enum:
- 1
AnyTypeContainsValue:
contains:
enum:
- 1
AdditionalpropertiesBeingFalseDoesNotAllowOtherProperties:
$schema: https://json-schema.org/draft/2020-12/schema
properties:
foo: {}
bar: {}
patternProperties:
^v: {}
additionalProperties: false
The schema in ArrayContainsValue.contains is given the property types = LinkedHashSet("number")
This is incorrect because we see from the schema above that the schema there only defines an enum value and that anytype (type unset/null) is the correct definition.
Type object is incorrectly set for AdditionalpropertiesBeingFalseDoesNotAllowOtherProperties
Can the parser be updated to show that the type for this use case is null?
When parsing this spec:
This is incorrect because we see from the schema above that the schema there only defines an enum value and that anytype (type unset/null) is the correct definition.
Can the parser be updated to show that the type for this use case is null?
This bug was hit on the additionalProperties test case AdditionalpropertiesBeingFalseDoesNotAllowOtherProperties when working on openapi-json-schema-tools/openapi-json-schema-generator#241
The text was updated successfully, but these errors were encountered: