Skip to content

Add support for reporting exclusiveMaximum and exclusiveMinimum set to true when using OAS 3.1.0 #2299

@baywet

Description

@baywet

Is your feature request related to a problem? Please describe.

From OAS 3.0.0 to OAS 3.1.0 the exclusiveMaximum and exclusiveMinimum fields have changed from boolean to number. This aspect is often forgotten about during upgrades, and it'd be nice if redocly cli could report this issue as well.

Describe the solution you'd like

Since the struct rule already reports the usage of nullable:true with OAS 3.1.0, I thought this could be another scenario that rule reports. Otherwise, it could be implemented as a new rule.

Describe alternatives you've considered

Using spectral which implements that one, but ideally I'd like to use a single tool.

Additional context

//...
components:
  schemas:
    Foo:
      type: number
      minimum: 12
      exclusiveMinimum: true

is valid in OAS 3.0.0, but should be migrated to this in OAS 3.1.0

//...
components:
  schemas:
    Foo:
      type: number
      exclusiveMinimum: 12

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions