You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenAPI: per-status response config + RFC 7807 problem+json support (#162)
* added status code config for open api
* Add produces_problem() / produces_problem_example() for OpenAPI (RFC 7807)
Adds two new methods on OpenApiRouteConfig, gated under the
problem-details feature, that document problem+json responses in the
generated OpenAPI spec:
cfg.produces_problem(400)
cfg.produces_problem_example(422, Problem::new(422).with_detail("..."))
Both use application/problem+json as the content type (RFC 7807).
produces_problem() derives a canonical example (type, title, status)
from the HTTP status code's reason phrase.
The feature is forwarded from volga's problem-details flag to
volga-open-api via the optional dep syntax, so it activates
automatically when both openapi and problem-details are enabled.
* updated CHANGELOG
0 commit comments