mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-03 00:43:46 +00:00
update Java jersey 1,2 to handle */*
This commit is contained in:
@@ -247,7 +247,7 @@
|
||||
</dependencies>
|
||||
<properties>
|
||||
<swagger-core-version>1.5.15</swagger-core-version>
|
||||
<jersey-version>2.25.1</jersey-version>
|
||||
<jersey-version>2.6</jersey-version>
|
||||
<commons_io_version>2.5</commons_io_version>
|
||||
<commons_lang3_version>3.6</commons_lang3_version>
|
||||
<jackson-version>2.6.4</jackson-version>
|
||||
|
||||
@@ -434,12 +434,13 @@ public class ApiClient {
|
||||
* application/json; charset=UTF8
|
||||
* APPLICATION/JSON
|
||||
* application/vnd.company+json
|
||||
* "* / *" is also default to JSON
|
||||
* @param mime MIME
|
||||
* @return True if the MIME type is JSON
|
||||
*/
|
||||
public boolean isJsonMime(String mime) {
|
||||
String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
|
||||
return mime != null && (mime.matches(jsonMime) || mime.equalsIgnoreCase("application/json-patch+json"));
|
||||
return mime != null && (mime.matches(jsonMime) || mime.equals("*/*"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -39,7 +39,7 @@ public class Cat extends Animal {
|
||||
* @return declawed
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public Boolean getDeclawed() {
|
||||
public Boolean isDeclawed() {
|
||||
return declawed;
|
||||
}
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ public class Order {
|
||||
* @return complete
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public Boolean getComplete() {
|
||||
public Boolean isComplete() {
|
||||
return complete;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user