Skip to content

'type' field for component schema is not required #3

@ffleader1

Description

@ffleader1

A component schema NewUser like this

    NewUser:
      # type: object
      required:
        - username
        - age
      properties:
        username:
          type: string
          description: Name of the pet
        age:
          type: integer
          description: user age

will break.
The reason is that it's missing type: object. However, Oapi V3 Spec does not require type: object to be persented. The properties key make it implicit that the schema is object type.

Metadata

Metadata

Assignees

No one assigned

    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