Missing required property error in OpenAPI allOf composed schemas
0 reputation · 28 Jun 2025, 12:18 UTC
The OpenAPI 3.x specification defines a required array to list mandatory properties. When schemas are composed using allOf, the spec does not specify whether required properties from each subschema are merged or overridden. Validation tools exhibit inconsistent behavior: some merge all required lists, others honor only the top‑level schema’s list. This ambiguity can cause a payload that satisfies a subschema’s required property to be rejected with the error string "Missing required property", while a different tool may accept it. The goal is to clarify how required properties should be interpreted in allOf compositions and to identify which tools align with the intended standard.
1. Does the OpenAPI spec mandate merging of required properties across all subschemas in an allOf composition?
2. Which major OpenAPI tooling ecosystems (Swagger UI, OpenAPI Generator, ReDoc) implement the spec’s intended handling of required fields in allOf?
3. Is there an open RFC or GitHub issue that documents a consensus or proposed resolution for this ambiguity?