You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OpenAPI 3.0: spec_version=3.0.0 documents still contain {"type": "null"} members in oneOf/anyOf #8751
LegacyOpenApiNormalizer::downgradeSchema() (src/OpenApi/Serializer/LegacyOpenApiNormalizer.php:107) only rewrites type arrays such as ["string", "null"], type: "null" inside oneOf/anyOf is left as is. The JSON:API schema factory emits it at src/JsonApi/JsonSchema/SchemaFactory.php:334, the core JSON Schema factory does too (anyOf with {"type": "null"} in src/JsonSchema/SchemaFactory.php:296, :498 and src/JsonSchema/Metadata/Property/Factory/SchemaPropertyMetadataFactory.php:198, :217), so the downgrade is the place to fix it.
Suggested fix: in the downgrade, drop the {"type": "null"} member of oneOf/anyOf, set nullable: true on the schema, and inline the remaining member when there is a single one and it is not a $ref.
On 5.0 the webhooks root field is also kept in the 3.0 document until #8722 is merged up, that one is separate.
Activity
fix(openapi): use nullable instead of null type in 3.0
fix(openapi): use nullable instead of null type in 3.0 (#8754)
soyuka commentedon Oct 22, 2026
fixed by #8754 (5.0)