Skip to content

Latest commit

 

History

History
92 lines (67 loc) · 1.2 KB

TODO.md

File metadata and controls

92 lines (67 loc) · 1.2 KB

What to do for full compatibility with OA 3 schema

EnumSchema

  • add support for int|float|... (only scalar)

IntegerSchema

  • format can be int32/int64
  • exclusiveMinimum/exclusiveMaximum is false by default

FloatSchema

  • format can be float/number

StringSchema

  • format is only hint

Mixed-type array

type: array
items:
  oneOf:
    - type: string
    - type: integer

Refs

?

Union type

oneOf:
  - type: string
  - type: integer

Arrays

mixed[] | array

type: array
items: {}

(we now sending items: without empty object)

Objects

Readonly, Writeonly

type: object
properties:
  id:
    # Returned by GET, not used in POST/PUT/PATCH
    type: integer
    readOnly: true
  username:
    type: string
  password:
    # Used in POST/PUT/PATCH, not returned by GET
    type: string
    writeOnly: true

Free-Form Object

if we start using {} syntax, maybe move

type: object
additionalProperties: true

to

type: object
additionalProperties: {}

{} isn't nullable! we must use {nullable: true}

Number of Properties

type: object
minProperties: 2
maxProperties: 10