JSON Schema type following OpenAPI v3.1 (simplified).
CRITICAL: Union types MUST use IOneOf. NEVER use array in type field.
IOneOf
type
Wrong: { type: ["string", "null"] } Correct: { oneOf: [{ type: "string" }, { type: "null" }] }
{ type: ["string", "null"] }
{ oneOf: [{ type: "string" }, { type: "null" }] }
The type field is a discriminator and MUST be a single string value.
JSON Schema type following OpenAPI v3.1 (simplified).
CRITICAL: Union types MUST use
IOneOf. NEVER use array intypefield.Wrong:
{ type: ["string", "null"] }Correct:{ oneOf: [{ type: "string" }, { type: "null" }] }The
typefield is a discriminator and MUST be a single string value.