Error responses were documented with application/json instead of
application/problem+json, and the schema was inlined at every
location instead of using a $ref.
Changes:
- Implement custom OperationOutput trait for ProblemDetailsResponse
- Use ctx.schema.subschema_for::<ProblemDetails>() for schema reference
- Replace Json<ProblemDetails> with ProblemDetailsResponse in all docs
- Specify application/problem+json as media type
Error responses now correctly show:
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| share | ||
| src | ||
| tests | ||
| Cargo.toml | ||
| tasks.md | ||