Skip to content

openapi: decide how nullable in an OpenAPI 3.1 document is treated #632

Closed

Description

@OmarAlJarrah

Problem

openapi: 3.1.0
…
    N: {type: string, nullable: true}

OpenAPI 3.1 removed nullable; JSON Schema 2020-12 ignores keywords it doesn't define. The compiler honors it anyway: N's reference is nullable: true, with no diagnostic and no inference marker.

Honoring it may well be the right leniency, since documents migrated from 3.0 keep it. But it asserts something the 3.1 document doesn't say, so invariant 6 applies.

Decide

Keep honoring it, but mark the result Inferred and report it at info (or make it a policy that can be switched off).

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:P3Later emitters, M4 and up, 3.2-only, streaming, webhooks, rare constructstype:featureNew capability or enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions