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
When generating an API client for an OpenApi specification complying with JSON:API, the client ignores the JSON:API media type (application/vnd.api+json) declared in the request body definition and replaces it with the default application/json type.
This causes errors with API servers that strictly comply with the JSON:API specification. These fail to process requests with an unexpected content type, and in this specific case, they return a "415 Unsupported Media Type" error.
The generated API client does not comply with JSON:API specification.
When generating an API client for an OpenApi specification complying with JSON:API, the client ignores the JSON:API media type (
application/vnd.api+json
) declared in the request body definition and replaces it with the defaultapplication/json
type.This causes errors with API servers that strictly comply with the JSON:API specification. These fail to process requests with an unexpected content type, and in this specific case, they return a "415 Unsupported Media Type" error.
Let’s take the following spec example.
The generated client looks like this.
In the request properties, we get
type: ContentType.Json
while we expect the client to send theapplication/vnd.api+json
media type.The text was updated successfully, but these errors were encountered: