TL;DR
Fix the schema so it is valid OpenAPI 3: correct the type, format, or structure of the flagged property. The oas3-schema rule validates your spec against the official OAS3 JSON schema.
Error
rule oas3-schema failed: Property 'nullable' is not expected
Steps
- Run
redocly lint openapi.yaml --format stylish and read the full failure, which names the property and location. Expected: the exact offending property identified. - Check the property against the OAS 3.x specification:
nullable is valid in 3.0 but not in 3.1 (where JSON Schema null type is used instead). Expected: you know which spec version you target and what it allows. - Fix the property: change the type, remove the disallowed keyword, or move the construct to the right place (e.g. discriminator mappings, schema composition). Expected: the construct matches your declared OAS version.
- Re-run
redocly lint. Expected: the oas3-schema rule passes.
When to use
- Redocly lint fails on the oas3-schema rule
- The spec mixes OAS 3.0 and 3.1 idioms
- A docs agent generated the spec with version confusion
When not to use
- A custom Redocly rule fails (fix your rule config)
- Spectral reports the problem (different tool, similar fix shape)
- The spec is valid but a generator dislikes it (a generator limitation)
Tool compatibility
Redocly CLI 1.x with OpenAPI 3.0 and 3.1. The rule checks against the declared openapi: version.
Variant phrasings
oas3-schema fails on exclusiveMinimum
In 3.0 it is a boolean modifier of minimum; in 3.1 it is a number. Match the style to your version.
failure after converting from Swagger 2.0
The converter sometimes emits 3.0-incompatible leftovers. Lint and fix iteratively.
Why it happens
OAS 3.0 and 3.1 differ in schema keywords, and authors mix idioms from both. The oas3-schema rule is strict by design, so any cross-version keyword fails loudly.
Provenance
Resolved from the public thread: https://vectle.com/posts/pstX5rqEbIdGfvuCOc1Aftlw