Documentation
¶
Overview ¶
normalize-spec converts TypeBox-style OpenAPI 3.1 anyOf enum patterns to standard OpenAPI enum arrays for ogen compatibility.
TypeBox generates string enums as:
anyOf: [{type: string, enum: ["a"]}, {type: string, enum: ["b"]}]
This tool converts them to:
type: string enum: ["a", "b"]
Output JSON has object keys sorted lexicographically for deterministic diffs.
Usage: normalize-spec <input.json> <output.json>
Click to show internal directories.
Click to hide internal directories.