openapi3 icon indicating copy to clipboard operation
openapi3 copied to clipboard

Failing to parse type correctly - failure on default type checking Since version 1.1.0

Open banuni opened this issue 4 years ago • 0 comments

When trying to parse this:

openapi: "3.0.0"
info:
  version: 1.0.0
  title: test
  license:
    name: MIT
paths: {}
components:
  schemas:
    ExampleSchema:
      type: object
      properties:
        code:
          type: number
          default: 1

I get this Error:

components.schemas.ExampleSchema.properties.testField: Expected components.schemas.ExampleSchema.properties.testField.default to be one of [<class 'str'>], got <class 'int'>

does NOT happen on 1.0.1

banuni avatar Jan 10 '21 13:01 banuni