Skip to content

v2.11.0

Compare
Choose a tag to compare
@samchungy samchungy released this 09 Nov 04:14
· 107 commits to master since this release
7edaf80

What's Changed

New Features 馃帀

  • Fix Nullable Behaviour by @samchungy in #187

    .nullable() now renders differently for OpenAPI < 3.1.0

    Previously a registered schema which was made nullable would render as:

    {
      oneOf: [
        { $ref: '#/components/schemas/a' },
        { nullable: true }
      ]
    }

    will now be rendered as:

    {
      allOf: [
        { $ref: '#/components/schemas/a' }
      ],
      nullable: true
    }

    Similarly with nullable unions

    {
      anyOf: [
        { $ref: '#/components/schemas/a' },
        { $ref: '#/components/schemas/b' },
        { nullable: true }
      ]
    }

    Will now be rendered as:

    {
      anyOf: [
        { $ref: '#/components/schemas/a' },
        { $ref: '#/components/schemas/b' }
      ],
      nullable: true
    }

Full Changelog: v2.10.0...v2.11.0