Appearance
Diagnostics
Diagnostics are designed to keep generation safe when an OpenAPI feature is unsupported or only partially supported.
Composition support:
- simple
allOfobject branches can be merged when properties do not conflict; - conflicting
allOfbranches emitconflicting-allof; - simple non-discriminated
oneOfandanyOfbranches are emitted as broad unions; - discriminator-driven polymorphism emits diagnostics and is not modeled as runtime narrowing behavior.
Each diagnostic includes:
code;severity;location;suggestion.
Binary Payloads
Binary upload and download operations should not produce diagnostics when the contract declares a supported content type and schema:
- uploads:
multipart/form-dataorapplication/octet-stream; - downloads:
application/octet-stream,application/pdf,image/*or*/*withtype: string, format: binary; - generated request types:
FormData,Blob | ArrayBuffer | ReadableStreamorURLSearchParams; - generated response types:
Blob.
If Forge reports unsupported-content-type, add a schema to the OpenAPI requestBody or 2xx response content entry. For file payloads, prefer type: string, format: binary.
Use strict validation in CI when the contract should fail on diagnostics:
bash
archora-forge validate ./openapi.yaml --strict
archora-forge lint ./openapi.yaml --strict