mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-07 18:56:09 +00:00
Add JSON-patch as a JSON mime-type (#5764)
This commit is contained in:
@@ -750,7 +750,7 @@ public class ApiClient {
|
||||
*/
|
||||
public boolean isJsonMime(String mime) {
|
||||
String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
|
||||
return mime != null && mime.matches(jsonMime);
|
||||
return mime != null && (mime.matches(jsonMime) || mime.equalsIgnoreCase("application/json-patch+json"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user