-
Notifications
You must be signed in to change notification settings - Fork 161
gen: convenient errors not generated for JSON-like content-types #1632
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What version of ogen are you using?
v1.20.0 (latest)
Can this issue be reproduced with the latest version?
Yes
What did you do?
I came up with a case, where a service uses application/problem+json (per RFC 7807) as the default response content-type for endpoints. ogen supports both things: application/problem+json as a special case and convenient errors generation for default responses.
The issue is that convenient error generation logic currently strictly checks for application/json only - leaving JSON-like types, f.e. application/problem+json, to be unsupported in such a case.
To reproduce this I prepared an example config and spec:
What did you expect to see?
I expected all JSON-like content types to be supported for default responses, including application/problem+json.
What did you see instead?
Generation error.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working