Open Onurfesci opened 12 months ago
If I have a JSON:API OpenAPI spec that has application/vnd.api+json content type in the response, it is ignored by the codegen and the resulting response type is unknown.
application/vnd.api+json
unknown
For example:
"200" : { "content" : { "application/vnd.api+json" : { "schema" : { "$ref" : "#/components/schemas/UserProfile" } } }, "description" : "Result of performing a successful operation" },
results in:
export type GetUserProfileApiResponse = unknown;
Could application/vnd.api+json be parsed as a valid content type?
Dug through the code and seems that adding 'application/vnd.api+json' to contentTypes in
'application/vnd.api+json'
contentTypes
@rtk-query/oazapfts-patched -> src -> codegen -> generate.ts
@rtk-query/oazapfts-patched
src
codegen
generate.ts
would solve this.
If I have a JSON:API OpenAPI spec that has
application/vnd.api+json
content type in the response, it is ignored by the codegen and the resulting response type isunknown
.For example:
results in:
Could
application/vnd.api+json
be parsed as a valid content type?