mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-21 06:47:07 +00:00
[java] [webclient] allow ndjson (#13674)
* fix 13673. include ndjson into consideration when client selects accepted type * update examples
This commit is contained in:
@@ -488,7 +488,7 @@ public class ApiClient extends JavaTimeFormatter {
|
||||
* @return boolean true if the MediaType represents JSON, false otherwise
|
||||
*/
|
||||
public boolean isJsonMime(MediaType mediaType) {
|
||||
return mediaType != null && (MediaType.APPLICATION_JSON.isCompatibleWith(mediaType) || mediaType.getSubtype().matches("^.*\\+json[;]?\\s*$"));
|
||||
return mediaType != null && (MediaType.APPLICATION_JSON.isCompatibleWith(mediaType) || mediaType.getSubtype().matches("^.*(\\+json|ndjson)[;]?\\s*$"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user