Skip to content

Component schema with a value of true or false throws an error #1757

Closed
@spacether

Description

@spacether

Component schema with a value of true or false throws and error

openapi: 3.0.3
info:
  title: openapi 3.0.3 sample spec
  description: sample spec for testing openapi functionality, built from json schema
    tests for draft6
  version: 0.0.1
paths: {}
components:
  schemas:
    BooleanSchemaTrue: true
    BooleanSchemaFalse: false

Throws the error:
BooleanSchemaTrue is not of type object
BooleanSchemaFalse is not of type object

For openapi v3.0.3 this is probably correct, I got these results using swagger-parser 2.0.31
But for v3.1.0 specs, should we get this result?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions