ProblemSchemas

The JSON Schemas this module writes into an OpenAPI document.

Both are written by hand rather than inferred. ProblemSerializer's descriptor marks type non-optional and cannot describe extension members at all — they are runtime-determined — so an inferred schema would require a member RFC 9457 §3.1 makes optional and would omit the sibling extensions of §3.2 entirely.

Each schema's non-null title is load-bearing: Ktor lifts a titled schema into components/schemas and rewrites every use to a $ref. Clearing it inlines the whole schema at every response instead. Through Ktor 3.5.2 the lifting skips default responses (KTOR-9657, fixed in 3.6.0), so a catch-all body stays inline whatever its title.

Properties

Link copied to clipboard

The application/problem+json document of RFC 9457 §3.

Link copied to clipboard

problem plus the errors array of RFC 9457's own multi-error example.