[Java] allow setting boolean getter (is, has, get) in templates (#7344)

* allow setting java boolean getter (is, has, get) in templates

* update msf4j boolean getter

* update jaxrs-spec boolean handler

* update jaxrs boolean getter

* update reasteasy, spring, cxf boolean getter

* update inflector boolean getter

* update java play boolean getter

* update java boolean getter

* update spring samples
This commit is contained in:
William Cheng
2018-01-13 15:19:02 +08:00
committed by GitHub
parent 4241b11d97
commit 8aef689d1b
141 changed files with 297 additions and 174 deletions

View File

@@ -1269,13 +1269,13 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
}
/**
* Output the Getter name for boolean property, e.g. isActive
* Output the partial Getter name for boolean property, e.g. Active
*
* @param name the name of the property
* @return getter name based on naming convention
* @return partial getter name based on naming convention
*/
public String toBooleanGetter(String name) {
return "is" + getterAndSetterCapitalize(name);
return getterAndSetterCapitalize(name);
}
@Override

View File

@@ -118,7 +118,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela
{{#vendorExtensions.extraAnnotation}}
{{{vendorExtensions.extraAnnotation}}}
{{/vendorExtensions.extraAnnotation}}
public {{{datatypeWithEnum}}} {{getter}}() {
public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() {
return {{name}};
}
{{^isReadOnly}}

View File

@@ -42,7 +42,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{#vendorExtensions.extraAnnotation}}{{{vendorExtensions.extraAnnotation}}}{{/vendorExtensions.extraAnnotation}}
@ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
@JsonProperty("{{baseName}}")
public {{{datatypeWithEnum}}} {{getter}}() {
public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() {
return {{name}};
}
public void {{setter}}({{{datatypeWithEnum}}} {{name}}) {

View File

@@ -33,7 +33,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{#vendorExtensions.extraAnnotation}}{{{vendorExtensions.extraAnnotation}}}{{/vendorExtensions.extraAnnotation}}
@ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
@JsonProperty("{{baseName}}")
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() {
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() {
return {{name}};
}
public void {{setter}}({{{datatypeWithEnum}}} {{name}}) {

View File

@@ -64,16 +64,16 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {
{{#vendorExtensions.extraAnnotation}}
{{{vendorExtensions.extraAnnotation}}}
{{/vendorExtensions.extraAnnotation}}
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} {{#isEnum}}{{^isListContainer}}{{^isMapContainer}}public {{datatype}} {{getter}}() {
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} {{#isEnum}}{{^isListContainer}}{{^isMapContainer}}public {{datatype}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() {
if ({{name}} == null) {
return null;
}
return {{name}}.value();
}{{/isMapContainer}}{{/isListContainer}}{{/isEnum}}{{#isEnum}}{{#isListContainer}}public {{{datatypeWithEnum}}} {{getter}}() {
}{{/isMapContainer}}{{/isListContainer}}{{/isEnum}}{{#isEnum}}{{#isListContainer}}public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() {
return {{name}};
}{{/isListContainer}}{{/isEnum}}{{#isEnum}}{{#isMapContainer}}public {{{datatypeWithEnum}}} {{getter}}() {
}{{/isListContainer}}{{/isEnum}}{{#isEnum}}{{#isMapContainer}}public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() {
return {{name}};
}{{/isMapContainer}}{{/isEnum}}{{^isEnum}}public {{{datatypeWithEnum}}} {{getter}}() {
}{{/isMapContainer}}{{/isEnum}}{{^isEnum}}public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() {
return {{name}};
}{{/isEnum}}

View File

@@ -85,7 +85,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
@JsonProperty("{{baseName}}")
{{/jackson}}
@ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() {
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() {
return {{name}};
}
{{^isReadOnly}}

View File

@@ -28,7 +28,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{#vendorExtensions.extraAnnotation}}{{{vendorExtensions.extraAnnotation}}}{{/vendorExtensions.extraAnnotation}}
@ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
@JsonProperty("{{baseName}}")
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() {
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() {
return {{name}};
}
public void {{setter}}({{{datatypeWithEnum}}} {{name}}) {

View File

@@ -28,7 +28,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{#vendorExtensions.extraAnnotation}}{{{vendorExtensions.extraAnnotation}}}{{/vendorExtensions.extraAnnotation}}
@ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
@JsonProperty("{{baseName}}")
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() {
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() {
return {{name}};
}
public void {{setter}}({{{datatypeWithEnum}}} {{name}}) {

View File

@@ -31,7 +31,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{#vendorExtensions.extraAnnotation}}{{{vendorExtensions.extraAnnotation}}}{{/vendorExtensions.extraAnnotation}}
@ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
@JsonProperty("{{baseName}}")
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() {
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() {
return {{name}};
}
public void {{setter}}({{{datatypeWithEnum}}} {{name}}) {

View File

@@ -83,7 +83,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{#vendorExtensions.extraAnnotation}}
{{{vendorExtensions.extraAnnotation}}}
{{/vendorExtensions.extraAnnotation}}
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() {
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() {
return {{name}};
}

View File

@@ -87,7 +87,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{{vendorExtensions.extraAnnotation}}}
{{/vendorExtensions.extraAnnotation}}
@ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}")
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() {
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() {
return {{name}};
}

View File

@@ -20,7 +20,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{#vars}}
{{#vendorExtensions.extraAnnotation}}{{vendorExtensions.extraAnnotation}}{{/vendorExtensions.extraAnnotation}}
@JsonProperty("{{baseName}}")
public {{{datatypeWithEnum}}} {{getter}}() {
public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() {
return {{name}};
}
public void {{setter}}({{{datatypeWithEnum}}} {{name}}) {

View File

@@ -78,11 +78,11 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{/maximum}}
* @return {{name}}
**/
{{#vendorExtensions.extraAnnotation}}
{{#vendorExtensions.extraAnnotation}}
{{{vendorExtensions.extraAnnotation}}}
{{/vendorExtensions.extraAnnotation}}
@ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
public {{{datatypeWithEnum}}} {{getter}}() {
public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() {
return {{name}};
}
{{^isReadOnly}}

View File

@@ -87,7 +87,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{{vendorExtensions.extraAnnotation}}}
{{/vendorExtensions.extraAnnotation}}
@ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}")
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() {
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() {
return {{name}};
}

View File

@@ -22,7 +22,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{#vendorExtensions.extraAnnotation}}{{{vendorExtensions.extraAnnotation}}}{{/vendorExtensions.extraAnnotation}}
@ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
@JsonProperty("{{baseName}}")
public {{{datatypeWithEnum}}} {{getter}}() {
public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() {
return {{name}};
}
public void {{setter}}({{{datatypeWithEnum}}} {{name}}) {

View File

@@ -715,7 +715,7 @@ public class JavaModelTest {
Assert.assertEquals(cp.baseType, "Boolean");
Assert.assertTrue(cp.isNotContainer);
Assert.assertTrue(cp.isBoolean);
Assert.assertEquals(cp.getter, "isProperty");
Assert.assertEquals(cp.getter, "Property");
}
}

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -21,9 +21,9 @@ public class Category {
@ApiModelProperty(value = "")
private Long id = null;
@ApiModelProperty(value = "")
private String name = null;
/**
* Get id
* @return id

View File

@@ -21,11 +21,12 @@ public class ModelApiResponse {
@ApiModelProperty(value = "")
private Integer code = null;
@ApiModelProperty(value = "")
private String type = null;
@ApiModelProperty(value = "")
private String message = null;
/**
* Get code
* @return code

View File

@@ -22,13 +22,17 @@ public class Order {
@ApiModelProperty(value = "")
private Long id = null;
@ApiModelProperty(value = "")
private Long petId = null;
@ApiModelProperty(value = "")
private Integer quantity = null;
@ApiModelProperty(value = "")
private Date shipDate = null;
@XmlType(name="StatusEnum")
@XmlEnum(String.class)
public enum StatusEnum {
@@ -66,9 +70,9 @@ public enum StatusEnum {
* Order Status
**/
private StatusEnum status = null;
@ApiModelProperty(value = "")
private Boolean complete = false;
/**
* Get id
* @return id

View File

@@ -25,14 +25,19 @@ public class Pet {
@ApiModelProperty(value = "")
private Long id = null;
@ApiModelProperty(value = "")
private Category category = null;
@ApiModelProperty(example = "doggie", required = true, value = "")
private String name = null;
@ApiModelProperty(required = true, value = "")
private List<String> photoUrls = new ArrayList<String>();
@ApiModelProperty(value = "")
private List<Tag> tags = new ArrayList<Tag>();
private List<Tag> tags = null;
@XmlType(name="StatusEnum")
@XmlEnum(String.class)
@@ -71,7 +76,6 @@ public enum StatusEnum {
* pet status in the store
**/
private StatusEnum status = null;
/**
* Get id
* @return id

View File

@@ -21,9 +21,9 @@ public class Tag {
@ApiModelProperty(value = "")
private Long id = null;
@ApiModelProperty(value = "")
private String name = null;
/**
* Get id
* @return id

View File

@@ -21,24 +21,30 @@ public class User {
@ApiModelProperty(value = "")
private Long id = null;
@ApiModelProperty(value = "")
private String username = null;
@ApiModelProperty(value = "")
private String firstName = null;
@ApiModelProperty(value = "")
private String lastName = null;
@ApiModelProperty(value = "")
private String email = null;
@ApiModelProperty(value = "")
private String password = null;
@ApiModelProperty(value = "")
private String phone = null;
@ApiModelProperty(value = "User Status")
/**
* User Status
**/
private Integer userStatus = null;
/**
* Get id
* @return id

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -128,7 +128,6 @@ paths:
- petstore_auth:
- "write:pets"
- "read:pets"
x-contentType: "application/json"
x-accepts: "application/json"
/pet/findByTags:
get:
@@ -164,7 +163,6 @@ paths:
- "write:pets"
- "read:pets"
deprecated: true
x-contentType: "application/json"
x-accepts: "application/json"
/pet/{petId}:
get:
@@ -194,7 +192,6 @@ paths:
description: "Pet not found"
security:
- api_key: []
x-contentType: "application/json"
x-accepts: "application/json"
post:
tags:
@@ -260,7 +257,6 @@ paths:
- petstore_auth:
- "write:pets"
- "read:pets"
x-contentType: "application/json"
x-accepts: "application/json"
/pet/{petId}/uploadImage:
post:
@@ -321,7 +317,6 @@ paths:
format: "int32"
security:
- api_key: []
x-contentType: "application/json"
x-accepts: "application/json"
/store/order:
post:
@@ -378,7 +373,6 @@ paths:
description: "Invalid ID supplied"
404:
description: "Order not found"
x-contentType: "application/json"
x-accepts: "application/json"
delete:
tags:
@@ -401,7 +395,6 @@ paths:
description: "Invalid ID supplied"
404:
description: "Order not found"
x-contentType: "application/json"
x-accepts: "application/json"
/user:
post:
@@ -510,7 +503,6 @@ paths:
description: "date in UTC when toekn expires"
400:
description: "Invalid username/password supplied"
x-contentType: "application/json"
x-accepts: "application/json"
/user/logout:
get:
@@ -526,7 +518,6 @@ paths:
responses:
default:
description: "successful operation"
x-contentType: "application/json"
x-accepts: "application/json"
/user/{username}:
get:
@@ -553,7 +544,6 @@ paths:
description: "Invalid username supplied"
404:
description: "User not found"
x-contentType: "application/json"
x-accepts: "application/json"
put:
tags:
@@ -603,7 +593,6 @@ paths:
description: "Invalid username supplied"
404:
description: "User not found"
x-contentType: "application/json"
x-accepts: "application/json"
/fake_classname_test:
patch:

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -76,6 +76,14 @@ public interface FakeApi {
@ApiResponse(code = 404, message = "Not found", response = Void.class) })
void testEnumParameters(@FormParam(value = "enum_form_string_array") List<String> enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString,@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List<String> enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List<String> enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@FormParam(value = "enum_query_double") Double enumQueryDouble) throws Exception;
@POST
@Path("/inline-additionalProperties")
@Consumes({ "application/json" })
@ApiOperation(value = "test inline additionalProperties", notes = "", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
void testInlineAdditionalProperties(@Valid Object param) throws Exception;
@GET
@Path("/jsonFormData")
@Consumes({ "application/json" })

View File

@@ -108,8 +108,8 @@
"type" : "array",
"items" : {
"type" : "string",
"enum" : [ "available", "pending", "sold" ],
"default" : "available"
"default" : "available",
"enum" : [ "available", "pending", "sold" ]
},
"collectionFormat" : "csv"
} ],
@@ -680,8 +680,8 @@
"type" : "array",
"items" : {
"type" : "string",
"enum" : [ ">", "$" ],
"default" : "$"
"default" : "$",
"enum" : [ ">", "$" ]
}
}, {
"name" : "enum_form_string",
@@ -699,8 +699,8 @@
"type" : "array",
"items" : {
"type" : "string",
"enum" : [ ">", "$" ],
"default" : "$"
"default" : "$",
"enum" : [ ">", "$" ]
}
}, {
"name" : "enum_header_string",
@@ -718,8 +718,8 @@
"type" : "array",
"items" : {
"type" : "string",
"enum" : [ ">", "$" ],
"default" : "$"
"default" : "$",
"enum" : [ ">", "$" ]
}
}, {
"name" : "enum_query_string",
@@ -1030,6 +1030,32 @@
}
}
},
"/fake/inline-additionalProperties" : {
"post" : {
"tags" : [ "fake" ],
"summary" : "test inline additionalProperties",
"description" : "",
"operationId" : "testInlineAdditionalProperties",
"consumes" : [ "application/json" ],
"parameters" : [ {
"in" : "body",
"name" : "param",
"description" : "request body",
"required" : true,
"schema" : {
"type" : "object",
"additionalProperties" : {
"type" : "string"
}
}
} ],
"responses" : {
"200" : {
"description" : "successful operation"
}
}
}
},
"/another-fake/dummy" : {
"patch" : {
"tags" : [ "$another-fake?" ],

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -90,6 +90,16 @@ public class FakeApi {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/inline-additionalProperties")
@Consumes({ "application/json" })
@ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response testInlineAdditionalProperties(@Valid Object param) {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/jsonFormData")
@Consumes({ "application/json" })

View File

@@ -108,8 +108,8 @@
"type" : "array",
"items" : {
"type" : "string",
"enum" : [ "available", "pending", "sold" ],
"default" : "available"
"default" : "available",
"enum" : [ "available", "pending", "sold" ]
},
"collectionFormat" : "csv"
} ],
@@ -680,8 +680,8 @@
"type" : "array",
"items" : {
"type" : "string",
"enum" : [ ">", "$" ],
"default" : "$"
"default" : "$",
"enum" : [ ">", "$" ]
}
}, {
"name" : "enum_form_string",
@@ -699,8 +699,8 @@
"type" : "array",
"items" : {
"type" : "string",
"enum" : [ ">", "$" ],
"default" : "$"
"default" : "$",
"enum" : [ ">", "$" ]
}
}, {
"name" : "enum_header_string",
@@ -718,8 +718,8 @@
"type" : "array",
"items" : {
"type" : "string",
"enum" : [ ">", "$" ],
"default" : "$"
"default" : "$",
"enum" : [ ">", "$" ]
}
}, {
"name" : "enum_query_string",
@@ -1030,6 +1030,32 @@
}
}
},
"/fake/inline-additionalProperties" : {
"post" : {
"tags" : [ "fake" ],
"summary" : "test inline additionalProperties",
"description" : "",
"operationId" : "testInlineAdditionalProperties",
"consumes" : [ "application/json" ],
"parameters" : [ {
"in" : "body",
"name" : "param",
"description" : "request body",
"required" : true,
"schema" : {
"type" : "object",
"additionalProperties" : {
"type" : "string"
}
}
} ],
"responses" : {
"200" : {
"description" : "successful operation"
}
}
}
},
"/another-fake/dummy" : {
"patch" : {
"tags" : [ "$another-fake?" ],

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -152,6 +152,19 @@ public class FakeApi {
throws NotFoundException {
return delegate.testEnumParameters(enumFormStringArray,enumFormString,enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,securityContext);
}
@POST
@Consumes({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response testInlineAdditionalProperties(
@ApiParam(value = "request body" ,required=true) Object param,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testInlineAdditionalProperties(param,securityContext);
}
@GET
@Consumes({ "application/json" })

View File

@@ -37,6 +37,8 @@ public abstract class FakeApiService {
throws NotFoundException;
public abstract Response testEnumParameters(List<String> enumFormStringArray,String enumFormString,List<String> enumHeaderStringArray,String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger,Double enumQueryDouble,SecurityContext securityContext)
throws NotFoundException;
public abstract Response testInlineAdditionalProperties(Object param,SecurityContext securityContext)
throws NotFoundException;
public abstract Response testJsonFormData(String param,String param2,SecurityContext securityContext)
throws NotFoundException;
}

View File

@@ -66,6 +66,12 @@ public class FakeApiServiceImpl extends FakeApiService {
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
@Override
public Response testInlineAdditionalProperties(Object param, SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
@Override
public Response testJsonFormData(String param, String param2, SecurityContext securityContext)
throws NotFoundException {
// do some magic!

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -152,6 +152,19 @@ public class FakeApi {
throws NotFoundException {
return delegate.testEnumParameters(enumFormStringArray,enumFormString,enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,securityContext);
}
@POST
@Path("/inline-additionalProperties")
@Consumes({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response testInlineAdditionalProperties(
@ApiParam(value = "request body" ,required=true) Object param,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testInlineAdditionalProperties(param,securityContext);
}
@GET
@Path("/jsonFormData")
@Consumes({ "application/json" })

View File

@@ -37,6 +37,8 @@ public abstract class FakeApiService {
throws NotFoundException;
public abstract Response testEnumParameters(List<String> enumFormStringArray,String enumFormString,List<String> enumHeaderStringArray,String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger,Double enumQueryDouble,SecurityContext securityContext)
throws NotFoundException;
public abstract Response testInlineAdditionalProperties(Object param,SecurityContext securityContext)
throws NotFoundException;
public abstract Response testJsonFormData(String param,String param2,SecurityContext securityContext)
throws NotFoundException;
}

View File

@@ -66,6 +66,12 @@ public class FakeApiServiceImpl extends FakeApiService {
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
@Override
public Response testInlineAdditionalProperties(Object param, SecurityContext securityContext)
throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
@Override
public Response testJsonFormData(String param, String param2, SecurityContext securityContext)
throws NotFoundException {
// do some magic!

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -167,6 +167,18 @@ public class FakeApi {
throws NotFoundException {
return delegate.testEnumParameters(enumFormStringArray,enumFormString,enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,securityContext);
}
@POST
@Path("/inline-additionalProperties")
@Consumes({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) Object param
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testInlineAdditionalProperties(param,securityContext);
}
@GET
@Path("/jsonFormData")
@Consumes({ "application/json" })

View File

@@ -27,5 +27,6 @@ public abstract class FakeApiService {
public abstract Response testClientModel(Client body,SecurityContext securityContext) throws NotFoundException;
public abstract Response testEndpointParameters(BigDecimal number,Double _double,String patternWithoutDelimiter,byte[] _byte,Integer integer,Integer int32,Long int64,Float _float,String string,byte[] binary,Date date,Date dateTime,String password,String paramCallback,SecurityContext securityContext) throws NotFoundException;
public abstract Response testEnumParameters(List<String> enumFormStringArray,String enumFormString,List<String> enumHeaderStringArray,String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger,Double enumQueryDouble,SecurityContext securityContext) throws NotFoundException;
public abstract Response testInlineAdditionalProperties(Object param,SecurityContext securityContext) throws NotFoundException;
public abstract Response testJsonFormData(String param,String param2,SecurityContext securityContext) throws NotFoundException;
}

View File

@@ -56,6 +56,11 @@ public class FakeApiServiceImpl extends FakeApiService {
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
@Override
public Response testInlineAdditionalProperties(Object param, SecurityContext securityContext) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
@Override
public Response testJsonFormData(String param, String param2, SecurityContext securityContext) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

View File

@@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
* NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

Some files were not shown because too many files have changed in this diff Show More