diff --git a/bin/configs/spring-stubs-oas3.yaml b/bin/configs/spring-stubs-oas3.yaml new file mode 100644 index 000000000000..1c725e53b33d --- /dev/null +++ b/bin/configs/spring-stubs-oas3.yaml @@ -0,0 +1,11 @@ +generatorName: spring +outputDir: samples/openapi3/client/petstore/spring-stubs +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + groupId: org.openapitools.openapi3 + artifactId: spring-stubs + oas3: "true" + interfaceOnly: "true" + singleContentTypes: "true" + hideGenerationTimestamp: "true" diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index 0033b63eb6fd..c6eeb212bee0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -20,7 +20,6 @@ import static org.apache.commons.lang3.StringUtils.isNotEmpty; import static org.openapitools.codegen.utils.StringUtils.camelize; -import io.swagger.v3.oas.models.media.Schema; import java.io.File; import java.net.URL; import java.util.ArrayList; @@ -33,6 +32,12 @@ import java.util.regex.Matcher; import java.util.stream.Collectors; +import com.samskivert.mustache.Mustache; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.Operation; +import io.swagger.v3.oas.models.PathItem; +import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.servers.Server; import org.apache.commons.lang3.tuple.Pair; import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConstants; @@ -59,12 +64,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.samskivert.mustache.Mustache; - -import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.Operation; -import io.swagger.v3.oas.models.PathItem; - public class SpringCodegen extends AbstractJavaCodegen implements BeanValidationFeatures, PerformBeanValidationFeatures, OptionalFeatures { private final Logger LOGGER = LoggerFactory.getLogger(SpringCodegen.class); @@ -390,8 +389,11 @@ public void processOpts() { } additionalProperties.put(UNHANDLED_EXCEPTION_HANDLING, this.isUnhandledException()); - typeMapping.put("file", "org.springframework.core.io.Resource"); - importMapping.put("org.springframework.core.io.Resource", "org.springframework.core.io.Resource"); + typeMapping.put("file", "Resource"); + importMapping.put("Resource", "org.springframework.core.io.Resource"); + importMapping.put("Pageable", "org.springframework.data.domain.Pageable"); + importMapping.put("DateTimeFormat", "org.springframework.format.annotation.DateTimeFormat"); + importMapping.put("ApiIgnore", "springfox.documentation.annotations.ApiIgnore"); if (useOptional) { writePropertyBack(USE_OPTIONAL, useOptional); @@ -899,6 +901,11 @@ public void setUnhandledException(boolean unhandledException) { public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { super.postProcessModelProperty(model, property); + // add org.springframework.format.annotation.DateTimeFormat when needed + if (property.isDate || property.isDateTime) { + model.imports.add("DateTimeFormat"); + } + if ("null".equals(property.example)) { property.example = null; } @@ -938,6 +945,29 @@ public CodegenModel fromModel(String name, Schema model) { return codegenModel; } + /* + * Add dynamic imports based on the parameters and vendor extensions of an operation. + * The imports are expanded by the mustache {{import}} tag available to model and api + * templates. + */ + @Override + public CodegenOperation fromOperation(String path, String httpMethod, Operation operation, List servers) { + CodegenOperation codegenOperation = super.fromOperation(path, httpMethod, operation, servers); + + // add org.springframework.format.annotation.DateTimeFormat when needed + codegenOperation.allParams.stream().filter(p -> p.isDate || p.isDateTime).findFirst() + .ifPresent(p -> codegenOperation.imports.add("DateTimeFormat")); + + // add org.springframework.data.domain.Pageable import when needed + if (codegenOperation.vendorExtensions.containsKey("x-spring-paginated")) { + codegenOperation.imports.add("Pageable"); + if (Boolean.TRUE.equals(additionalProperties.get("useSpringfox"))) { + codegenOperation.imports.add("ApiIgnore"); + } + } + return codegenOperation; + } + @Override public Map postProcessModelsEnum(Map objs) { objs = super.postProcessModelsEnum(objs); diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/additionalEnumTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/additionalEnumTypeAnnotations.mustache index aa524798b425..dbb6a373fc9e 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/additionalEnumTypeAnnotations.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/additionalEnumTypeAnnotations.mustache @@ -1,2 +1,3 @@ -{{#additionalEnumTypeAnnotations}}{{{.}}} +{{#additionalEnumTypeAnnotations}} +{{{.}}} {{/additionalEnumTypeAnnotations}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/additionalModelTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/additionalModelTypeAnnotations.mustache index f4871c02cc2e..91b4950fdb25 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/additionalModelTypeAnnotations.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/additionalModelTypeAnnotations.mustache @@ -1,2 +1,3 @@ -{{#additionalModelTypeAnnotations}}{{{.}}} +{{#additionalModelTypeAnnotations}} +{{{.}}} {{/additionalModelTypeAnnotations}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache index 66c398753e04..affa1fb385be 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache @@ -37,9 +37,9 @@ import org.springframework.stereotype.Controller; {{/useSpringController}} import org.springframework.web.bind.annotation.*; {{#jdk8-no-delegate}} - {{^reactive}} +{{^reactive}} import org.springframework.web.context.request.NativeWebRequest; - {{/reactive}} +{{/reactive}} {{/jdk8-no-delegate}} import org.springframework.web.multipart.MultipartFile; {{#reactive}} @@ -59,13 +59,15 @@ import java.util.Map; import java.util.Optional; {{/jdk8-no-delegate}} {{^jdk8-no-delegate}} - {{#useOptional}} +{{#useOptional}} import java.util.Optional; - {{/useOptional}} +{{/useOptional}} {{/jdk8-no-delegate}} {{#async}} import java.util.concurrent.{{^jdk8}}Callable{{/jdk8}}{{#jdk8}}CompletableFuture{{/jdk8}}; {{/async}} +import javax.annotation.Generated; + {{>generatedAnnotation}} {{#useBeanValidation}} @Validated @@ -73,7 +75,12 @@ import java.util.concurrent.{{^jdk8}}Callable{{/jdk8}}{{#jdk8}}CompletableFuture {{#useSpringController}} @Controller {{/useSpringController}} -{{#oas3}}@Tag(name = "{{{baseName}}}", description = "the {{{baseName}}} API"){{/oas3}}{{^oas3}}@Api(value = "{{{baseName}}}", description = "the {{{baseName}}} API"){{/oas3}} +{{#oas3}} +@Tag(name = "{{{baseName}}}", description = "the {{{baseName}}} API") +{{/oas3}} +{{^oas3}} +@Api(value = "{{{baseName}}}", description = "the {{{baseName}}} API") +{{/oas3}} {{#operations}} {{#virtualService}} @VirtualService @@ -121,8 +128,13 @@ public interface {{classname}} { {{/virtualService}} {{#oas3}} @Operation( - summary = "{{{summary}}}", + operationId = "{{{operationId}}}", + {{#summary}} + summary = "{{{.}}}", + {{/summary}} + {{#vendorExtensions.x-tags}} tags = { {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }, + {{/vendorExtensions.x-tags}} responses = { {{#responses}} @ApiResponse(responseCode = "{{{code}}}", description = "{{{message}}}"{{#baseType}}, content = @Content(mediaType = "application/json", schema = @Schema(implementation = {{{baseType}}}.class)){{/baseType}}){{^-last}},{{/-last}} @@ -189,15 +201,15 @@ public interface {{classname}} { {{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{#delegate-method}}_{{/delegate-method}}{{operationId}}( {{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, - {{/hasParams}}{{#oas3}}@Parameter(hidden = true){{/oas3}}{{#useSpringfox}}@springfox.documentation.annotations.ApiIgnore{{/useSpringfox}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}}, - {{/hasParams}}{{#useSpringfox}}@springfox.documentation.annotations.ApiIgnore {{/useSpringfox}}final org.springframework.data.domain.Pageable pageable{{/vendorExtensions.x-spring-paginated}} + {{/hasParams}}{{#oas3}}@Parameter(hidden = true){{/oas3}}{{#useSpringfox}}@ApiIgnore{{/useSpringfox}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}}, + {{/hasParams}}{{#useSpringfox}}@ApiIgnore {{/useSpringfox}}final Pageable pageable{{/vendorExtensions.x-spring-paginated}} ){{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}}{{#unhandledException}} throws Exception{{/unhandledException}} { {{#delegate-method}} return {{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, pageable{{/vendorExtensions.x-spring-paginated}}); } // Override this method - {{#jdk8-default-interface}}default {{/jdk8-default-interface}} {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}{{#useSpringfox}}@springfox.documentation.annotations.ApiIgnore{{/useSpringfox}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, {{#useSpringfox}}@springfox.documentation.annotations.ApiIgnore{{/useSpringfox}} final org.springframework.data.domain.Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}} { + {{#jdk8-default-interface}}default {{/jdk8-default-interface}} {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}{{#useSpringfox}}@ApiIgnore{{/useSpringfox}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, {{#useSpringfox}}@ApiIgnore{{/useSpringfox}} final Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}} { {{/delegate-method}} {{^isDelegate}} {{>methodBody}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/apiController.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/apiController.mustache index 0652a76d54ee..ca8076c56a47 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/apiController.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/apiController.mustache @@ -31,35 +31,35 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; {{/jdk8}} +import org.springframework.beans.factory.annotation.Autowired; {{^isDelegate}} import org.springframework.web.context.request.NativeWebRequest; {{/isDelegate}} {{^jdk8}} import org.springframework.web.multipart.MultipartFile; -{{#vendorExtensions.x-spring-paginated}} -import org.springframework.data.domain.Pageable; -{{/vendorExtensions.x-spring-paginated}} - {{#useBeanValidation}} +{{#useBeanValidation}} import javax.validation.constraints.*; import javax.validation.Valid; - {{/useBeanValidation}} +{{/useBeanValidation}} {{/jdk8}} {{#jdk8}} import java.util.Optional; {{/jdk8}} {{^jdk8}} - {{#useOptional}} +{{#useOptional}} import java.util.Optional; - {{/useOptional}} +{{/useOptional}} {{/jdk8}} {{^jdk8}} import java.util.List; import java.util.Map; - {{#async}} +{{#async}} import java.util.concurrent.Callable; - {{/async}} +{{/async}} {{/jdk8}} +import javax.annotation.Generated; + {{>generatedAnnotation}} @Controller {{=<% %>=}} @@ -71,7 +71,7 @@ public class {{classname}}Controller implements {{classname}} { private final {{classname}}Delegate delegate; - public {{classname}}Controller(@org.springframework.beans.factory.annotation.Autowired(required = false) {{classname}}Delegate delegate) { + public {{classname}}Controller(@Autowired(required = false) {{classname}}Delegate delegate) { {{#jdk8}} this.delegate = Optional.ofNullable(delegate).orElse(new {{classname}}Delegate() {}); } @@ -93,7 +93,7 @@ public class {{classname}}Controller implements {{classname}} { {{/jdk8}} private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public {{classname}}Controller(NativeWebRequest request) { this.request = request; } @@ -132,7 +132,7 @@ public class {{classname}}Controller implements {{classname}} { public {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}( {{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}}, {{/-last}}{{/allParams}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}}, - {{/hasParams}}{{#useSpringfox}}@springfox.documentation.annotations.ApiIgnore {{/useSpringfox}}final Pageable pageable{{/vendorExtensions.x-spring-paginated}} + {{/hasParams}}{{#useSpringfox}}@ApiIgnore {{/useSpringfox}}final Pageable pageable{{/vendorExtensions.x-spring-paginated}} ) { {{^isDelegate}} {{^async}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache index 1a97106dc8fb..4272dd2f0be5 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache @@ -2,9 +2,6 @@ package {{package}}; {{#imports}}import {{import}}; {{/imports}} -{{#vendorExtensions.x-spring-paginated}} -import org.springframework.data.domain.Pageable; -{{/vendorExtensions.x-spring-paginated}} {{#jdk8}} import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -34,6 +31,7 @@ import java.util.Optional; {{#async}} import java.util.concurrent.{{^jdk8}}Callable{{/jdk8}}{{#jdk8}}CompletableFuture{{/jdk8}}; {{/async}} +import javax.annotation.Generated; {{#operations}} /** @@ -72,7 +70,7 @@ public interface {{classname}}Delegate { */ {{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#isArray}}List<{{/isArray}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, - {{/hasParams}}ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, final org.springframework.data.domain.Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}}{{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}} { + {{/hasParams}}ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, final Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}}{{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}} { {{>methodBody}} }{{/jdk8-default-interface}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/apiException.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/apiException.mustache index 74250662683a..8230cce7664c 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/apiException.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/apiException.mustache @@ -1,5 +1,7 @@ package {{apiPackage}}; +import javax.annotation.Generated; + /** * The exception that can be used to store the HTTP status code returned by an API response. */ diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/apiOriginFilter.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/apiOriginFilter.mustache index 5cf72a7dc42a..9fc5959c49c7 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/apiOriginFilter.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/apiOriginFilter.mustache @@ -2,6 +2,7 @@ package {{apiPackage}}; import java.io.IOException; +import javax.annotation.Generated; import javax.servlet.*; import javax.servlet.http.HttpServletResponse; diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/apiResponseMessage.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/apiResponseMessage.mustache index 17b155f3b693..8faf577c8248 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/apiResponseMessage.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/apiResponseMessage.mustache @@ -1,5 +1,6 @@ package {{apiPackage}}; +import javax.annotation.Generated; import javax.xml.bind.annotation.XmlTransient; {{>generatedAnnotation}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/beanValidation.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/beanValidation.mustache index 06199f2eb442..34c7581d5d43 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/beanValidation.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/beanValidation.mustache @@ -1,6 +1 @@ -{{#required}} - @NotNull -{{/required}}{{#isContainer}}{{^isPrimitiveType}}{{^isEnum}} - @Valid{{/isEnum}}{{/isPrimitiveType}}{{/isContainer}}{{^isContainer}}{{^isPrimitiveType}} - @Valid{{/isPrimitiveType}}{{/isContainer}} -{{>beanValidationCore}} +{{#required}}@NotNull {{/required}}{{#isContainer}}{{^isPrimitiveType}}{{^isEnum}}@Valid {{/isEnum}}{{/isPrimitiveType}}{{/isContainer}}{{^isContainer}}{{^isPrimitiveType}}@Valid {{/isPrimitiveType}}{{/isContainer}}{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/dateTimeParam.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/dateTimeParam.mustache index 3155e5619566..5f4f3a264c19 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/dateTimeParam.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/dateTimeParam.mustache @@ -1 +1 @@ -{{#isDate}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE){{/isDate}}{{#isDateTime}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME){{/isDateTime}} \ No newline at end of file +{{#isDate}} @DateTimeFormat(iso = DateTimeFormat.ISO.DATE){{/isDate}}{{#isDateTime}} @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME){{/isDateTime}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache index 3e5fd7ae4094..0c1156aa15ea 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache @@ -6,7 +6,9 @@ import com.fasterxml.jackson.annotation.JsonValue; /** * {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}} */ -{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}} +{{>generatedAnnotation}} +public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#gson}} {{#allowableValues}}{{#enumVars}} @SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/generatedAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/generatedAnnotation.mustache index 875d7b97afee..2f8ef3059f9a 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/generatedAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/generatedAnnotation.mustache @@ -1 +1 @@ -@javax.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}}) \ No newline at end of file +@Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}}) \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/openapiUiConfiguration.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/openapiUiConfiguration.mustache index 3b44ddf65c49..8709512d54a9 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/openapiUiConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/openapiUiConfiguration.mustache @@ -32,6 +32,7 @@ import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.data.web.PageableHandlerMethodArgumentResolver; import java.util.List; +import javax.annotation.Generated; {{>generatedAnnotation}} @Configuration diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/webApplication.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/webApplication.mustache index 2b16399e9793..ff18a53cdaca 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/webApplication.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/webApplication.mustache @@ -1,6 +1,7 @@ package {{configPackage}}; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; +import javax.annotation.Generated; {{>generatedAnnotation}} public class WebApplication extends AbstractAnnotationConfigDispatcherServletInitializer { diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/webMvcConfiguration.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/webMvcConfiguration.mustache index d60c126316e0..a77ca1552b9e 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/webMvcConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/webMvcConfiguration.mustache @@ -2,6 +2,7 @@ package {{configPackage}}; import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; +import javax.annotation.Generated; {{>generatedAnnotation}} public class WebMvcConfiguration extends WebMvcConfigurationSupport { diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache index 05eb15e10545..18f1ca620719 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache @@ -40,6 +40,7 @@ import org.springframework.hateoas.RepresentationModel; {{/parent}} import java.util.*; +import javax.annotation.Generated; {{#models}} {{#model}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/notFoundException.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/notFoundException.mustache index 40c25c5ea5c4..9eb12cd17f46 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/notFoundException.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/notFoundException.mustache @@ -1,5 +1,7 @@ package {{apiPackage}}; +import javax.annotation.Generated; + {{>generatedAnnotation}} public class NotFoundException extends ApiException { private int code; @@ -7,4 +9,4 @@ public class NotFoundException extends ApiException { super(code, msg); this.code = code; } -} +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/openapiDocumentationConfig.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/openapiDocumentationConfig.mustache index 7dd911a1ae56..cd21ad973ca5 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/openapiDocumentationConfig.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/openapiDocumentationConfig.mustache @@ -18,6 +18,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; {{#useOptional}} import java.util.Optional; {{/useOptional}} +import javax.annotation.Generated; import javax.servlet.ServletContext; {{>generatedAnnotation}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache index f9bc2ae722a0..dd1ac7f2b98a 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache @@ -1,14 +1,24 @@ /** * {{description}}{{^description}}{{classname}}{{/description}} - */{{#description}} -{{#oas3}}@Schema({{#name}}name = "{{name}}",{{/name}}{{/oas3}}{{^oas3}}@ApiModel({{/oas3}}description = "{{{.}}}"){{/description}} -{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}}{{>additionalModelTypeAnnotations}} + */ +{{>additionalModelTypeAnnotations}} +{{#description}} +{{#oas3}}@Schema({{#name}}name = "{{name}}", {{/name}}{{/oas3}}{{^oas3}}@ApiModel({{/oas3}}description = "{{{.}}}") +{{/description}} +{{#discriminator}} +{{>typeInfoAnnotation}} +{{/discriminator}} +{{#withXml}} +{{>xmlAnnotation}} +{{/withXml}} +{{>generatedAnnotation}} public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#hateoas}}extends RepresentationModel<{{classname}}> {{/hateoas}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { {{#serializableModel}} - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; {{/serializableModel}} {{#vars}} + {{#isEnum}} {{^isContainer}} {{>enumClass}} @@ -20,8 +30,10 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#ha {{/isContainer}} {{/isEnum}} {{#jackson}} - @JsonProperty("{{baseName}}"){{#withXml}} - @JacksonXmlProperty({{#isXmlAttribute}}isAttribute = true, {{/isXmlAttribute}}{{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"){{/withXml}} + @JsonProperty("{{baseName}}") + {{#withXml}} + @JacksonXmlProperty({{#isXmlAttribute}}isAttribute = true, {{/isXmlAttribute}}{{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + {{/withXml}} {{/jackson}} {{#gson}} @SerializedName("{{baseName}}") @@ -37,10 +49,10 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#ha {{/isContainer}} {{^isContainer}} {{#isDate}} - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) {{/isDate}} {{#isDateTime}} - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) {{/isDateTime}} {{#openApiNullable}} private {{>nullableDataType}} {{name}}{{#isNullable}} = JsonNullable.undefined(){{/isNullable}}{{^isNullable}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/isNullable}}; @@ -49,9 +61,10 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#ha private {{>nullableDataType}} {{name}}{{#isNullable}} = null{{/isNullable}}{{^isNullable}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/isNullable}}; {{/openApiNullable}} {{/isContainer}} - {{/vars}} {{#vars}} + + {{! begin feature: fluent setter methods }} public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { {{#openApiNullable}} this.{{name}} = {{#isNullable}}JsonNullable.of({{name}}){{/isNullable}}{{^isNullable}}{{name}}{{/isNullable}}; @@ -93,6 +106,8 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#ha return this; } {{/isMap}} + {{! end feature: fluent setter methods }} + {{! begin feature: getter and setter }} /** {{#description}} @@ -109,19 +124,29 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#ha {{/maximum}} * @return {{name}} */ - {{#vendorExtensions.x-extra-annotation}} + {{#vendorExtensions.x-extra-annotation}} {{{vendorExtensions.x-extra-annotation}}} {{/vendorExtensions.x-extra-annotation}} - {{#oas3}}@Schema({{#name}}name = "{{{name}}}", {{/name}}{{/oas3}}{{^oas3}}@ApiModelProperty({{/oas3}}{{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}{{#oas3}}defaultValue = {{/oas3}}{{^oas3}}value = {{/oas3}}"{{{description}}}") -{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{>nullableDataType}} {{getter}}() { + {{#useBeanValidation}} + {{>beanValidation}} + {{/useBeanValidation}} + {{#oas3}} + @Schema(name = "{{{baseName}}}", {{#isReadOnly}}accessMode = Schema.AccessMode.READ_ONLY, {{/isReadOnly}}{{#example}}example = "{{{.}}}", {{/example}}{{#description}}description = "{{{.}}}", {{/description}}required = {{{required}}}) + {{/oas3}} + {{^oas3}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}") + {{/oas3}} + public {{>nullableDataType}} {{getter}}() { return {{name}}; } - {{#vendorExtensions.x-setter-extra-annotation}}{{{vendorExtensions.x-setter-extra-annotation}}} - {{/vendorExtensions.x-setter-extra-annotation}}public void {{setter}}({{>nullableDataType}} {{name}}) { + {{#vendorExtensions.x-setter-extra-annotation}} + {{{vendorExtensions.x-setter-extra-annotation}}} + {{/vendorExtensions.x-setter-extra-annotation}} + public void {{setter}}({{>nullableDataType}} {{name}}) { this.{{name}} = {{name}}; } - + {{! end feature: getter and setter }} {{/vars}} @Override @@ -159,7 +184,9 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#ha public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class {{classname}} {\n"); - {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} + {{#parent}} + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + {{/parent}} {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}})).append("\n"); {{/vars}}sb.append("}"); return sb.toString(); diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/typeInfoAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/typeInfoAnnotation.mustache index 81c2ba05f903..ccb7d4868416 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/typeInfoAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/typeInfoAnnotation.mustache @@ -1,8 +1,7 @@ {{#jackson}} - @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) @JsonSubTypes({ {{#discriminator.mappedModels}} @JsonSubTypes.Type(value = {{modelName}}.class, name = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"), {{/discriminator.mappedModels}} -}){{/jackson}} +}){{/jackson}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/xmlAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/xmlAnnotation.mustache index 70e2626635f4..a9e6fb0fa0bd 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/xmlAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/xmlAnnotation.mustache @@ -3,4 +3,5 @@ @JacksonXmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") {{/jackson}} @XmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") -@XmlAccessorType(XmlAccessType.FIELD){{/withXml}} \ No newline at end of file +@XmlAccessorType(XmlAccessType.FIELD) +{{/withXml}} \ No newline at end of file diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java index bd1ca2e85234..a5b43b0e3b7d 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java @@ -81,14 +81,17 @@ public void doAnnotateDatesOnModelParameters() throws IOException { generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false"); generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "true"); generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "false"); - generator.opts(input).generate(); assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/api/ZebrasApi.java"), - "AnimalParams"); + "AnimalParams"); + + assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/AnimalParams.java"), + "@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)", "@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)"); + assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/AnimalParams.java"), - "@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)", - "@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME)"); + "import org.springframework.format.annotation.DateTimeFormat;" + ); } @Test @@ -207,7 +210,6 @@ public void generateFormatForDateAndDateTimeQueryParam() throws IOException { input.config(codegen); DefaultGenerator generator = new DefaultGenerator(); - generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "false"); generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_TESTS, "false"); generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false"); @@ -217,11 +219,19 @@ public void generateFormatForDateAndDateTimeQueryParam() throws IOException { assertFileContains( Paths.get(outputPath + "/src/main/java/org/openapitools/api/ElephantsApi.java"), - "@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)" + "import org.springframework.format.annotation.DateTimeFormat;" + ); + assertFileContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/api/ElephantsApi.java"), + "@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)" + ); + assertFileContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/api/ZebrasApi.java"), + "import org.springframework.format.annotation.DateTimeFormat;" ); assertFileContains( Paths.get(outputPath + "/src/main/java/org/openapitools/api/ZebrasApi.java"), - "@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME)" + "@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)" ); } @@ -774,4 +784,22 @@ public void testConfigFileGeneration() { fail("OpenAPIDocumentationConfig.java not generated"); } } + + @Test + public void testTypeMappings() { + final SpringCodegen codegen = new SpringCodegen(); + codegen.processOpts(); + Assert.assertEquals(codegen.typeMapping().get("file"), "Resource"); + } + + @Test + public void testImportMappings() { + final SpringCodegen codegen = new SpringCodegen(); + codegen.processOpts(); + Assert.assertEquals(codegen.importMapping().get("Resource"), "org.springframework.core.io.Resource"); + Assert.assertEquals(codegen.importMapping().get("Pageable"), "org.springframework.data.domain.Pageable"); + Assert.assertEquals(codegen.importMapping().get("DateTimeFormat"), "org.springframework.format.annotation.DateTimeFormat"); + Assert.assertEquals(codegen.importMapping().get("ApiIgnore"), "springfox.documentation.annotations.ApiIgnore"); + } + } diff --git a/pom.xml b/pom.xml index f98e1ab25477..6df240be4008 100644 --- a/pom.xml +++ b/pom.xml @@ -1179,6 +1179,7 @@ samples/server/petstore/spring-mvc-j8-async samples/server/petstore/spring-mvc-j8-localdatetime + samples/server/petstore/java-camel samples/server/petstore/jaxrs-jersey samples/server/petstore/jaxrs-spec samples/server/petstore/jaxrs-spec-interface @@ -1246,12 +1247,14 @@ + samples/client/petstore/spring-cloud samples/openapi3/client/petstore/spring-cloud samples/client/petstore/spring-cloud-date-time samples/openapi3/client/petstore/spring-cloud-date-time + samples/client/petstore/spring-stubs + samples/openapi3/client/petstore/spring-stubs - samples/server/petstore/java-camel samples/server/petstore/spring-mvc samples/server/petstore/spring-mvc-default-value samples/server/petstore/spring-mvc-j8-async diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index ff55cadf21fc..d5f991221430 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -22,7 +23,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "Pet", description = "the Pet API") public interface PetApi { diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java index f968f9607750..8967afe8802d 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java @@ -22,7 +22,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "Store", description = "the Store API") public interface StoreApi { diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index 5ca513e5ffea..746cc2472d69 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -23,7 +23,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "User", description = "the User API") public interface UserApi { diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java index f21d835af4da..af9a5d3bbec9 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A category for a pet */ + @ApiModel(description = "A category for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -35,9 +38,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -55,9 +57,8 @@ public Category name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -66,7 +67,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java index ec1b1b81d6a4..3ab8ad09cb6d 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Describes the result of uploading an image resource */ + @ApiModel(description = "Describes the result of uploading an image resource") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -38,9 +41,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -58,9 +60,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -78,9 +79,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -89,7 +89,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java index 2f24cd46851d..658d0de71681 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,13 +16,16 @@ import java.util.*; +import javax.annotation.Generated; /** * An order for a pets from the pet store */ + @ApiModel(description = "An order for a pets from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -32,7 +36,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -87,9 +91,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -107,9 +110,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -127,9 +129,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -147,10 +148,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -168,9 +167,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -188,9 +186,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -199,7 +196,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -226,7 +222,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java index a1f702f1a72f..1c0c076a38c1 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java @@ -18,13 +18,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A pet for sale in the pet store */ + @ApiModel(description = "A pet for sale in the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -91,9 +94,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -111,10 +113,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -132,10 +132,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -158,10 +156,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getPhotoUrls() { return photoUrls; } @@ -187,10 +183,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -208,9 +202,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -219,7 +212,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -246,7 +238,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java index 8e3f67322335..86be70f2d3ed 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A tag for a pet */ + @ApiModel(description = "A tag for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -35,9 +38,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -55,9 +57,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -66,7 +67,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java index 73fcf01b5375..e350716a9338 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A User who is purchasing from the pet store */ + @ApiModel(description = "A User who is purchasing from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -53,9 +56,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -73,9 +75,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -93,9 +94,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -113,9 +113,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -133,9 +132,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -153,9 +151,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -173,9 +170,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -193,9 +189,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -204,7 +199,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -233,7 +227,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java index 54e556cb9ed2..7e8e91235940 100644 --- a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java +++ b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java @@ -5,6 +5,7 @@ */ package org.openapitools.api; +import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDate; import java.time.OffsetDateTime; import io.swagger.annotations.*; @@ -21,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "Default", description = "the Default API") public interface DefaultApi { @@ -49,10 +52,10 @@ public interface DefaultApi { value = "/thingy/{date}" ) ResponseEntity get( - @ApiParam(value = "A date path parameter", required = true) @PathVariable("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @NotNull @ApiParam(value = "A date-time query parameter", required = true) @Valid @RequestParam(value = "dateTime", required = true) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @ApiParam(value = "A date header parameter", required = true) @RequestHeader(value = "X-Order-Date", required = true) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate xOrderDate, - @ApiParam(value = "A date cookie parameter") @CookieValue("loginDate") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate loginDate + @ApiParam(value = "A date path parameter", required = true) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @NotNull @ApiParam(value = "A date-time query parameter", required = true) @Valid @RequestParam(value = "dateTime", required = true) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "A date header parameter", required = true) @RequestHeader(value = "X-Order-Date", required = true) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate xOrderDate, + @ApiParam(value = "A date cookie parameter") @CookieValue("loginDate") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate loginDate ); @@ -79,8 +82,8 @@ ResponseEntity get( consumes = "application/x-www-form-urlencoded" ) ResponseEntity updatePetWithForm( - @ApiParam(value = "A date path parameter", required = true) @PathVariable("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "Updated last vist timestamp") @RequestParam(value="visitDate", required=false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate + @ApiParam(value = "A date path parameter", required = true) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "Updated last vist timestamp") @RequestParam(value="visitDate", required=false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate ); } diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index ac82a073506d..9967f902fbf0 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -5,8 +5,11 @@ */ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -21,7 +24,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "Pet", description = "the Pet API") public interface PetApi { @@ -122,7 +127,7 @@ ResponseEntity deletePet( ) ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ); @@ -160,7 +165,7 @@ ResponseEntity> findPetsByStatus( ) ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ); diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index b4b4df339155..94e33923fb3d 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "Store", description = "the Store API") public interface StoreApi { diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index fdd47d7f560c..5dd5dabb68d0 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "User", description = "the User API") public interface UserApi { diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java index f21d835af4da..af9a5d3bbec9 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A category for a pet */ + @ApiModel(description = "A category for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -35,9 +38,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -55,9 +57,8 @@ public Category name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -66,7 +67,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java index ec1b1b81d6a4..3ab8ad09cb6d 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Describes the result of uploading an image resource */ + @ApiModel(description = "Describes the result of uploading an image resource") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -38,9 +41,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -58,9 +60,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -78,9 +79,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -89,7 +89,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java index 2f24cd46851d..658d0de71681 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,13 +16,16 @@ import java.util.*; +import javax.annotation.Generated; /** * An order for a pets from the pet store */ + @ApiModel(description = "An order for a pets from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -32,7 +36,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -87,9 +91,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -107,9 +110,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -127,9 +129,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -147,10 +148,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -168,9 +167,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -188,9 +186,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -199,7 +196,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -226,7 +222,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java index a1f702f1a72f..1c0c076a38c1 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -18,13 +18,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A pet for sale in the pet store */ + @ApiModel(description = "A pet for sale in the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -91,9 +94,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -111,10 +113,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -132,10 +132,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -158,10 +156,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getPhotoUrls() { return photoUrls; } @@ -187,10 +183,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -208,9 +202,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -219,7 +212,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -246,7 +238,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java index 8e3f67322335..86be70f2d3ed 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A tag for a pet */ + @ApiModel(description = "A tag for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -35,9 +38,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -55,9 +57,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -66,7 +67,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java index 73fcf01b5375..e350716a9338 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A User who is purchasing from the pet store */ + @ApiModel(description = "A User who is purchasing from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -53,9 +56,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -73,9 +75,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -93,9 +94,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -113,9 +113,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -133,9 +132,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -153,9 +151,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -173,9 +170,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -193,9 +189,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -204,7 +199,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -233,7 +227,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index a9cde131118a..5bb72a8db6d2 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -21,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "Pet", description = "the Pet API") public interface PetApi { diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index ab7dd8afc556..cc5a4ab5f125 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "Store", description = "the Store API") public interface StoreApi { diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index e44789929a72..cf4bf1833965 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "User", description = "the User API") public interface UserApi { diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java index 26f5a6768a3d..a34d3d591218 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A category for a pet */ + @ApiModel(description = "A category for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -35,9 +38,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -55,9 +57,8 @@ public Category name(String name) { * Get name * @return name */ + @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiModelProperty(value = "") - -@Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") public String getName() { return name; } @@ -66,7 +67,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java index ec1b1b81d6a4..3ab8ad09cb6d 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Describes the result of uploading an image resource */ + @ApiModel(description = "Describes the result of uploading an image resource") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -38,9 +41,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -58,9 +60,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -78,9 +79,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -89,7 +89,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java index 2f24cd46851d..658d0de71681 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,13 +16,16 @@ import java.util.*; +import javax.annotation.Generated; /** * An order for a pets from the pet store */ + @ApiModel(description = "An order for a pets from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -32,7 +36,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -87,9 +91,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -107,9 +110,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -127,9 +129,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -147,10 +148,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -168,9 +167,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -188,9 +186,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -199,7 +196,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -226,7 +222,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java index a1f702f1a72f..1c0c076a38c1 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java @@ -18,13 +18,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A pet for sale in the pet store */ + @ApiModel(description = "A pet for sale in the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -91,9 +94,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -111,10 +113,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -132,10 +132,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -158,10 +156,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getPhotoUrls() { return photoUrls; } @@ -187,10 +183,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -208,9 +202,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -219,7 +212,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -246,7 +238,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java index 8e3f67322335..86be70f2d3ed 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A tag for a pet */ + @ApiModel(description = "A tag for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -35,9 +38,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -55,9 +57,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -66,7 +67,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java index 73fcf01b5375..e350716a9338 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A User who is purchasing from the pet store */ + @ApiModel(description = "A User who is purchasing from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -53,9 +56,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -73,9 +75,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -93,9 +94,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -113,9 +113,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -133,9 +132,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -153,9 +151,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -173,9 +170,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -193,9 +189,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -204,7 +199,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -233,7 +227,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index a893c6896117..ea38051f7a9f 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -21,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index 1ffe7a38f36a..49e3a394772d 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index 2baaed308ede..1eaf80c61555 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java index f21d835af4da..af9a5d3bbec9 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A category for a pet */ + @ApiModel(description = "A category for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -35,9 +38,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -55,9 +57,8 @@ public Category name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -66,7 +67,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java index ec1b1b81d6a4..3ab8ad09cb6d 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Describes the result of uploading an image resource */ + @ApiModel(description = "Describes the result of uploading an image resource") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -38,9 +41,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -58,9 +60,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -78,9 +79,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -89,7 +89,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java index 2f24cd46851d..658d0de71681 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,13 +16,16 @@ import java.util.*; +import javax.annotation.Generated; /** * An order for a pets from the pet store */ + @ApiModel(description = "An order for a pets from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -32,7 +36,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -87,9 +91,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -107,9 +110,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -127,9 +129,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -147,10 +148,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -168,9 +167,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -188,9 +186,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -199,7 +196,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -226,7 +222,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java index a1f702f1a72f..1c0c076a38c1 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java @@ -18,13 +18,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A pet for sale in the pet store */ + @ApiModel(description = "A pet for sale in the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -91,9 +94,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -111,10 +113,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -132,10 +132,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -158,10 +156,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getPhotoUrls() { return photoUrls; } @@ -187,10 +183,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -208,9 +202,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -219,7 +212,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -246,7 +238,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java index 8e3f67322335..86be70f2d3ed 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A tag for a pet */ + @ApiModel(description = "A tag for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -35,9 +38,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -55,9 +57,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -66,7 +67,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java index 73fcf01b5375..e350716a9338 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A User who is purchasing from the pet store */ + @ApiModel(description = "A User who is purchasing from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -53,9 +56,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -73,9 +75,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -93,9 +94,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -113,9 +113,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -133,9 +132,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -153,9 +151,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -173,9 +170,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -193,9 +189,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -204,7 +199,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -233,7 +227,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index 88803c5bac2a..7e87d57e371f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -29,7 +30,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "Pet", description = "the Pet API") public interface PetApi { @@ -41,6 +44,7 @@ public interface PetApi { * @return Invalid input (status code 405) */ @Operation( + operationId = "addPet", summary = "Add a new pet to the store", tags = { "pet" }, responses = { @@ -68,6 +72,7 @@ CompletableFuture> addPet( * @return Invalid pet value (status code 400) */ @Operation( + operationId = "deletePet", summary = "Deletes a pet", tags = { "pet" }, responses = { @@ -96,6 +101,7 @@ CompletableFuture> deletePet( * or Invalid status value (status code 400) */ @Operation( + operationId = "findPetsByStatus", summary = "Finds Pets by status", tags = { "pet" }, responses = { @@ -126,6 +132,7 @@ CompletableFuture>> findPetsByStatus( * @deprecated */ @Operation( + operationId = "findPetsByTags", summary = "Finds Pets by tags", tags = { "pet" }, responses = { @@ -156,6 +163,7 @@ CompletableFuture>> findPetsByTags( * or Pet not found (status code 404) */ @Operation( + operationId = "getPetById", summary = "Find pet by ID", tags = { "pet" }, responses = { @@ -186,6 +194,7 @@ CompletableFuture> getPetById( * or Validation exception (status code 405) */ @Operation( + operationId = "updatePet", summary = "Update an existing pet", tags = { "pet" }, responses = { @@ -216,6 +225,7 @@ CompletableFuture> updatePet( * @return Invalid input (status code 405) */ @Operation( + operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", tags = { "pet" }, responses = { @@ -246,6 +256,7 @@ CompletableFuture> updatePetWithForm( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFile", summary = "uploads an image", tags = { "pet" }, responses = { diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java index da999d740a5a..e58b40e6494d 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java @@ -29,7 +29,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "Store", description = "the Store API") public interface StoreApi { @@ -43,6 +45,7 @@ public interface StoreApi { * or Order not found (status code 404) */ @Operation( + operationId = "deleteOrder", summary = "Delete purchase order by ID", tags = { "store" }, responses = { @@ -66,6 +69,7 @@ CompletableFuture> deleteOrder( * @return successful operation (status code 200) */ @Operation( + operationId = "getInventory", summary = "Returns pet inventories by status", tags = { "store" }, responses = { @@ -95,6 +99,7 @@ CompletableFuture>> getInventory( * or Order not found (status code 404) */ @Operation( + operationId = "getOrderById", summary = "Find purchase order by ID", tags = { "store" }, responses = { @@ -121,6 +126,7 @@ CompletableFuture> getOrderById( * or Invalid Order (status code 400) */ @Operation( + operationId = "placeOrder", summary = "Place an order for a pet", tags = { "store" }, responses = { diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index 225627cbacc0..7c13a46234c3 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -30,7 +30,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "User", description = "the User API") public interface UserApi { @@ -43,6 +45,7 @@ public interface UserApi { * @return successful operation (status code 200) */ @Operation( + operationId = "createUser", summary = "Create user", tags = { "user" }, responses = { @@ -65,6 +68,7 @@ CompletableFuture> createUser( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -87,6 +91,7 @@ CompletableFuture> createUsersWithArrayInput( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -111,6 +116,7 @@ CompletableFuture> createUsersWithListInput( * or User not found (status code 404) */ @Operation( + operationId = "deleteUser", summary = "Delete user", tags = { "user" }, responses = { @@ -136,6 +142,7 @@ CompletableFuture> deleteUser( * or User not found (status code 404) */ @Operation( + operationId = "getUserByName", summary = "Get user by user name", tags = { "user" }, responses = { @@ -163,6 +170,7 @@ CompletableFuture> getUserByName( * or Invalid username/password supplied (status code 400) */ @Operation( + operationId = "loginUser", summary = "Logs user into the system", tags = { "user" }, responses = { @@ -187,6 +195,7 @@ CompletableFuture> loginUser( * @return successful operation (status code 200) */ @Operation( + operationId = "logoutUser", summary = "Logs out current logged in user session", tags = { "user" }, responses = { @@ -212,6 +221,7 @@ CompletableFuture> logoutUser( * or User not found (status code 404) */ @Operation( + operationId = "updateUser", summary = "Updated user", tags = { "user" }, responses = { diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java index cb69c674a1e4..03e4a4ce0b51 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A category for a pet */ -@Schema(name = "Category",description = "A category for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Category", description = "A category for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -54,9 +56,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ef610e38f01..ea4f1e402648 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Describes the result of uploading an image resource */ -@Schema(name = "ApiResponse",description = "Describes the result of uploading an image resource") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java index 528598b79ea7..e624a0d7c1fe 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -14,13 +15,16 @@ import java.util.*; +import javax.annotation.Generated; /** * An order for a pets from the pet store */ -@Schema(name = "Order",description = "An order for a pets from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Order", description = "An order for a pets from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java index 7c2986fea846..ddff66759bac 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java @@ -17,13 +17,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A pet for sale in the pet store */ -@Schema(name = "Pet",description = "A pet for sale in the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Pet", description = "A pet for sale in the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -90,9 +93,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -110,10 +112,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -131,10 +131,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -157,10 +155,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public List getPhotoUrls() { return photoUrls; } @@ -186,10 +182,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -207,9 +201,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -218,7 +211,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -245,7 +237,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java index 27166f687a27..5c3ac82ba6e8 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A tag for a pet */ -@Schema(name = "Tag",description = "A tag for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Tag", description = "A tag for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java index ba24f681c1df..328569672eb4 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A User who is purchasing from the pet store */ -@Schema(name = "User",description = "A User who is purchasing from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "User", description = "A User who is purchasing from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java index 7dbf104466fb..7eb240e1ccce 100644 --- a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java @@ -5,6 +5,7 @@ */ package org.openapitools.api; +import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDate; import java.time.OffsetDateTime; import io.swagger.v3.oas.annotations.Operation; @@ -28,7 +29,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "Default", description = "the Default API") public interface DefaultApi { @@ -43,8 +46,7 @@ public interface DefaultApi { * @return OK (status code 200) */ @Operation( - summary = "", - tags = { }, + operationId = "get", responses = { @ApiResponse(responseCode = "200", description = "OK") } @@ -54,10 +56,10 @@ public interface DefaultApi { value = "/thingy/{date}" ) ResponseEntity get( - @Parameter(name = "date", description = "A date path parameter", required = true, schema = @Schema(description = "")) @PathVariable("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @NotNull @Parameter(name = "dateTime", description = "A date-time query parameter", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "dateTime", required = true) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, - @Parameter(name = "X-Order-Date", description = "A date header parameter", required = true, schema = @Schema(description = "")) @RequestHeader(value = "X-Order-Date", required = true) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate xOrderDate, - @Parameter(name = "loginDate", description = "A date cookie parameter", schema = @Schema(description = "")) @CookieValue("loginDate") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate loginDate + @Parameter(name = "date", description = "A date path parameter", required = true, schema = @Schema(description = "")) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @NotNull @Parameter(name = "dateTime", description = "A date-time query parameter", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "dateTime", required = true) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "X-Order-Date", description = "A date header parameter", required = true, schema = @Schema(description = "")) @RequestHeader(value = "X-Order-Date", required = true) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate xOrderDate, + @Parameter(name = "loginDate", description = "A date cookie parameter", schema = @Schema(description = "")) @CookieValue("loginDate") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate loginDate ); @@ -70,8 +72,7 @@ ResponseEntity get( * @return Invalid input (status code 405) */ @Operation( - summary = "", - tags = { }, + operationId = "updatePetWithForm", responses = { @ApiResponse(responseCode = "405", description = "Invalid input") } @@ -82,8 +83,8 @@ ResponseEntity get( consumes = "application/x-www-form-urlencoded" ) ResponseEntity updatePetWithForm( - @Parameter(name = "date", description = "A date path parameter", required = true, schema = @Schema(description = "")) @PathVariable("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "visitDate", description = "Updated last vist timestamp", schema = @Schema(description = "")) @RequestParam(value="visitDate", required=false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate + @Parameter(name = "date", description = "A date path parameter", required = true, schema = @Schema(description = "")) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "visitDate", description = "Updated last vist timestamp", schema = @Schema(description = "")) @RequestParam(value="visitDate", required=false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate ); } diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java index 9085e07967bc..a257403c1053 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -27,7 +27,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "AnotherFake", description = "the AnotherFake API") public interface AnotherFakeApi { @@ -40,6 +42,7 @@ public interface AnotherFakeApi { * @return successful operation (status code 200) */ @Operation( + operationId = "call123testSpecialTags", summary = "To test special tags", tags = { "$another-fake?" }, responses = { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java index a9d785eaea31..f6b8fb74feb1 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java @@ -7,11 +7,13 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.v3.oas.annotations.Operation; @@ -35,7 +37,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "Fake", description = "the Fake API") public interface FakeApi { @@ -48,6 +52,7 @@ public interface FakeApi { * @return successful operation (status code 200) */ @Operation( + operationId = "createXmlItem", summary = "creates an XmlItem", tags = { "fake" }, responses = { @@ -72,7 +77,7 @@ ResponseEntity createXmlItem( * @return Output boolean (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterBooleanSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class))) @@ -96,7 +101,7 @@ ResponseEntity fakeOuterBooleanSerialize( * @return Output composite (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterCompositeSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "application/json", schema = @Schema(implementation = OuterComposite.class))) @@ -120,7 +125,7 @@ ResponseEntity fakeOuterCompositeSerialize( * @return Output number (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterNumberSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BigDecimal.class))) @@ -144,7 +149,7 @@ ResponseEntity fakeOuterNumberSerialize( * @return Output string (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterStringSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))) @@ -168,7 +173,7 @@ ResponseEntity fakeOuterStringSerialize( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithFileSchema", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -192,7 +197,7 @@ ResponseEntity testBodyWithFileSchema( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithQueryParams", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -217,6 +222,7 @@ ResponseEntity testBodyWithQueryParams( * @return successful operation (status code 200) */ @Operation( + operationId = "testClientModel", summary = "To test \"client\" model", tags = { "fake" }, responses = { @@ -256,6 +262,7 @@ ResponseEntity testClientModel( * or User not found (status code 404) */ @Operation( + operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags = { "fake" }, responses = { @@ -282,8 +289,8 @@ ResponseEntity testEndpointParameters( @Parameter(name = "float", description = "None", schema = @Schema(description = "")) @RequestParam(value="float", required=false) Float _float, @Parameter(name = "string", description = "None", schema = @Schema(description = "")) @RequestParam(value="string", required=false) String string, @Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestParam("binary") MultipartFile binary, - @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @RequestParam(value="date", required=false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @RequestParam(value="dateTime", required=false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @RequestParam(value="date", required=false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @RequestParam(value="dateTime", required=false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @Parameter(name = "password", description = "None", schema = @Schema(description = "")) @RequestParam(value="password", required=false) String password, @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @RequestParam(value="callback", required=false) String paramCallback ); @@ -305,6 +312,7 @@ ResponseEntity testEndpointParameters( * or Not found (status code 404) */ @Operation( + operationId = "testEnumParameters", summary = "To test enum parameters", tags = { "fake" }, responses = { @@ -342,6 +350,7 @@ ResponseEntity testEnumParameters( * @return Someting wrong (status code 400) */ @Operation( + operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { @@ -369,6 +378,7 @@ ResponseEntity testGroupParameters( * @return successful operation (status code 200) */ @Operation( + operationId = "testInlineAdditionalProperties", summary = "test inline additionalProperties", tags = { "fake" }, responses = { @@ -393,6 +403,7 @@ ResponseEntity testInlineAdditionalProperties( * @return successful operation (status code 200) */ @Operation( + operationId = "testJsonFormData", summary = "test json serialization of form data", tags = { "fake" }, responses = { @@ -422,7 +433,7 @@ ResponseEntity testJsonFormData( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testQueryParameterCollectionFormat", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index 4239438bd3c1..4be02096d7bc 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -27,7 +27,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "FakeClassnameTags123", description = "the FakeClassnameTags123 API") public interface FakeClassnameTags123Api { @@ -40,6 +42,7 @@ public interface FakeClassnameTags123Api { * @return successful operation (status code 200) */ @Operation( + operationId = "testClassname", summary = "To test class name in snake case", tags = { "fake_classname_tags 123#$%^" }, responses = { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java index c618e1e4d902..b5d40e07435a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -29,7 +30,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "Pet", description = "the Pet API") public interface PetApi { @@ -42,6 +45,7 @@ public interface PetApi { * or Invalid input (status code 405) */ @Operation( + operationId = "addPet", summary = "Add a new pet to the store", tags = { "pet" }, responses = { @@ -71,6 +75,7 @@ ResponseEntity addPet( * or Invalid pet value (status code 400) */ @Operation( + operationId = "deletePet", summary = "Deletes a pet", tags = { "pet" }, responses = { @@ -100,6 +105,7 @@ ResponseEntity deletePet( * or Invalid status value (status code 400) */ @Operation( + operationId = "findPetsByStatus", summary = "Finds Pets by status", tags = { "pet" }, responses = { @@ -130,6 +136,7 @@ ResponseEntity> findPetsByStatus( * @deprecated */ @Operation( + operationId = "findPetsByTags", summary = "Finds Pets by tags", tags = { "pet" }, responses = { @@ -160,6 +167,7 @@ ResponseEntity> findPetsByTags( * or Pet not found (status code 404) */ @Operation( + operationId = "getPetById", summary = "Find pet by ID", tags = { "pet" }, responses = { @@ -191,6 +199,7 @@ ResponseEntity getPetById( * or Validation exception (status code 405) */ @Operation( + operationId = "updatePet", summary = "Update an existing pet", tags = { "pet" }, responses = { @@ -222,6 +231,7 @@ ResponseEntity updatePet( * @return Invalid input (status code 405) */ @Operation( + operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", tags = { "pet" }, responses = { @@ -252,6 +262,7 @@ ResponseEntity updatePetWithForm( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFile", summary = "uploads an image", tags = { "pet" }, responses = { @@ -283,6 +294,7 @@ ResponseEntity uploadFile( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFileWithRequiredFile", summary = "uploads an image (required)", tags = { "pet" }, responses = { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java index d8329e19d40b..f660e0a976d3 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java @@ -28,7 +28,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "Store", description = "the Store API") public interface StoreApi { @@ -42,6 +44,7 @@ public interface StoreApi { * or Order not found (status code 404) */ @Operation( + operationId = "deleteOrder", summary = "Delete purchase order by ID", tags = { "store" }, responses = { @@ -65,6 +68,7 @@ ResponseEntity deleteOrder( * @return successful operation (status code 200) */ @Operation( + operationId = "getInventory", summary = "Returns pet inventories by status", tags = { "store" }, responses = { @@ -94,6 +98,7 @@ ResponseEntity> getInventory( * or Order not found (status code 404) */ @Operation( + operationId = "getOrderById", summary = "Find purchase order by ID", tags = { "store" }, responses = { @@ -120,6 +125,7 @@ ResponseEntity getOrderById( * or Invalid Order (status code 400) */ @Operation( + operationId = "placeOrder", summary = "Place an order for a pet", tags = { "store" }, responses = { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java index 665546ec700e..de834ecc2330 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java @@ -29,7 +29,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "User", description = "the User API") public interface UserApi { @@ -42,6 +44,7 @@ public interface UserApi { * @return successful operation (status code 200) */ @Operation( + operationId = "createUser", summary = "Create user", tags = { "user" }, responses = { @@ -64,6 +67,7 @@ ResponseEntity createUser( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -86,6 +90,7 @@ ResponseEntity createUsersWithArrayInput( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -110,6 +115,7 @@ ResponseEntity createUsersWithListInput( * or User not found (status code 404) */ @Operation( + operationId = "deleteUser", summary = "Delete user", tags = { "user" }, responses = { @@ -135,6 +141,7 @@ ResponseEntity deleteUser( * or User not found (status code 404) */ @Operation( + operationId = "getUserByName", summary = "Get user by user name", tags = { "user" }, responses = { @@ -162,6 +169,7 @@ ResponseEntity getUserByName( * or Invalid username/password supplied (status code 400) */ @Operation( + operationId = "loginUser", summary = "Logs user into the system", tags = { "user" }, responses = { @@ -186,6 +194,7 @@ ResponseEntity loginUser( * @return successful operation (status code 200) */ @Operation( + operationId = "logoutUser", summary = "Logs out current logged in user session", tags = { "user" }, responses = { @@ -211,6 +220,7 @@ ResponseEntity logoutUser( * or User not found (status code 404) */ @Operation( + operationId = "updateUser", summary = "Updated user", tags = { "user" }, responses = { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 0c57ae7dd14c..88ea058c0c51 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index b5285ec2f29b..0d4d67f1a9e9 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index f8ca38c286d5..219d797ee642 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index dfd28ccb9963..b2245551ad3e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -80,9 +83,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @Schema(name = "mapString", defaultValue = "") - - + + @Schema(name = "map_string", required = false) public Map getMapString() { return mapString; } @@ -108,10 +110,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Schema(name = "mapNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_number", required = false) public Map getMapNumber() { return mapNumber; } @@ -137,9 +137,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @Schema(name = "mapInteger", defaultValue = "") - - + + @Schema(name = "map_integer", required = false) public Map getMapInteger() { return mapInteger; } @@ -165,9 +164,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @Schema(name = "mapBoolean", defaultValue = "") - - + + @Schema(name = "map_boolean", required = false) public Map getMapBoolean() { return mapBoolean; } @@ -193,10 +191,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -222,10 +218,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Schema(name = "mapArrayAnytype", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_array_anytype", required = false) public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -251,10 +245,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -280,10 +272,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -301,9 +291,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @Schema(name = "anytype1", defaultValue = "") - - + + @Schema(name = "anytype_1", required = false) public Object getAnytype1() { return anytype1; } @@ -321,9 +310,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @Schema(name = "anytype2", defaultValue = "") - - + + @Schema(name = "anytype_2", required = false) public Object getAnytype2() { return anytype2; } @@ -341,9 +329,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @Schema(name = "anytype3", defaultValue = "") - - + + @Schema(name = "anytype_3", required = false) public Object getAnytype3() { return anytype3; } @@ -352,7 +339,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -384,7 +370,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 5fea577ab44b..ea102c40ed2e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index e6eee612a24f..7a3a5d839f8a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index d7116bd7572c..22e47f1bc1cb 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index d2022be266fb..91f47a9e83ee 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java index 6f096d5069ed..ef0fc61b5b6a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java @@ -14,19 +14,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -42,10 +44,8 @@ public Animal className(String className) { * Get className * @return className */ - @Schema(name = "className", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "className", required = true) public String getClassName() { return className; } @@ -63,9 +63,8 @@ public Animal color(String color) { * Get color * @return color */ - @Schema(name = "color", defaultValue = "") - - + + @Schema(name = "color", required = false) public String getColor() { return color; } @@ -74,7 +73,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -97,7 +95,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index ebe36ad761a9..ad560c9d8344 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Schema(name = "arrayArrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayArrayNumber", required = false) public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -54,7 +55,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 8158dd44ab88..4409856d5a37 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Schema(name = "arrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayNumber", required = false) public List getArrayNumber() { return arrayNumber; } @@ -54,7 +55,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java index 420010561bcd..fd25397b6b67 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ArrayTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -50,9 +53,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @Schema(name = "arrayOfString", defaultValue = "") - - + + @Schema(name = "array_of_string", required = false) public List getArrayOfString() { return arrayOfString; } @@ -78,10 +80,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Schema(name = "arrayArrayOfInteger", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_integer", required = false) public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -107,10 +107,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Schema(name = "arrayArrayOfModel", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_model", required = false) public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -119,7 +117,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,7 +140,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java index 7f4a080ad8d2..275a075f527d 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -72,9 +75,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -83,7 +85,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCatAllOf.java index d0a47ab5127c..3640a6301af0 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -70,9 +73,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -81,7 +83,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -103,7 +104,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Capitalization.java index 92d9a7245f16..80d6c5b28514 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Capitalization.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -45,9 +48,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @Schema(name = "smallCamel", defaultValue = "") - - + + @Schema(name = "smallCamel", required = false) public String getSmallCamel() { return smallCamel; } @@ -65,9 +67,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @Schema(name = "capitalCamel", defaultValue = "") - - + + @Schema(name = "CapitalCamel", required = false) public String getCapitalCamel() { return capitalCamel; } @@ -85,9 +86,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @Schema(name = "smallSnake", defaultValue = "") - - + + @Schema(name = "small_Snake", required = false) public String getSmallSnake() { return smallSnake; } @@ -105,9 +105,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @Schema(name = "capitalSnake", defaultValue = "") - - + + @Schema(name = "Capital_Snake", required = false) public String getCapitalSnake() { return capitalSnake; } @@ -125,9 +124,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @Schema(name = "scAETHFlowPoints", defaultValue = "") - - + + @Schema(name = "SCA_ETH_Flow_Points", required = false) public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -145,9 +143,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @Schema(name = "ATT_NAME", defaultValue = "Name of the pet ") - - + + @Schema(name = "ATT_NAME", description = "Name of the pet ", required = false) public String getATTNAME() { return ATT_NAME; } @@ -156,7 +153,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -183,7 +179,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java index 2e496fb4accd..0b3c8b8759b2 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -32,9 +35,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -43,7 +45,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/CatAllOf.java index b732a62b1bc3..19ffd6fffead 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/CatAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -30,9 +33,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -41,7 +43,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java index 038fc8df3afd..66dd429525dd 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -53,10 +55,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public String getName() { return name; } @@ -65,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ClassModel.java index fa2a736f4fb5..13a83893e619 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ClassModel.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ -@Schema(name = "ClassModel",description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "ClassModel", description = "Model for testing model with \"_class\" property") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -31,9 +34,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "_class", required = false) public String getPropertyClass() { return propertyClass; } @@ -42,7 +44,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Client.java index e11bd4ff1b13..9fbd7e3b4338 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Client.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Client.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -30,9 +33,8 @@ public Client client(String client) { * Get client * @return client */ - @Schema(name = "client", defaultValue = "") - - + + @Schema(name = "client", required = false) public String getClient() { return client; } @@ -41,7 +43,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java index ed5dc71a4ba2..36f36600dafa 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -32,9 +35,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -43,7 +45,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/DogAllOf.java index 2c99bc376c34..cc0bafc92e34 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/DogAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -30,9 +33,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -41,7 +43,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java index e1b2df0716a2..c3e82d4c0282 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumArrays.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -107,9 +110,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @Schema(name = "justSymbol", defaultValue = "") - - + + @Schema(name = "just_symbol", required = false) public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -135,9 +137,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @Schema(name = "arrayEnum", defaultValue = "") - - + + @Schema(name = "array_enum", required = false) public List getArrayEnum() { return arrayEnum; } @@ -146,7 +147,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -169,7 +169,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumClass.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumClass.java index e3d30c1ad453..4e6027d16c4e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumClass.java @@ -11,6 +11,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java index 938af53e2b81..19ea0acc7a7c 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -188,9 +191,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @Schema(name = "enumString", defaultValue = "") - - + + @Schema(name = "enum_string", required = false) public EnumStringEnum getEnumString() { return enumString; } @@ -208,10 +210,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @Schema(name = "enumStringRequired", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "enum_string_required", required = true) public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -229,9 +229,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @Schema(name = "enumInteger", defaultValue = "") - - + + @Schema(name = "enum_integer", required = false) public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -249,9 +248,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @Schema(name = "enumNumber", defaultValue = "") - - + + @Schema(name = "enum_number", required = false) public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -269,10 +267,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Schema(name = "outerEnum", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "outerEnum", required = false) public OuterEnum getOuterEnum() { return outerEnum; } @@ -281,7 +277,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -307,7 +302,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/File.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/File.java index 001b30e14755..a2ee29fbfd69 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/File.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/File.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ -@Schema(name = "File",description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "File", description = "Must be named `File` for test.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -31,9 +34,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @Schema(name = "sourceURI", defaultValue = "Test capitalization") - - + + @Schema(name = "sourceURI", description = "Test capitalization", required = false) public String getSourceURI() { return sourceURI; } @@ -42,7 +44,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java index c16669d0c25f..77868e774104 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -37,10 +40,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Schema(name = "file", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "file", required = false) public File getFile() { return file; } @@ -66,10 +67,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Schema(name = "files", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "files", required = false) public List getFiles() { return files; } @@ -78,7 +77,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -101,7 +99,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java index 6546370cd329..0c14e2c93c1b 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java @@ -9,6 +9,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -17,12 +19,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -48,14 +53,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -78,9 +83,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Schema(name = "integer", defaultValue = "") - -@Min(10) @Max(100) + @Min(10) @Max(100) + @Schema(name = "integer", required = false) public Integer getInteger() { return integer; } @@ -100,9 +104,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Schema(name = "int32", defaultValue = "") - -@Min(20) @Max(200) + @Min(20) @Max(200) + @Schema(name = "int32", required = false) public Integer getInt32() { return int32; } @@ -120,9 +123,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @Schema(name = "int64", defaultValue = "") - - + + @Schema(name = "int64", required = false) public Long getInt64() { return int64; } @@ -142,11 +144,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @Schema(name = "number", required = true, defaultValue = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") + @Schema(name = "number", required = true) public BigDecimal getNumber() { return number; } @@ -166,9 +165,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @Schema(name = "_float", defaultValue = "") - -@DecimalMin("54.3") @DecimalMax("987.6") + @DecimalMin("54.3") @DecimalMax("987.6") + @Schema(name = "float", required = false) public Float getFloat() { return _float; } @@ -188,9 +186,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @Schema(name = "_double", defaultValue = "") - -@DecimalMin("67.8") @DecimalMax("123.4") + @DecimalMin("67.8") @DecimalMax("123.4") + @Schema(name = "double", required = false) public Double getDouble() { return _double; } @@ -208,9 +205,8 @@ public FormatTest string(String string) { * Get string * @return string */ - @Schema(name = "string", defaultValue = "") - -@Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "/[a-z]/i") + @Schema(name = "string", required = false) public String getString() { return string; } @@ -228,10 +224,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @Schema(name = "_byte", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "byte", required = true) public byte[] getByte() { return _byte; } @@ -240,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -249,15 +243,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Schema(name = "binary", defaultValue = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + @Valid + @Schema(name = "binary", required = false) + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -270,11 +262,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @Schema(name = "date", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "date", required = true) public LocalDate getDate() { return date; } @@ -292,10 +281,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -313,10 +300,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", required = false) public UUID getUuid() { return uuid; } @@ -334,10 +319,8 @@ public FormatTest password(String password) { * Get password * @return password */ - @Schema(name = "password", required = true, defaultValue = "") - @NotNull - -@Size(min = 10, max = 64) + @NotNull @Size(min = 10, max = 64) + @Schema(name = "password", required = true) public String getPassword() { return password; } @@ -355,10 +338,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Schema(name = "bigDecimal", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "BigDecimal", required = false) public BigDecimal getBigDecimal() { return bigDecimal; } @@ -367,7 +348,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -402,7 +382,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index dfb615a529fc..ec728db1f145 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -53,9 +55,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @Schema(name = "foo", readOnly = true, defaultValue = "") - - + + @Schema(name = "foo", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getFoo() { return foo; } @@ -64,7 +65,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java index 3ff73062758f..2da2a81ac823 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MapTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -90,10 +93,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Schema(name = "mapMapOfString", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_map_of_string", required = false) public Map> getMapMapOfString() { return mapMapOfString; } @@ -119,9 +120,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @Schema(name = "mapOfEnumString", defaultValue = "") - - + + @Schema(name = "map_of_enum_string", required = false) public Map getMapOfEnumString() { return mapOfEnumString; } @@ -147,9 +147,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @Schema(name = "directMap", defaultValue = "") - - + + @Schema(name = "direct_map", required = false) public Map getDirectMap() { return directMap; } @@ -175,9 +174,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @Schema(name = "indirectMap", defaultValue = "") - - + + @Schema(name = "indirect_map", required = false) public Map getIndirectMap() { return indirectMap; } @@ -186,7 +184,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -211,7 +208,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 03a7be43cc4a..9681c13f29d4 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -10,6 +10,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,17 +19,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -44,10 +48,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", required = false) public UUID getUuid() { return uuid; } @@ -65,10 +67,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -94,10 +94,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Schema(name = "map", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map", required = false) public Map getMap() { return map; } @@ -106,7 +104,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -130,7 +127,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Model200Response.java index 77bf91649b08..48528166d1c1 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Model200Response.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ -@Schema(name = "200_response",description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "200_response", description = "Model for testing model name starting with number") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -34,9 +37,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public Integer getName() { return name; } @@ -54,9 +56,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "class", required = false) public String getPropertyClass() { return propertyClass; } @@ -65,7 +66,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelApiResponse.java index 2443600df226..4312ff4cc727 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -36,9 +39,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -56,9 +58,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -76,9 +77,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -87,7 +87,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -111,7 +110,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelList.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelList.java index 03dba2801411..11078e7094e4 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelList.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -30,9 +33,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @Schema(name = "_123list", defaultValue = "") - - + + @Schema(name = "123-list", required = false) public String get123list() { return _123list; } @@ -41,7 +43,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelReturn.java index 0301a47e9f3e..37c94a6aa80e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ModelReturn.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ -@Schema(name = "Return",description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Return", description = "Model for testing reserved words") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -31,9 +34,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @Schema(name = "_return", defaultValue = "") - - + + @Schema(name = "return", required = false) public Integer getReturn() { return _return; } @@ -42,7 +44,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java index 62a16f80ee07..2876e64e9917 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ -@Schema(name = "Name",description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Name", description = "Model for testing model name same as property name") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -40,10 +43,8 @@ public Name name(Integer name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public Integer getName() { return name; } @@ -61,9 +62,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @Schema(name = "snakeCase", readOnly = true, defaultValue = "") - - + + @Schema(name = "snake_case", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer getSnakeCase() { return snakeCase; } @@ -81,9 +81,8 @@ public Name property(String property) { * Get property * @return property */ - @Schema(name = "property", defaultValue = "") - - + + @Schema(name = "property", required = false) public String getProperty() { return property; } @@ -101,9 +100,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @Schema(name = "_123number", readOnly = true, defaultValue = "") - - + + @Schema(name = "123Number", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer get123number() { return _123number; } @@ -112,7 +110,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -137,7 +134,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NumberOnly.java index 521fad80d5a7..05c9f0a77856 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/NumberOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -31,10 +34,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Schema(name = "justNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "JustNumber", required = false) public BigDecimal getJustNumber() { return justNumber; } @@ -43,7 +44,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Order.java index 05071bdfe2bf..90b0d2957184 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Order.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -14,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -30,7 +34,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -85,9 +89,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -105,9 +108,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -125,9 +127,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -145,10 +146,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public OffsetDateTime getShipDate() { return shipDate; } @@ -166,9 +165,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -186,9 +184,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -197,7 +194,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -224,7 +220,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterComposite.java index a721a3dde6a0..14ff8ff8a9f4 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterComposite.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -37,10 +40,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Schema(name = "myNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "my_number", required = false) public BigDecimal getMyNumber() { return myNumber; } @@ -58,9 +59,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @Schema(name = "myString", defaultValue = "") - - + + @Schema(name = "my_string", required = false) public String getMyString() { return myString; } @@ -78,9 +78,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @Schema(name = "myBoolean", defaultValue = "") - - + + @Schema(name = "my_boolean", required = false) public Boolean getMyBoolean() { return myBoolean; } @@ -89,7 +88,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterEnum.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterEnum.java index ba0cca8a5e81..7fdf6f47de31 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/OuterEnum.java @@ -11,6 +11,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java index 988eb317134d..51d583a02e55 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java @@ -20,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -92,9 +95,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -112,10 +114,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -133,10 +133,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -159,10 +157,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public Set getPhotoUrls() { return photoUrls; } @@ -189,10 +185,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -210,9 +204,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -221,7 +214,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -248,7 +240,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 1c51770a8e66..1d95448aeefe 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -53,9 +55,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @Schema(name = "baz", defaultValue = "") - - + + @Schema(name = "baz", required = false) public String getBaz() { return baz; } @@ -64,7 +65,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/SpecialModelName.java index 75f4be4e9f8f..3dcdd9ee3f54 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/SpecialModelName.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -30,9 +33,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @Schema(name = "$specialPropertyName", defaultValue = "") - - + + @Schema(name = "$special[property.name]", required = false) public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -41,7 +43,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Tag.java index 8722df999bfc..6b24df204718 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Tag.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -53,9 +55,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -64,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java index 19e9bf310f76..66695c3e8478 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -46,10 +49,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", required = true) public String getStringItem() { return stringItem; } @@ -67,11 +68,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -89,10 +87,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", required = true) public Integer getIntegerItem() { return integerItem; } @@ -110,10 +106,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", required = true) public Boolean getBoolItem() { return boolItem; } @@ -136,10 +130,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", required = true) public List getArrayItem() { return arrayItem; } @@ -148,7 +140,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -174,7 +165,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java index c9a3762bc74b..fdc9a0960759 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -49,10 +52,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", example = "what", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", example = "what", required = true) public String getStringItem() { return stringItem; } @@ -70,11 +71,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", example = "1.234", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -92,10 +90,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @Schema(name = "floatItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "float_item", example = "1.234", required = true) public Float getFloatItem() { return floatItem; } @@ -113,10 +109,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", example = "-2", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", example = "-2", required = true) public Integer getIntegerItem() { return integerItem; } @@ -134,10 +128,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", example = "true", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", example = "true", required = true) public Boolean getBoolItem() { return boolItem; } @@ -160,10 +152,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", example = "[0, 1, 2, 3]", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", example = "[0, 1, 2, 3]", required = true) public List getArrayItem() { return arrayItem; } @@ -172,7 +162,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -199,7 +188,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/User.java index 83152a155535..9aae48b0ceb2 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/User.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -51,9 +54,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -71,9 +73,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -91,9 +92,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -111,9 +111,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -131,9 +130,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -151,9 +149,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -171,9 +168,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -191,9 +187,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -202,7 +197,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -231,7 +225,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java index 59a183db0f62..b886d9d3f61e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/XmlItem.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -126,9 +129,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @Schema(name = "attributeString", example = "string", defaultValue = "") - - + + @Schema(name = "attribute_string", example = "string", required = false) public String getAttributeString() { return attributeString; } @@ -146,10 +148,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Schema(name = "attributeNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "attribute_number", example = "1.234", required = false) public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -167,9 +167,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @Schema(name = "attributeInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "attribute_integer", example = "-2", required = false) public Integer getAttributeInteger() { return attributeInteger; } @@ -187,9 +186,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @Schema(name = "attributeBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "attribute_boolean", example = "true", required = false) public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -215,9 +213,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @Schema(name = "wrappedArray", defaultValue = "") - - + + @Schema(name = "wrapped_array", required = false) public List getWrappedArray() { return wrappedArray; } @@ -235,9 +232,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @Schema(name = "nameString", example = "string", defaultValue = "") - - + + @Schema(name = "name_string", example = "string", required = false) public String getNameString() { return nameString; } @@ -255,10 +251,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Schema(name = "nameNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "name_number", example = "1.234", required = false) public BigDecimal getNameNumber() { return nameNumber; } @@ -276,9 +270,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @Schema(name = "nameInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "name_integer", example = "-2", required = false) public Integer getNameInteger() { return nameInteger; } @@ -296,9 +289,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @Schema(name = "nameBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "name_boolean", example = "true", required = false) public Boolean getNameBoolean() { return nameBoolean; } @@ -324,9 +316,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @Schema(name = "nameArray", defaultValue = "") - - + + @Schema(name = "name_array", required = false) public List getNameArray() { return nameArray; } @@ -352,9 +343,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @Schema(name = "nameWrappedArray", defaultValue = "") - - + + @Schema(name = "name_wrapped_array", required = false) public List getNameWrappedArray() { return nameWrappedArray; } @@ -372,9 +362,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @Schema(name = "prefixString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_string", example = "string", required = false) public String getPrefixString() { return prefixString; } @@ -392,10 +381,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Schema(name = "prefixNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_number", example = "1.234", required = false) public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -413,9 +400,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @Schema(name = "prefixInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_integer", example = "-2", required = false) public Integer getPrefixInteger() { return prefixInteger; } @@ -433,9 +419,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @Schema(name = "prefixBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_boolean", example = "true", required = false) public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -461,9 +446,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @Schema(name = "prefixArray", defaultValue = "") - - + + @Schema(name = "prefix_array", required = false) public List getPrefixArray() { return prefixArray; } @@ -489,9 +473,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @Schema(name = "prefixWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_wrapped_array", required = false) public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -509,9 +492,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @Schema(name = "namespaceString", example = "string", defaultValue = "") - - + + @Schema(name = "namespace_string", example = "string", required = false) public String getNamespaceString() { return namespaceString; } @@ -529,10 +511,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Schema(name = "namespaceNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "namespace_number", example = "1.234", required = false) public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -550,9 +530,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @Schema(name = "namespaceInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "namespace_integer", example = "-2", required = false) public Integer getNamespaceInteger() { return namespaceInteger; } @@ -570,9 +549,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @Schema(name = "namespaceBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "namespace_boolean", example = "true", required = false) public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -598,9 +576,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @Schema(name = "namespaceArray", defaultValue = "") - - + + @Schema(name = "namespace_array", required = false) public List getNamespaceArray() { return namespaceArray; } @@ -626,9 +603,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @Schema(name = "namespaceWrappedArray", defaultValue = "") - - + + @Schema(name = "namespace_wrapped_array", required = false) public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -646,9 +622,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @Schema(name = "prefixNsString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_ns_string", example = "string", required = false) public String getPrefixNsString() { return prefixNsString; } @@ -666,10 +641,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Schema(name = "prefixNsNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_ns_number", example = "1.234", required = false) public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -687,9 +660,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @Schema(name = "prefixNsInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_ns_integer", example = "-2", required = false) public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -707,9 +679,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @Schema(name = "prefixNsBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_ns_boolean", example = "true", required = false) public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -735,9 +706,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @Schema(name = "prefixNsArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_array", required = false) public List getPrefixNsArray() { return prefixNsArray; } @@ -763,9 +733,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @Schema(name = "prefixNsWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_wrapped_array", required = false) public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -774,7 +743,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -824,7 +792,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 9eb95c97b891..4ae25d24dfb3 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -6,7 +6,9 @@ package org.openapitools.api; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -28,7 +30,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "Pet", description = "the Pet API") public interface PetApi { @@ -40,6 +44,7 @@ public interface PetApi { * @return Invalid input (status code 405) */ @Operation( + operationId = "addPet", summary = "Add a new pet to the store", tags = { "pet" }, responses = { @@ -67,6 +72,7 @@ ResponseEntity addPet( * @return Invalid pet value (status code 400) */ @Operation( + operationId = "deletePet", summary = "Deletes a pet", tags = { "pet" }, responses = { @@ -95,6 +101,7 @@ ResponseEntity deletePet( * or Invalid status value (status code 400) */ @Operation( + operationId = "findPetsByStatus", summary = "Finds Pets by status", tags = { "pet" }, responses = { @@ -112,7 +119,7 @@ ResponseEntity deletePet( ) ResponseEntity> findPetsByStatus( @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, schema = @Schema(description = "", allowableValues = { "available", "pending", "sold" })) @Valid @RequestParam(value = "status", required = true) List status, - final org.springframework.data.domain.Pageable pageable + final Pageable pageable ); @@ -126,6 +133,7 @@ ResponseEntity> findPetsByStatus( * @deprecated */ @Operation( + operationId = "findPetsByTags", summary = "Finds Pets by tags", tags = { "pet" }, responses = { @@ -143,7 +151,7 @@ ResponseEntity> findPetsByStatus( ) ResponseEntity> findPetsByTags( @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "tags", required = true) List tags, - final org.springframework.data.domain.Pageable pageable + final Pageable pageable ); @@ -157,6 +165,7 @@ ResponseEntity> findPetsByTags( * or Pet not found (status code 404) */ @Operation( + operationId = "getPetById", summary = "Find pet by ID", tags = { "pet" }, responses = { @@ -187,6 +196,7 @@ ResponseEntity getPetById( * or Validation exception (status code 405) */ @Operation( + operationId = "updatePet", summary = "Update an existing pet", tags = { "pet" }, responses = { @@ -217,6 +227,7 @@ ResponseEntity updatePet( * @return Invalid input (status code 405) */ @Operation( + operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", tags = { "pet" }, responses = { @@ -247,6 +258,7 @@ ResponseEntity updatePetWithForm( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFile", summary = "uploads an image", tags = { "pet" }, responses = { diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index a11117a8c9fa..680489f3b4a1 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -28,7 +28,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "Store", description = "the Store API") public interface StoreApi { @@ -42,6 +44,7 @@ public interface StoreApi { * or Order not found (status code 404) */ @Operation( + operationId = "deleteOrder", summary = "Delete purchase order by ID", tags = { "store" }, responses = { @@ -65,6 +68,7 @@ ResponseEntity deleteOrder( * @return successful operation (status code 200) */ @Operation( + operationId = "getInventory", summary = "Returns pet inventories by status", tags = { "store" }, responses = { @@ -94,6 +98,7 @@ ResponseEntity> getInventory( * or Order not found (status code 404) */ @Operation( + operationId = "getOrderById", summary = "Find purchase order by ID", tags = { "store" }, responses = { @@ -120,6 +125,7 @@ ResponseEntity getOrderById( * or Invalid Order (status code 400) */ @Operation( + operationId = "placeOrder", summary = "Place an order for a pet", tags = { "store" }, responses = { diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index f583fb099e73..d51556186fe0 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -29,7 +29,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "User", description = "the User API") public interface UserApi { @@ -42,6 +44,7 @@ public interface UserApi { * @return successful operation (status code 200) */ @Operation( + operationId = "createUser", summary = "Create user", tags = { "user" }, responses = { @@ -64,6 +67,7 @@ ResponseEntity createUser( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -86,6 +90,7 @@ ResponseEntity createUsersWithArrayInput( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -110,6 +115,7 @@ ResponseEntity createUsersWithListInput( * or User not found (status code 404) */ @Operation( + operationId = "deleteUser", summary = "Delete user", tags = { "user" }, responses = { @@ -135,6 +141,7 @@ ResponseEntity deleteUser( * or User not found (status code 404) */ @Operation( + operationId = "getUserByName", summary = "Get user by user name", tags = { "user" }, responses = { @@ -162,6 +169,7 @@ ResponseEntity getUserByName( * or Invalid username/password supplied (status code 400) */ @Operation( + operationId = "loginUser", summary = "Logs user into the system", tags = { "user" }, responses = { @@ -186,6 +194,7 @@ ResponseEntity loginUser( * @return successful operation (status code 200) */ @Operation( + operationId = "logoutUser", summary = "Logs out current logged in user session", tags = { "user" }, responses = { @@ -207,6 +216,7 @@ ResponseEntity logoutUser( * @return endpoint configuration response (status code 200) */ @Operation( + operationId = "logoutUserOptions", summary = "logoutUserOptions", tags = { "user" }, responses = { @@ -232,6 +242,7 @@ ResponseEntity logoutUserOptions( * or User not found (status code 404) */ @Operation( + operationId = "updateUser", summary = "Updated user", tags = { "user" }, responses = { diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java index cb69c674a1e4..03e4a4ce0b51 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A category for a pet */ -@Schema(name = "Category",description = "A category for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Category", description = "A category for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -54,9 +56,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ef610e38f01..ea4f1e402648 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Describes the result of uploading an image resource */ -@Schema(name = "ApiResponse",description = "Describes the result of uploading an image resource") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java index 528598b79ea7..e624a0d7c1fe 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -14,13 +15,16 @@ import java.util.*; +import javax.annotation.Generated; /** * An order for a pets from the pet store */ -@Schema(name = "Order",description = "An order for a pets from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Order", description = "An order for a pets from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java index 7c2986fea846..ddff66759bac 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -17,13 +17,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A pet for sale in the pet store */ -@Schema(name = "Pet",description = "A pet for sale in the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Pet", description = "A pet for sale in the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -90,9 +93,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -110,10 +112,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -131,10 +131,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -157,10 +155,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public List getPhotoUrls() { return photoUrls; } @@ -186,10 +182,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -207,9 +201,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -218,7 +211,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -245,7 +237,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java index 27166f687a27..5c3ac82ba6e8 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A tag for a pet */ -@Schema(name = "Tag",description = "A tag for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Tag", description = "A tag for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java index ba24f681c1df..328569672eb4 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A User who is purchasing from the pet store */ -@Schema(name = "User",description = "A User who is purchasing from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "User", description = "A User who is purchasing from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 90dfd2c5f8e9..9f82a4385212 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -28,7 +29,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "Pet", description = "the Pet API") public interface PetApi { @@ -41,6 +44,7 @@ public interface PetApi { * or Invalid input (status code 405) */ @Operation( + operationId = "addPet", summary = "Add a new pet to the store", tags = { "pet" }, responses = { @@ -70,6 +74,7 @@ ResponseEntity addPet( * @return Invalid pet value (status code 400) */ @Operation( + operationId = "deletePet", summary = "Deletes a pet", tags = { "pet" }, responses = { @@ -98,6 +103,7 @@ ResponseEntity deletePet( * or Invalid status value (status code 400) */ @Operation( + operationId = "findPetsByStatus", summary = "Finds Pets by status", tags = { "pet" }, responses = { @@ -128,6 +134,7 @@ ResponseEntity> findPetsByStatus( * @deprecated */ @Operation( + operationId = "findPetsByTags", summary = "Finds Pets by tags", tags = { "pet" }, responses = { @@ -158,6 +165,7 @@ ResponseEntity> findPetsByTags( * or Pet not found (status code 404) */ @Operation( + operationId = "getPetById", summary = "Find pet by ID", tags = { "pet" }, responses = { @@ -189,6 +197,7 @@ ResponseEntity getPetById( * or Validation exception (status code 405) */ @Operation( + operationId = "updatePet", summary = "Update an existing pet", tags = { "pet" }, responses = { @@ -221,6 +230,7 @@ ResponseEntity updatePet( * @return Invalid input (status code 405) */ @Operation( + operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", tags = { "pet" }, responses = { @@ -251,6 +261,7 @@ ResponseEntity updatePetWithForm( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFile", summary = "uploads an image", tags = { "pet" }, responses = { diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index c42b27e3a5b8..a8bab9da996a 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -28,7 +28,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "Store", description = "the Store API") public interface StoreApi { @@ -42,6 +44,7 @@ public interface StoreApi { * or Order not found (status code 404) */ @Operation( + operationId = "deleteOrder", summary = "Delete purchase order by ID", tags = { "store" }, responses = { @@ -65,6 +68,7 @@ ResponseEntity deleteOrder( * @return successful operation (status code 200) */ @Operation( + operationId = "getInventory", summary = "Returns pet inventories by status", tags = { "store" }, responses = { @@ -94,6 +98,7 @@ ResponseEntity> getInventory( * or Order not found (status code 404) */ @Operation( + operationId = "getOrderById", summary = "Find purchase order by ID", tags = { "store" }, responses = { @@ -120,6 +125,7 @@ ResponseEntity getOrderById( * or Invalid Order (status code 400) */ @Operation( + operationId = "placeOrder", summary = "Place an order for a pet", tags = { "store" }, responses = { diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index 5b0522ee7758..6181c9579ead 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -29,7 +29,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "User", description = "the User API") public interface UserApi { @@ -42,6 +44,7 @@ public interface UserApi { * @return successful operation (status code 200) */ @Operation( + operationId = "createUser", summary = "Create user", tags = { "user" }, responses = { @@ -68,6 +71,7 @@ ResponseEntity createUser( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -94,6 +98,7 @@ ResponseEntity createUsersWithArrayInput( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -122,6 +127,7 @@ ResponseEntity createUsersWithListInput( * or User not found (status code 404) */ @Operation( + operationId = "deleteUser", summary = "Delete user", tags = { "user" }, responses = { @@ -150,6 +156,7 @@ ResponseEntity deleteUser( * or User not found (status code 404) */ @Operation( + operationId = "getUserByName", summary = "Get user by user name", tags = { "user" }, responses = { @@ -177,6 +184,7 @@ ResponseEntity getUserByName( * or Invalid username/password supplied (status code 400) */ @Operation( + operationId = "loginUser", summary = "Logs user into the system", tags = { "user" }, responses = { @@ -201,6 +209,7 @@ ResponseEntity loginUser( * @return successful operation (status code 200) */ @Operation( + operationId = "logoutUser", summary = "Logs out current logged in user session", tags = { "user" }, responses = { @@ -229,6 +238,7 @@ ResponseEntity logoutUser( * or User not found (status code 404) */ @Operation( + operationId = "updateUser", summary = "Updated user", tags = { "user" }, responses = { diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java index 463de0ed39a3..823adb2ae4d8 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A category for a pet */ -@Schema(name = "Category",description = "A category for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Category", description = "A category for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -54,9 +56,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - -@Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + @Schema(name = "name", required = false) public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ef610e38f01..ea4f1e402648 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Describes the result of uploading an image resource */ -@Schema(name = "ApiResponse",description = "Describes the result of uploading an image resource") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java index 528598b79ea7..e624a0d7c1fe 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -14,13 +15,16 @@ import java.util.*; +import javax.annotation.Generated; /** * An order for a pets from the pet store */ -@Schema(name = "Order",description = "An order for a pets from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Order", description = "An order for a pets from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java index 7c2986fea846..ddff66759bac 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java @@ -17,13 +17,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A pet for sale in the pet store */ -@Schema(name = "Pet",description = "A pet for sale in the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Pet", description = "A pet for sale in the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -90,9 +93,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -110,10 +112,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -131,10 +131,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -157,10 +155,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public List getPhotoUrls() { return photoUrls; } @@ -186,10 +182,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -207,9 +201,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -218,7 +211,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -245,7 +237,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java index 27166f687a27..5c3ac82ba6e8 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A tag for a pet */ -@Schema(name = "Tag",description = "A tag for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Tag", description = "A tag for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java index ba24f681c1df..328569672eb4 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A User who is purchasing from the pet store */ -@Schema(name = "User",description = "A User who is purchasing from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "User", description = "A User who is purchasing from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/openapi3/client/petstore/spring-stubs/.openapi-generator-ignore b/samples/openapi3/client/petstore/spring-stubs/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/openapi3/client/petstore/spring-stubs/.openapi-generator/FILES b/samples/openapi3/client/petstore/spring-stubs/.openapi-generator/FILES new file mode 100644 index 000000000000..87837793235c --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/.openapi-generator/FILES @@ -0,0 +1,12 @@ +README.md +pom.xml +src/main/java/org/openapitools/api/ApiUtil.java +src/main/java/org/openapitools/api/PetApi.java +src/main/java/org/openapitools/api/StoreApi.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ModelApiResponse.java +src/main/java/org/openapitools/model/Order.java +src/main/java/org/openapitools/model/Pet.java +src/main/java/org/openapitools/model/Tag.java +src/main/java/org/openapitools/model/User.java diff --git a/samples/openapi3/client/petstore/spring-stubs/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-stubs/.openapi-generator/VERSION new file mode 100644 index 000000000000..0984c4c1ad21 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/spring-stubs/README.md b/samples/openapi3/client/petstore/spring-stubs/README.md new file mode 100644 index 000000000000..d43a1de307df --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/README.md @@ -0,0 +1,27 @@ + +# OpenAPI generated API stub + +Spring Framework stub + + +## Overview +This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub. +This is an example of building API stub interfaces in Java using the Spring framework. + +The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints +by adding ```@Controller``` classes that implement the interface. Eg: +```java +@Controller +public class PetController implements PetApi { +// implement all PetApi methods +} +``` + +You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg: +```java +@FeignClient(name="pet", url="http://petstore.swagger.io/v2") +public interface PetClient extends PetApi { + +} +``` diff --git a/samples/openapi3/client/petstore/spring-stubs/pom.xml b/samples/openapi3/client/petstore/spring-stubs/pom.xml new file mode 100644 index 000000000000..5e1f049caf43 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/pom.xml @@ -0,0 +1,65 @@ + + 4.0.0 + org.openapitools.openapi3 + spring-stubs + jar + spring-stubs + 1.0.0 + + 1.8 + ${java.version} + ${java.version} + 2.1.11 + + + org.springframework.boot + spring-boot-starter-parent + 2.5.8 + + + src/main/java + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.data + spring-data-commons + + + io.swagger.core.v3 + swagger-annotations + ${swagger-core-version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.2 + + + + org.springframework.boot + spring-boot-starter-validation + + + com.fasterxml.jackson.core + jackson-databind + + + diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/ApiUtil.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/ApiUtil.java new file mode 100644 index 000000000000..1245b1dd0ccf --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/ApiUtil.java @@ -0,0 +1,19 @@ +package org.openapitools.api; + +import org.springframework.web.context.request.NativeWebRequest; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class ApiUtil { + public static void setExampleResponse(NativeWebRequest req, String contentType, String example) { + try { + HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class); + res.setCharacterEncoding("UTF-8"); + res.addHeader("Content-Type", contentType); + res.getWriter().print(example); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java new file mode 100644 index 000000000000..a8206198c4a8 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -0,0 +1,359 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "pet", description = "the pet API") +public interface PetApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /pet : Add a new pet to the store + * + * @param body Pet object that needs to be added to the store (required) + * @return Invalid input (status code 405) + */ + @Operation( + operationId = "addPet", + summary = "Add a new pet to the store", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet", + consumes = "application/json" + ) + default ResponseEntity addPet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return Invalid pet value (status code 400) + */ + @Operation( + operationId = "deletePet", + summary = "Deletes a pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid pet value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/pet/{petId}" + ) + default ResponseEntity deletePet( + @Parameter(name = "petId", description = "Pet id to delete", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "api_key", description = "", schema = @Schema(description = "")) @RequestHeader(value = "api_key", required = false) String apiKey + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + */ + @Operation( + operationId = "findPetsByStatus", + summary = "Finds Pets by status", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid status value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByStatus", + produces = "application/json" + ) + default ResponseEntity> findPetsByStatus( + @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, schema = @Schema(description = "", allowableValues = { "available", "pending", "sold" })) @Valid @RequestParam(value = "status", required = true) List status + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + */ + @Operation( + operationId = "findPetsByTags", + summary = "Finds Pets by tags", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid tag value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByTags", + produces = "application/json" + ) + default ResponseEntity> findPetsByTags( + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "tags", required = true) List tags + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + */ + @Operation( + operationId = "getPetById", + summary = "Find pet by ID", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/{petId}", + produces = "application/json" + ) + default ResponseEntity getPetById( + @Parameter(name = "petId", description = "ID of pet to return", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /pet : Update an existing pet + * + * @param body Pet object that needs to be added to the store (required) + * @return Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * or Validation exception (status code 405) + */ + @Operation( + operationId = "updatePet", + summary = "Update an existing pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found"), + @ApiResponse(responseCode = "405", description = "Validation exception") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/pet", + consumes = "application/json" + ) + default ResponseEntity updatePet( + @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + */ + @Operation( + operationId = "updatePetWithForm", + summary = "Updates a pet in the store with form data", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}", + consumes = "application/x-www-form-urlencoded" + ) + default ResponseEntity updatePetWithForm( + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "name", description = "Updated name of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "status", required = false) String status + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + */ + @Operation( + operationId = "uploadFile", + summary = "uploads an image", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}/uploadImage", + produces = "application/json", + consumes = "multipart/form-data" + ) + default ResponseEntity uploadFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "file", description = "file to upload", schema = @Schema(description = "")) @RequestPart(value = "file", required = false) MultipartFile file + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java new file mode 100644 index 000000000000..a0f582be8e25 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,189 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "store", description = "the store API") +public interface StoreApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * DELETE /store/order/{orderId} : Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + operationId = "deleteOrder", + summary = "Delete purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/store/order/{orderId}" + ) + default ResponseEntity deleteOrder( + @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("orderId") String orderId + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + */ + @Operation( + operationId = "getInventory", + summary = "Returns pet inventories by status", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class))) + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/inventory", + produces = "application/json" + ) + default ResponseEntity> getInventory( + + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /store/order/{orderId} : Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + operationId = "getOrderById", + summary = "Find purchase order by ID", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/order/{orderId}", + produces = "application/json" + ) + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, schema = @Schema(description = "")) @PathVariable("orderId") Long orderId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /store/order : Place an order for a pet + * + * @param body order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + */ + @Operation( + operationId = "placeOrder", + summary = "Place an order for a pet", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid Order") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/store/order", + produces = "application/json" + ) + default ResponseEntity placeOrder( + @Parameter(name = "body", description = "order placed for purchasing the pet", required = true, schema = @Schema(description = "")) @Valid @RequestBody Order body + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java new file mode 100644 index 000000000000..ea95ba18f55c --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,282 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.4.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.List; +import java.time.OffsetDateTime; +import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "user", description = "the user API") +public interface UserApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param body Created user object (required) + * @return successful operation (status code 200) + */ + @Operation( + operationId = "createUser", + summary = "Create user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user" + ) + default ResponseEntity createUser( + @Parameter(name = "body", description = "Created user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + operationId = "createUsersWithArrayInput", + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithArray" + ) + default ResponseEntity createUsersWithArrayInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + operationId = "createUsersWithListInput", + summary = "Creates list of users with given input array", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithList" + ) + default ResponseEntity createUsersWithListInput( + @Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + operationId = "deleteUser", + summary = "Delete user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/user/{username}" + ) + default ResponseEntity deleteUser( + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /user/{username} : Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + operationId = "getUserByName", + summary = "Get user by user name", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/{username}", + produces = "application/json" + ) + default ResponseEntity getUserByName( + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, schema = @Schema(description = "")) @PathVariable("username") String username + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123 "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /user/login : Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + */ + @Operation( + operationId = "loginUser", + summary = "Logs user into the system", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/login", + produces = "application/json" + ) + default ResponseEntity loginUser( + @NotNull @Parameter(name = "username", description = "The user name for login", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "password", required = true) String password + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /user/logout : Logs out current logged in user session + * + * @return successful operation (status code 200) + */ + @Operation( + operationId = "logoutUser", + summary = "Logs out current logged in user session", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/logout" + ) + default ResponseEntity logoutUser( + + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /user/{username} : Updated user + * This can only be done by the logged in user. + * + * @param username name that need to be deleted (required) + * @param body Updated user object (required) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + operationId = "updateUser", + summary = "Updated user", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid user supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/user/{username}" + ) + default ResponseEntity updateUser( + @Parameter(name = "username", description = "name that need to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username, + @Parameter(name = "body", description = "Updated user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java new file mode 100644 index 000000000000..03e4a4ce0b51 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * A category for a pet + */ + +@Schema(name = "Category", description = "A category for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Category { + + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @Schema(name = "id", required = false) + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Category name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @Schema(name = "name", required = false) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Category category = (Category) o; + return Objects.equals(this.id, category.id) && + Objects.equals(this.name, category.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Category {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java new file mode 100644 index 000000000000..ea4f1e402648 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -0,0 +1,132 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Describes the result of uploading an image resource + */ + +@Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ModelApiResponse { + + @JsonProperty("code") + private Integer code; + + @JsonProperty("type") + private String type; + + @JsonProperty("message") + private String message; + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + + @Schema(name = "code", required = false) + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @Schema(name = "type", required = false) + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + + @Schema(name = "message", required = false) + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java new file mode 100644 index 000000000000..e624a0d7c1fe --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java @@ -0,0 +1,245 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * An order for a pets from the pet store + */ + +@Schema(name = "Order", description = "An order for a pets from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Order { + + @JsonProperty("id") + private Long id; + + @JsonProperty("petId") + private Long petId; + + @JsonProperty("quantity") + private Integer quantity; + + @JsonProperty("shipDate") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + @JsonProperty("complete") + private Boolean complete = false; + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @Schema(name = "id", required = false) + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + */ + + @Schema(name = "petId", required = false) + public Long getPetId() { + return petId; + } + + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + + @Schema(name = "quantity", required = false) + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + */ + @Valid + @Schema(name = "shipDate", required = false) + public OffsetDateTime getShipDate() { + return shipDate; + } + + public void setShipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + */ + + @Schema(name = "status", description = "Order Status", required = false) + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + */ + + @Schema(name = "complete", required = false) + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java new file mode 100644 index 000000000000..ddff66759bac --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java @@ -0,0 +1,261 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.model.Category; +import org.openapitools.model.Tag; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * A pet for sale in the pet store + */ + +@Schema(name = "Pet", description = "A pet for sale in the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Pet { + + @JsonProperty("id") + private Long id; + + @JsonProperty("category") + private Category category; + + @JsonProperty("name") + private String name; + + @JsonProperty("photoUrls") + @Valid + private List photoUrls = new ArrayList<>(); + + @JsonProperty("tags") + @Valid + private List tags = null; + + /** + * pet status in the store + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @Schema(name = "id", required = false) + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + @Valid + @Schema(name = "category", required = false) + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @NotNull + @Schema(name = "name", example = "doggie", required = true) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Pet photoUrls(List photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + */ + @NotNull + @Schema(name = "photoUrls", required = true) + public List getPhotoUrls() { + return photoUrls; + } + + public void setPhotoUrls(List photoUrls) { + this.photoUrls = photoUrls; + } + + public Pet tags(List tags) { + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @Valid + @Schema(name = "tags", required = false) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public Pet status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * pet status in the store + * @return status + */ + + @Schema(name = "status", description = "pet status in the store", required = false) + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Pet pet = (Pet) o; + return Objects.equals(this.id, pet.id) && + Objects.equals(this.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java new file mode 100644 index 000000000000..5c3ac82ba6e8 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * A tag for a pet + */ + +@Schema(name = "Tag", description = "A tag for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Tag { + + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @Schema(name = "id", required = false) + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Tag name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @Schema(name = "name", required = false) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.id, tag.id) && + Objects.equals(this.name, tag.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java new file mode 100644 index 000000000000..328569672eb4 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,252 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * A User who is purchasing from the pet store + */ + +@Schema(name = "User", description = "A User who is purchasing from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class User { + + @JsonProperty("id") + private Long id; + + @JsonProperty("username") + private String username; + + @JsonProperty("firstName") + private String firstName; + + @JsonProperty("lastName") + private String lastName; + + @JsonProperty("email") + private String email; + + @JsonProperty("password") + private String password; + + @JsonProperty("phone") + private String phone; + + @JsonProperty("userStatus") + private Integer userStatus; + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @Schema(name = "id", required = false) + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + + @Schema(name = "username", required = false) + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + */ + + @Schema(name = "firstName", required = false) + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + */ + + @Schema(name = "lastName", required = false) + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + + @Schema(name = "email", required = false) + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + + @Schema(name = "password", required = false) + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + */ + + @Schema(name = "phone", required = false) + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + */ + + @Schema(name = "userStatus", description = "User Status", required = false) + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 81ca2e8ee07c..e6cdc38fc69e 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -23,7 +23,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { @@ -36,6 +38,7 @@ public interface AnotherFakeApi { * @return successful operation (status code 200) */ @Operation( + operationId = "call123testSpecialTags", summary = "To test special tags", tags = { "$another-fake?" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java index 7968826328d7..7c04dd3bba6b 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -26,14 +27,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index d634215d030b..02ebe80dc983 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.v3.oas.annotations.Operation; @@ -32,7 +34,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "fake", description = "the fake API") public interface FakeApi { @@ -45,6 +49,7 @@ public interface FakeApi { * @return successful operation (status code 200) */ @Operation( + operationId = "createXmlItem", summary = "creates an XmlItem", tags = { "fake" }, responses = { @@ -69,7 +74,7 @@ ResponseEntity createXmlItem( * @return Output boolean (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterBooleanSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class))) @@ -93,7 +98,7 @@ ResponseEntity fakeOuterBooleanSerialize( * @return Output composite (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterCompositeSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "application/json", schema = @Schema(implementation = OuterComposite.class))) @@ -117,7 +122,7 @@ ResponseEntity fakeOuterCompositeSerialize( * @return Output number (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterNumberSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BigDecimal.class))) @@ -141,7 +146,7 @@ ResponseEntity fakeOuterNumberSerialize( * @return Output string (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterStringSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))) @@ -165,7 +170,7 @@ ResponseEntity fakeOuterStringSerialize( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithFileSchema", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -189,7 +194,7 @@ ResponseEntity testBodyWithFileSchema( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithQueryParams", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -214,6 +219,7 @@ ResponseEntity testBodyWithQueryParams( * @return successful operation (status code 200) */ @Operation( + operationId = "testClientModel", summary = "To test \"client\" model", tags = { "fake" }, responses = { @@ -253,6 +259,7 @@ ResponseEntity testClientModel( * or User not found (status code 404) */ @Operation( + operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags = { "fake" }, responses = { @@ -279,8 +286,8 @@ ResponseEntity testEndpointParameters( @Parameter(name = "float", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "float", required = false) Float _float, @Parameter(name = "string", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "string", required = false) String string, @Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestPart(value = "binary", required = false) MultipartFile binary, - @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @Parameter(name = "password", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "password", required = false) String password, @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "callback", required = false) String paramCallback ); @@ -302,6 +309,7 @@ ResponseEntity testEndpointParameters( * or Not found (status code 404) */ @Operation( + operationId = "testEnumParameters", summary = "To test enum parameters", tags = { "fake" }, responses = { @@ -339,6 +347,7 @@ ResponseEntity testEnumParameters( * @return Someting wrong (status code 400) */ @Operation( + operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { @@ -366,6 +375,7 @@ ResponseEntity testGroupParameters( * @return successful operation (status code 200) */ @Operation( + operationId = "testInlineAdditionalProperties", summary = "test inline additionalProperties", tags = { "fake" }, responses = { @@ -390,6 +400,7 @@ ResponseEntity testInlineAdditionalProperties( * @return successful operation (status code 200) */ @Operation( + operationId = "testJsonFormData", summary = "test json serialization of form data", tags = { "fake" }, responses = { @@ -419,7 +430,7 @@ ResponseEntity testJsonFormData( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testQueryParameterCollectionFormat", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -447,6 +458,7 @@ ResponseEntity testQueryParameterCollectionFormat( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFileWithRequiredFile", summary = "uploads an image (required)", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java index 362ff5ff5e3a..29b8c0d8176d 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.v3.oas.annotations.Operation; @@ -28,6 +30,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -35,14 +38,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } @@ -215,8 +220,8 @@ public ResponseEntity testEndpointParameters( @Parameter(name = "float", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "float", required = false) Float _float, @Parameter(name = "string", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "string", required = false) String string, @Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestPart(value = "binary", required = false) MultipartFile binary, - @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @Parameter(name = "password", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "password", required = false) String password, @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 5f640ca78deb..bbfe6492b97a 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -23,7 +23,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { @@ -36,6 +38,7 @@ public interface FakeClassnameTestApi { * @return successful operation (status code 200) */ @Operation( + operationId = "testClassname", summary = "To test class name in snake case", tags = { "fake_classname_tags 123#$%^" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 1f416d5ab25f..aaed20e877f5 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -26,14 +27,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index d4cbbab6f7b1..28441b7e8515 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -25,7 +26,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "pet", description = "the pet API") public interface PetApi { @@ -38,6 +41,7 @@ public interface PetApi { * or Invalid input (status code 405) */ @Operation( + operationId = "addPet", summary = "Add a new pet to the store", tags = { "pet" }, responses = { @@ -67,6 +71,7 @@ ResponseEntity addPet( * or Invalid pet value (status code 400) */ @Operation( + operationId = "deletePet", summary = "Deletes a pet", tags = { "pet" }, responses = { @@ -96,6 +101,7 @@ ResponseEntity deletePet( * or Invalid status value (status code 400) */ @Operation( + operationId = "findPetsByStatus", summary = "Finds Pets by status", tags = { "pet" }, responses = { @@ -126,6 +132,7 @@ ResponseEntity> findPetsByStatus( * @deprecated */ @Operation( + operationId = "findPetsByTags", summary = "Finds Pets by tags", tags = { "pet" }, responses = { @@ -156,6 +163,7 @@ ResponseEntity> findPetsByTags( * or Pet not found (status code 404) */ @Operation( + operationId = "getPetById", summary = "Find pet by ID", tags = { "pet" }, responses = { @@ -187,6 +195,7 @@ ResponseEntity getPetById( * or Validation exception (status code 405) */ @Operation( + operationId = "updatePet", summary = "Update an existing pet", tags = { "pet" }, responses = { @@ -218,6 +227,7 @@ ResponseEntity updatePet( * @return Invalid input (status code 405) */ @Operation( + operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", tags = { "pet" }, responses = { @@ -248,6 +258,7 @@ ResponseEntity updatePetWithForm( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFile", summary = "uploads an image", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java index 47d4ffcdb9d9..5b4cc8611ca9 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java @@ -2,6 +2,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -28,14 +30,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index 26389c13ef58..46a9931877bc 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -24,7 +24,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "store", description = "the store API") public interface StoreApi { @@ -38,6 +40,7 @@ public interface StoreApi { * or Order not found (status code 404) */ @Operation( + operationId = "deleteOrder", summary = "Delete purchase order by ID", tags = { "store" }, responses = { @@ -61,6 +64,7 @@ ResponseEntity deleteOrder( * @return successful operation (status code 200) */ @Operation( + operationId = "getInventory", summary = "Returns pet inventories by status", tags = { "store" }, responses = { @@ -90,6 +94,7 @@ ResponseEntity> getInventory( * or Order not found (status code 404) */ @Operation( + operationId = "getOrderById", summary = "Find purchase order by ID", tags = { "store" }, responses = { @@ -116,6 +121,7 @@ ResponseEntity getOrderById( * or Invalid Order (status code 400) */ @Operation( + operationId = "placeOrder", summary = "Place an order for a pet", tags = { "store" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java index 91b88d0652f3..5d9974b56913 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java @@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -27,14 +28,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index 3cdc6eeed919..62d52cbcebf3 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -25,7 +25,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "user", description = "the user API") public interface UserApi { @@ -38,6 +40,7 @@ public interface UserApi { * @return successful operation (status code 200) */ @Operation( + operationId = "createUser", summary = "Create user", tags = { "user" }, responses = { @@ -60,6 +63,7 @@ ResponseEntity createUser( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -82,6 +86,7 @@ ResponseEntity createUsersWithArrayInput( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -106,6 +111,7 @@ ResponseEntity createUsersWithListInput( * or User not found (status code 404) */ @Operation( + operationId = "deleteUser", summary = "Delete user", tags = { "user" }, responses = { @@ -131,6 +137,7 @@ ResponseEntity deleteUser( * or User not found (status code 404) */ @Operation( + operationId = "getUserByName", summary = "Get user by user name", tags = { "user" }, responses = { @@ -158,6 +165,7 @@ ResponseEntity getUserByName( * or Invalid username/password supplied (status code 400) */ @Operation( + operationId = "loginUser", summary = "Logs user into the system", tags = { "user" }, responses = { @@ -182,6 +190,7 @@ ResponseEntity loginUser( * @return successful operation (status code 200) */ @Operation( + operationId = "logoutUser", summary = "Logs out current logged in user session", tags = { "user" }, responses = { @@ -207,6 +216,7 @@ ResponseEntity logoutUser( * or User not found (status code 404) */ @Operation( + operationId = "updateUser", summary = "Updated user", tags = { "user" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java index c77024353b9c..27741595f571 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java @@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -28,14 +29,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 70f6bb0d1c47..1facfb48af62 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -30,9 +33,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -41,7 +43,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index ceb28401cd5e..9775210209ab 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -31,9 +34,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -42,7 +44,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 9455c14cd5fd..d2440961a78c 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -30,9 +33,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -41,7 +43,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 69e4ba3737e9..f28ec12951fd 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -78,9 +81,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @Schema(name = "mapString", defaultValue = "") - - + + @Schema(name = "map_string", required = false) public Map getMapString() { return mapString; } @@ -106,10 +108,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Schema(name = "mapNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_number", required = false) public Map getMapNumber() { return mapNumber; } @@ -135,9 +135,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @Schema(name = "mapInteger", defaultValue = "") - - + + @Schema(name = "map_integer", required = false) public Map getMapInteger() { return mapInteger; } @@ -163,9 +162,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @Schema(name = "mapBoolean", defaultValue = "") - - + + @Schema(name = "map_boolean", required = false) public Map getMapBoolean() { return mapBoolean; } @@ -191,10 +189,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -220,10 +216,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Schema(name = "mapArrayAnytype", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_array_anytype", required = false) public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -249,10 +243,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -278,10 +270,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -299,9 +289,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @Schema(name = "anytype1", defaultValue = "") - - + + @Schema(name = "anytype_1", required = false) public Object getAnytype1() { return anytype1; } @@ -319,9 +308,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @Schema(name = "anytype2", defaultValue = "") - - + + @Schema(name = "anytype_2", required = false) public Object getAnytype2() { return anytype2; } @@ -339,9 +327,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @Schema(name = "anytype3", defaultValue = "") - - + + @Schema(name = "anytype_3", required = false) public Object getAnytype3() { return anytype3; } @@ -350,7 +337,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -382,7 +368,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index fb06ae322e26..2125dd106955 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -30,9 +33,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -41,7 +43,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 71868e473357..788612115c61 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -31,9 +34,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -42,7 +44,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 75db554b3295..f469e4b37d94 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -30,9 +33,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -41,7 +43,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index aa62e4fbb2ea..00091c392dfc 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -30,9 +33,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -41,7 +43,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java index 26eeb264a74d..e762aace509a 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java @@ -12,19 +12,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -40,10 +42,8 @@ public Animal className(String className) { * Get className * @return className */ - @Schema(name = "className", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "className", required = true) public String getClassName() { return className; } @@ -61,9 +61,8 @@ public Animal color(String color) { * Get color * @return color */ - @Schema(name = "color", defaultValue = "") - - + + @Schema(name = "color", required = false) public String getColor() { return color; } @@ -72,7 +71,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -95,7 +93,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 436750d2ef67..0facaee5e606 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -40,10 +43,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Schema(name = "arrayArrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayArrayNumber", required = false) public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -52,7 +53,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -74,7 +74,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index da9c15f73dd1..1be9988fc5bc 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -40,10 +43,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Schema(name = "arrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayNumber", required = false) public List getArrayNumber() { return arrayNumber; } @@ -52,7 +53,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -74,7 +74,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java index 6e995d00cb8d..52090b658b85 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -48,9 +51,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @Schema(name = "arrayOfString", defaultValue = "") - - + + @Schema(name = "array_of_string", required = false) public List getArrayOfString() { return arrayOfString; } @@ -76,10 +78,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Schema(name = "arrayArrayOfInteger", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_integer", required = false) public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -105,10 +105,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Schema(name = "arrayArrayOfModel", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_model", required = false) public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -117,7 +115,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -141,7 +138,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java index 1ca8388a6ce4..455f600b0cee 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -70,9 +73,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -81,7 +83,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java index f39298398eb9..56ea82672354 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -68,9 +71,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -79,7 +81,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -101,7 +102,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java index ac4b97258888..bab70ab41af5 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -43,9 +46,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @Schema(name = "smallCamel", defaultValue = "") - - + + @Schema(name = "smallCamel", required = false) public String getSmallCamel() { return smallCamel; } @@ -63,9 +65,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @Schema(name = "capitalCamel", defaultValue = "") - - + + @Schema(name = "CapitalCamel", required = false) public String getCapitalCamel() { return capitalCamel; } @@ -83,9 +84,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @Schema(name = "smallSnake", defaultValue = "") - - + + @Schema(name = "small_Snake", required = false) public String getSmallSnake() { return smallSnake; } @@ -103,9 +103,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @Schema(name = "capitalSnake", defaultValue = "") - - + + @Schema(name = "Capital_Snake", required = false) public String getCapitalSnake() { return capitalSnake; } @@ -123,9 +122,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @Schema(name = "scAETHFlowPoints", defaultValue = "") - - + + @Schema(name = "SCA_ETH_Flow_Points", required = false) public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -143,9 +141,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @Schema(name = "ATT_NAME", defaultValue = "Name of the pet ") - - + + @Schema(name = "ATT_NAME", description = "Name of the pet ", required = false) public String getATTNAME() { return ATT_NAME; } @@ -154,7 +151,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -181,7 +177,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java index e41f36a626bd..d502537ab4e6 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -30,9 +33,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -41,7 +43,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java index 9bc555ab0007..5354e8af1322 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -28,9 +31,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -39,7 +41,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -61,7 +62,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java index 03a760ee3fd5..57afab36b95e 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -31,9 +34,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -51,10 +53,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public String getName() { return name; } @@ -63,7 +63,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -86,7 +85,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java index 878a45986a82..b31b562dbba5 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java @@ -10,13 +10,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ -@Schema(name = "ClassModel",description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "ClassModel", description = "Model for testing model with \"_class\" property") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -29,9 +32,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "_class", required = false) public String getPropertyClass() { return propertyClass; } @@ -40,7 +42,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -62,7 +63,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java index 74b85fd28234..31927074d37b 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -28,9 +31,8 @@ public Client client(String client) { * Get client * @return client */ - @Schema(name = "client", defaultValue = "") - - + + @Schema(name = "client", required = false) public String getClient() { return client; } @@ -39,7 +41,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -61,7 +62,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java index 1dbce140c902..992bc894a34b 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -30,9 +33,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -41,7 +43,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java index 0af97ffbaf41..a82bcdc49073 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -28,9 +31,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -39,7 +41,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -61,7 +62,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java index ef006f92c684..dabe3611437e 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -105,9 +108,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @Schema(name = "justSymbol", defaultValue = "") - - + + @Schema(name = "just_symbol", required = false) public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -133,9 +135,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @Schema(name = "arrayEnum", defaultValue = "") - - + + @Schema(name = "array_enum", required = false) public List getArrayEnum() { return arrayEnum; } @@ -144,7 +145,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -167,7 +167,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java index f5edf59363ac..d26620f561a6 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java @@ -9,6 +9,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -16,6 +17,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java index f67ec5d041aa..a9cc411bc890 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -186,9 +189,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @Schema(name = "enumString", defaultValue = "") - - + + @Schema(name = "enum_string", required = false) public EnumStringEnum getEnumString() { return enumString; } @@ -206,10 +208,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @Schema(name = "enumStringRequired", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "enum_string_required", required = true) public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -227,9 +227,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @Schema(name = "enumInteger", defaultValue = "") - - + + @Schema(name = "enum_integer", required = false) public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -247,9 +246,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @Schema(name = "enumNumber", defaultValue = "") - - + + @Schema(name = "enum_number", required = false) public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -267,10 +265,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Schema(name = "outerEnum", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "outerEnum", required = false) public OuterEnum getOuterEnum() { return outerEnum; } @@ -279,7 +275,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -305,7 +300,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java index 3eb39014b636..87884c44e796 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java @@ -10,13 +10,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ -@Schema(name = "File",description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "File", description = "Must be named `File` for test.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -29,9 +32,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @Schema(name = "sourceURI", defaultValue = "Test capitalization") - - + + @Schema(name = "sourceURI", description = "Test capitalization", required = false) public String getSourceURI() { return sourceURI; } @@ -40,7 +42,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -62,7 +63,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 0ab7ce083e3a..8d27d598bb27 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -35,10 +38,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Schema(name = "file", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "file", required = false) public File getFile() { return file; } @@ -64,10 +65,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Schema(name = "files", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "files", required = false) public List getFiles() { return files; } @@ -76,7 +75,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -99,7 +97,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java index e0203457d83b..a82f33264d64 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java @@ -7,6 +7,8 @@ import java.math.BigDecimal; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -46,14 +51,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -76,9 +81,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Schema(name = "integer", defaultValue = "") - -@Min(10) @Max(100) + @Min(10) @Max(100) + @Schema(name = "integer", required = false) public Integer getInteger() { return integer; } @@ -98,9 +102,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Schema(name = "int32", defaultValue = "") - -@Min(20) @Max(200) + @Min(20) @Max(200) + @Schema(name = "int32", required = false) public Integer getInt32() { return int32; } @@ -118,9 +121,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @Schema(name = "int64", defaultValue = "") - - + + @Schema(name = "int64", required = false) public Long getInt64() { return int64; } @@ -140,11 +142,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @Schema(name = "number", required = true, defaultValue = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") + @Schema(name = "number", required = true) public BigDecimal getNumber() { return number; } @@ -164,9 +163,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @Schema(name = "_float", defaultValue = "") - -@DecimalMin("54.3") @DecimalMax("987.6") + @DecimalMin("54.3") @DecimalMax("987.6") + @Schema(name = "float", required = false) public Float getFloat() { return _float; } @@ -186,9 +184,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @Schema(name = "_double", defaultValue = "") - -@DecimalMin("67.8") @DecimalMax("123.4") + @DecimalMin("67.8") @DecimalMax("123.4") + @Schema(name = "double", required = false) public Double getDouble() { return _double; } @@ -206,9 +203,8 @@ public FormatTest string(String string) { * Get string * @return string */ - @Schema(name = "string", defaultValue = "") - -@Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "/[a-z]/i") + @Schema(name = "string", required = false) public String getString() { return string; } @@ -226,10 +222,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @Schema(name = "_byte", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "byte", required = true) public byte[] getByte() { return _byte; } @@ -238,7 +232,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -247,15 +241,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Schema(name = "binary", defaultValue = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + @Valid + @Schema(name = "binary", required = false) + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -268,11 +260,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @Schema(name = "date", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "date", required = true) public LocalDate getDate() { return date; } @@ -290,10 +279,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -311,10 +298,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", required = false) public UUID getUuid() { return uuid; } @@ -332,10 +317,8 @@ public FormatTest password(String password) { * Get password * @return password */ - @Schema(name = "password", required = true, defaultValue = "") - @NotNull - -@Size(min = 10, max = 64) + @NotNull @Size(min = 10, max = 64) + @Schema(name = "password", required = true) public String getPassword() { return password; } @@ -353,10 +336,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Schema(name = "bigDecimal", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "BigDecimal", required = false) public BigDecimal getBigDecimal() { return bigDecimal; } @@ -365,7 +346,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -400,7 +380,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index d2f0afa1d4ae..adc53a60f2c2 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -31,9 +34,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -51,9 +53,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @Schema(name = "foo", readOnly = true, defaultValue = "") - - + + @Schema(name = "foo", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getFoo() { return foo; } @@ -62,7 +63,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -85,7 +85,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java index ed29ea575eef..81ec542f86bb 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -88,10 +91,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Schema(name = "mapMapOfString", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_map_of_string", required = false) public Map> getMapMapOfString() { return mapMapOfString; } @@ -117,9 +118,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @Schema(name = "mapOfEnumString", defaultValue = "") - - + + @Schema(name = "map_of_enum_string", required = false) public Map getMapOfEnumString() { return mapOfEnumString; } @@ -145,9 +145,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @Schema(name = "directMap", defaultValue = "") - - + + @Schema(name = "direct_map", required = false) public Map getDirectMap() { return directMap; } @@ -173,9 +172,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @Schema(name = "indirectMap", defaultValue = "") - - + + @Schema(name = "indirect_map", required = false) public Map getIndirectMap() { return indirectMap; } @@ -184,7 +182,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -209,7 +206,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index e846cf63782d..704d5daf9615 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -9,6 +9,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; @@ -16,17 +17,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -42,10 +46,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", required = false) public UUID getUuid() { return uuid; } @@ -63,10 +65,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -92,10 +92,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Schema(name = "map", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map", required = false) public Map getMap() { return map; } @@ -104,7 +102,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -128,7 +125,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java index 8aa5b96e1dae..21c119570b91 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java @@ -10,13 +10,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ -@Schema(name = "200_response",description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "200_response", description = "Model for testing model name starting with number") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -32,9 +35,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public Integer getName() { return name; } @@ -52,9 +54,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "class", required = false) public String getPropertyClass() { return propertyClass; } @@ -63,7 +64,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -86,7 +86,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java index 86af4aba24a0..b2190788b398 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -34,9 +37,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -54,9 +56,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -74,9 +75,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -85,7 +85,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -109,7 +108,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java index 4c81c32e795a..65083e0155bd 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -28,9 +31,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @Schema(name = "_123list", defaultValue = "") - - + + @Schema(name = "123-list", required = false) public String get123list() { return _123list; } @@ -39,7 +41,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -61,7 +62,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java index 06bc8e6627cf..2c77d8a517a2 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java @@ -10,13 +10,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ -@Schema(name = "Return",description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Return", description = "Model for testing reserved words") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -29,9 +32,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @Schema(name = "_return", defaultValue = "") - - + + @Schema(name = "return", required = false) public Integer getReturn() { return _return; } @@ -40,7 +42,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -62,7 +63,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java index 5e755ef8dd18..2dd3efc08b45 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java @@ -10,13 +10,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ -@Schema(name = "Name",description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Name", description = "Model for testing model name same as property name") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -38,10 +41,8 @@ public Name name(Integer name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public Integer getName() { return name; } @@ -59,9 +60,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @Schema(name = "snakeCase", readOnly = true, defaultValue = "") - - + + @Schema(name = "snake_case", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer getSnakeCase() { return snakeCase; } @@ -79,9 +79,8 @@ public Name property(String property) { * Get property * @return property */ - @Schema(name = "property", defaultValue = "") - - + + @Schema(name = "property", required = false) public String getProperty() { return property; } @@ -99,9 +98,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @Schema(name = "_123number", readOnly = true, defaultValue = "") - - + + @Schema(name = "123Number", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer get123number() { return _123number; } @@ -110,7 +108,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -135,7 +132,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java index 88b9009b1dc1..e4f864b35b27 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -29,10 +32,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Schema(name = "justNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "JustNumber", required = false) public BigDecimal getJustNumber() { return justNumber; } @@ -41,7 +42,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +63,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java index 5c9bb7ae7e4a..a69c5a43f4e8 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; @@ -12,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -28,7 +32,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -83,9 +87,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -103,9 +106,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -123,9 +125,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -143,10 +144,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public OffsetDateTime getShipDate() { return shipDate; } @@ -164,9 +163,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -184,9 +182,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -195,7 +192,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -222,7 +218,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java index cea0bf2f7578..2a94c21a95d9 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -35,10 +38,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Schema(name = "myNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "my_number", required = false) public BigDecimal getMyNumber() { return myNumber; } @@ -56,9 +57,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @Schema(name = "myString", defaultValue = "") - - + + @Schema(name = "my_string", required = false) public String getMyString() { return myString; } @@ -76,9 +76,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @Schema(name = "myBoolean", defaultValue = "") - - + + @Schema(name = "my_boolean", required = false) public Boolean getMyBoolean() { return myBoolean; } @@ -87,7 +86,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -111,7 +109,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java index 72e7826828f3..6e050d8e1507 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java @@ -9,6 +9,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -16,6 +17,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java index 9ca656bd9170..5192f3943c04 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java @@ -18,12 +18,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -90,9 +93,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -110,10 +112,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -131,10 +131,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 15b221c739be..cf421153515a 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -31,9 +34,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -51,9 +53,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @Schema(name = "baz", defaultValue = "") - - + + @Schema(name = "baz", required = false) public String getBaz() { return baz; } @@ -62,7 +63,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -85,7 +85,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java index 56ced4dc6f0a..e52a3838938e 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -28,9 +31,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @Schema(name = "$specialPropertyName", defaultValue = "") - - + + @Schema(name = "$special[property.name]", required = false) public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -39,7 +41,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -61,7 +62,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java index f98b6a0b281d..873bb3fc435b 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -31,9 +34,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -51,9 +53,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -62,7 +63,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -85,7 +85,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java index d346c36b80aa..625823af85ea 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -44,10 +47,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", required = true) public String getStringItem() { return stringItem; } @@ -65,11 +66,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -87,10 +85,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", required = true) public Integer getIntegerItem() { return integerItem; } @@ -108,10 +104,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", required = true) public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", required = true) public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java index c62a0e4dc71f..90533252ffd8 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -47,10 +50,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", example = "what", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", example = "what", required = true) public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", example = "1.234", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @Schema(name = "floatItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "float_item", example = "1.234", required = true) public Float getFloatItem() { return floatItem; } @@ -111,10 +107,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", example = "-2", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", example = "-2", required = true) public Integer getIntegerItem() { return integerItem; } @@ -132,10 +126,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", example = "true", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", example = "true", required = true) public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", example = "[0, 1, 2, 3]", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", example = "[0, 1, 2, 3]", required = true) public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java index 155bdf978d59..60b86f5edc60 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java @@ -10,12 +10,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -49,9 +52,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -69,9 +71,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -89,9 +90,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -109,9 +109,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -129,9 +128,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -149,9 +147,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -169,9 +166,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -189,9 +185,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -200,7 +195,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -229,7 +223,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java index 9f829a1a26fe..ac1c8c10e5dc 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -124,9 +127,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @Schema(name = "attributeString", example = "string", defaultValue = "") - - + + @Schema(name = "attribute_string", example = "string", required = false) public String getAttributeString() { return attributeString; } @@ -144,10 +146,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Schema(name = "attributeNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "attribute_number", example = "1.234", required = false) public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -165,9 +165,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @Schema(name = "attributeInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "attribute_integer", example = "-2", required = false) public Integer getAttributeInteger() { return attributeInteger; } @@ -185,9 +184,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @Schema(name = "attributeBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "attribute_boolean", example = "true", required = false) public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -213,9 +211,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @Schema(name = "wrappedArray", defaultValue = "") - - + + @Schema(name = "wrapped_array", required = false) public List getWrappedArray() { return wrappedArray; } @@ -233,9 +230,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @Schema(name = "nameString", example = "string", defaultValue = "") - - + + @Schema(name = "name_string", example = "string", required = false) public String getNameString() { return nameString; } @@ -253,10 +249,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Schema(name = "nameNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "name_number", example = "1.234", required = false) public BigDecimal getNameNumber() { return nameNumber; } @@ -274,9 +268,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @Schema(name = "nameInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "name_integer", example = "-2", required = false) public Integer getNameInteger() { return nameInteger; } @@ -294,9 +287,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @Schema(name = "nameBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "name_boolean", example = "true", required = false) public Boolean getNameBoolean() { return nameBoolean; } @@ -322,9 +314,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @Schema(name = "nameArray", defaultValue = "") - - + + @Schema(name = "name_array", required = false) public List getNameArray() { return nameArray; } @@ -350,9 +341,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @Schema(name = "nameWrappedArray", defaultValue = "") - - + + @Schema(name = "name_wrapped_array", required = false) public List getNameWrappedArray() { return nameWrappedArray; } @@ -370,9 +360,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @Schema(name = "prefixString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_string", example = "string", required = false) public String getPrefixString() { return prefixString; } @@ -390,10 +379,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Schema(name = "prefixNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_number", example = "1.234", required = false) public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -411,9 +398,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @Schema(name = "prefixInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_integer", example = "-2", required = false) public Integer getPrefixInteger() { return prefixInteger; } @@ -431,9 +417,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @Schema(name = "prefixBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_boolean", example = "true", required = false) public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -459,9 +444,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @Schema(name = "prefixArray", defaultValue = "") - - + + @Schema(name = "prefix_array", required = false) public List getPrefixArray() { return prefixArray; } @@ -487,9 +471,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @Schema(name = "prefixWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_wrapped_array", required = false) public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -507,9 +490,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @Schema(name = "namespaceString", example = "string", defaultValue = "") - - + + @Schema(name = "namespace_string", example = "string", required = false) public String getNamespaceString() { return namespaceString; } @@ -527,10 +509,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Schema(name = "namespaceNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "namespace_number", example = "1.234", required = false) public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -548,9 +528,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @Schema(name = "namespaceInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "namespace_integer", example = "-2", required = false) public Integer getNamespaceInteger() { return namespaceInteger; } @@ -568,9 +547,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @Schema(name = "namespaceBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "namespace_boolean", example = "true", required = false) public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -596,9 +574,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @Schema(name = "namespaceArray", defaultValue = "") - - + + @Schema(name = "namespace_array", required = false) public List getNamespaceArray() { return namespaceArray; } @@ -624,9 +601,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @Schema(name = "namespaceWrappedArray", defaultValue = "") - - + + @Schema(name = "namespace_wrapped_array", required = false) public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -644,9 +620,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @Schema(name = "prefixNsString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_ns_string", example = "string", required = false) public String getPrefixNsString() { return prefixNsString; } @@ -664,10 +639,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Schema(name = "prefixNsNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_ns_number", example = "1.234", required = false) public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -685,9 +658,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @Schema(name = "prefixNsInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_ns_integer", example = "-2", required = false) public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -705,9 +677,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @Schema(name = "prefixNsBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_ns_boolean", example = "true", required = false) public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -733,9 +704,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @Schema(name = "prefixNsArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_array", required = false) public List getPrefixNsArray() { return prefixNsArray; } @@ -761,9 +731,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @Schema(name = "prefixNsWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_wrapped_array", required = false) public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -772,7 +741,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -822,7 +790,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index b36ef3022ad8..65e395479d43 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -23,7 +23,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { @@ -40,6 +42,7 @@ default AnotherFakeApiDelegate getDelegate() { * @return successful operation (status code 200) */ @Operation( + operationId = "call123testSpecialTags", summary = "To test special tags", tags = { "$another-fake?" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiController.java index df11134c8067..f57c395c28a6 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final AnotherFakeApiDelegate delegate; - public AnotherFakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) AnotherFakeApiDelegate delegate) { + public AnotherFakeApiController(@Autowired(required = false) AnotherFakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new AnotherFakeApiDelegate() {}); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index a86542ddf223..2d5e24bcd5f6 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -10,12 +10,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface AnotherFakeApiDelegate { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index a1667f68fd91..8f17228b6a26 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.v3.oas.annotations.Operation; @@ -32,7 +34,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "fake", description = "the fake API") public interface FakeApi { @@ -49,6 +53,7 @@ default FakeApiDelegate getDelegate() { * @return successful operation (status code 200) */ @Operation( + operationId = "createXmlItem", summary = "creates an XmlItem", tags = { "fake" }, responses = { @@ -75,7 +80,7 @@ default ResponseEntity createXmlItem( * @return Output boolean (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterBooleanSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class))) @@ -101,7 +106,7 @@ default ResponseEntity fakeOuterBooleanSerialize( * @return Output composite (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterCompositeSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "application/json", schema = @Schema(implementation = OuterComposite.class))) @@ -127,7 +132,7 @@ default ResponseEntity fakeOuterCompositeSerialize( * @return Output number (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterNumberSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BigDecimal.class))) @@ -153,7 +158,7 @@ default ResponseEntity fakeOuterNumberSerialize( * @return Output string (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterStringSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))) @@ -179,7 +184,7 @@ default ResponseEntity fakeOuterStringSerialize( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithFileSchema", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -205,7 +210,7 @@ default ResponseEntity testBodyWithFileSchema( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithQueryParams", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -232,6 +237,7 @@ default ResponseEntity testBodyWithQueryParams( * @return successful operation (status code 200) */ @Operation( + operationId = "testClientModel", summary = "To test \"client\" model", tags = { "fake" }, responses = { @@ -273,6 +279,7 @@ default ResponseEntity testClientModel( * or User not found (status code 404) */ @Operation( + operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags = { "fake" }, responses = { @@ -299,8 +306,8 @@ default ResponseEntity testEndpointParameters( @Parameter(name = "float", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "float", required = false) Float _float, @Parameter(name = "string", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "string", required = false) String string, @Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestPart(value = "binary", required = false) MultipartFile binary, - @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @Parameter(name = "password", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "password", required = false) String password, @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { @@ -324,6 +331,7 @@ default ResponseEntity testEndpointParameters( * or Not found (status code 404) */ @Operation( + operationId = "testEnumParameters", summary = "To test enum parameters", tags = { "fake" }, responses = { @@ -363,6 +371,7 @@ default ResponseEntity testEnumParameters( * @return Someting wrong (status code 400) */ @Operation( + operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { @@ -392,6 +401,7 @@ default ResponseEntity testGroupParameters( * @return successful operation (status code 200) */ @Operation( + operationId = "testInlineAdditionalProperties", summary = "test inline additionalProperties", tags = { "fake" }, responses = { @@ -418,6 +428,7 @@ default ResponseEntity testInlineAdditionalProperties( * @return successful operation (status code 200) */ @Operation( + operationId = "testJsonFormData", summary = "test json serialization of form data", tags = { "fake" }, responses = { @@ -449,7 +460,7 @@ default ResponseEntity testJsonFormData( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testQueryParameterCollectionFormat", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -479,6 +490,7 @@ default ResponseEntity testQueryParameterCollectionFormat( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFileWithRequiredFile", summary = "uploads an image (required)", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java index 6b22c1aba661..501419787efc 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final FakeApiDelegate delegate; - public FakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeApiDelegate delegate) { + public FakeApiController(@Autowired(required = false) FakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeApiDelegate() {}); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java index d3a949e65d81..3796fc00ce58 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.HttpStatus; @@ -19,12 +21,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeApiDelegate { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 52e3ba4f096d..e13856e59a2e 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -23,7 +23,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { @@ -40,6 +42,7 @@ default FakeClassnameTestApiDelegate getDelegate() { * @return successful operation (status code 200) */ @Operation( + operationId = "testClassname", summary = "To test class name in snake case", tags = { "fake_classname_tags 123#$%^" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 58497641e4c5..0e301ab5f9b1 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final FakeClassnameTestApiDelegate delegate; - public FakeClassnameTestApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeClassnameTestApiDelegate delegate) { + public FakeClassnameTestApiController(@Autowired(required = false) FakeClassnameTestApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeClassnameTestApiDelegate() {}); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index ed5a6bfc09a0..fb689b13f943 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -10,12 +10,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeClassnameTestApiDelegate { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index 7ddf343bfc3a..ccc4a0d30157 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -25,7 +26,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "pet", description = "the pet API") public interface PetApi { @@ -42,6 +45,7 @@ default PetApiDelegate getDelegate() { * or Invalid input (status code 405) */ @Operation( + operationId = "addPet", summary = "Add a new pet to the store", tags = { "pet" }, responses = { @@ -73,6 +77,7 @@ default ResponseEntity addPet( * or Invalid pet value (status code 400) */ @Operation( + operationId = "deletePet", summary = "Deletes a pet", tags = { "pet" }, responses = { @@ -104,6 +109,7 @@ default ResponseEntity deletePet( * or Invalid status value (status code 400) */ @Operation( + operationId = "findPetsByStatus", summary = "Finds Pets by status", tags = { "pet" }, responses = { @@ -136,6 +142,7 @@ default ResponseEntity> findPetsByStatus( * @deprecated */ @Operation( + operationId = "findPetsByTags", summary = "Finds Pets by tags", tags = { "pet" }, responses = { @@ -168,6 +175,7 @@ default ResponseEntity> findPetsByTags( * or Pet not found (status code 404) */ @Operation( + operationId = "getPetById", summary = "Find pet by ID", tags = { "pet" }, responses = { @@ -201,6 +209,7 @@ default ResponseEntity getPetById( * or Validation exception (status code 405) */ @Operation( + operationId = "updatePet", summary = "Update an existing pet", tags = { "pet" }, responses = { @@ -234,6 +243,7 @@ default ResponseEntity updatePet( * @return Invalid input (status code 405) */ @Operation( + operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", tags = { "pet" }, responses = { @@ -266,6 +276,7 @@ default ResponseEntity updatePetWithForm( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFile", summary = "uploads an image", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java index 5fa088c6f10b..03b76f0b64b1 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final PetApiDelegate delegate; - public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { + public PetApiController(@Autowired(required = false) PetApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() {}); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java index e3adc7d4bca7..9c616c14aaa8 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -2,6 +2,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -12,12 +13,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface PetApiDelegate { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index de9cf4c59e2a..2c5d36169608 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -24,7 +24,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "store", description = "the store API") public interface StoreApi { @@ -42,6 +44,7 @@ default StoreApiDelegate getDelegate() { * or Order not found (status code 404) */ @Operation( + operationId = "deleteOrder", summary = "Delete purchase order by ID", tags = { "store" }, responses = { @@ -67,6 +70,7 @@ default ResponseEntity deleteOrder( * @return successful operation (status code 200) */ @Operation( + operationId = "getInventory", summary = "Returns pet inventories by status", tags = { "store" }, responses = { @@ -98,6 +102,7 @@ default ResponseEntity> getInventory( * or Order not found (status code 404) */ @Operation( + operationId = "getOrderById", summary = "Find purchase order by ID", tags = { "store" }, responses = { @@ -126,6 +131,7 @@ default ResponseEntity getOrderById( * or Invalid Order (status code 400) */ @Operation( + operationId = "placeOrder", summary = "Place an order for a pet", tags = { "store" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiController.java index 9e08c646ae92..8209043ac020 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final StoreApiDelegate delegate; - public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { + public StoreApiController(@Autowired(required = false) StoreApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() {}); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java index dfe4bb314961..e9b7146b52a8 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -11,12 +11,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface StoreApiDelegate { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index e7dd25c6b5db..c348d32b8c17 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -25,7 +25,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "user", description = "the user API") public interface UserApi { @@ -42,6 +44,7 @@ default UserApiDelegate getDelegate() { * @return successful operation (status code 200) */ @Operation( + operationId = "createUser", summary = "Create user", tags = { "user" }, responses = { @@ -66,6 +69,7 @@ default ResponseEntity createUser( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -90,6 +94,7 @@ default ResponseEntity createUsersWithArrayInput( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -116,6 +121,7 @@ default ResponseEntity createUsersWithListInput( * or User not found (status code 404) */ @Operation( + operationId = "deleteUser", summary = "Delete user", tags = { "user" }, responses = { @@ -143,6 +149,7 @@ default ResponseEntity deleteUser( * or User not found (status code 404) */ @Operation( + operationId = "getUserByName", summary = "Get user by user name", tags = { "user" }, responses = { @@ -172,6 +179,7 @@ default ResponseEntity getUserByName( * or Invalid username/password supplied (status code 400) */ @Operation( + operationId = "loginUser", summary = "Logs user into the system", tags = { "user" }, responses = { @@ -198,6 +206,7 @@ default ResponseEntity loginUser( * @return successful operation (status code 200) */ @Operation( + operationId = "logoutUser", summary = "Logs out current logged in user session", tags = { "user" }, responses = { @@ -225,6 +234,7 @@ default ResponseEntity logoutUser( * or User not found (status code 404) */ @Operation( + operationId = "updateUser", summary = "Updated user", tags = { "user" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiController.java index bc2d33598fd9..82725d160258 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final UserApiDelegate delegate; - public UserApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) UserApiDelegate delegate) { + public UserApiController(@Autowired(required = false) UserApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new UserApiDelegate() {}); } diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java index 2efbd71c9dc9..c39231c6b299 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -12,12 +12,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface UserApiDelegate { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 0c57ae7dd14c..88ea058c0c51 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index b5285ec2f29b..0d4d67f1a9e9 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index f8ca38c286d5..219d797ee642 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index dfd28ccb9963..b2245551ad3e 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -80,9 +83,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @Schema(name = "mapString", defaultValue = "") - - + + @Schema(name = "map_string", required = false) public Map getMapString() { return mapString; } @@ -108,10 +110,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Schema(name = "mapNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_number", required = false) public Map getMapNumber() { return mapNumber; } @@ -137,9 +137,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @Schema(name = "mapInteger", defaultValue = "") - - + + @Schema(name = "map_integer", required = false) public Map getMapInteger() { return mapInteger; } @@ -165,9 +164,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @Schema(name = "mapBoolean", defaultValue = "") - - + + @Schema(name = "map_boolean", required = false) public Map getMapBoolean() { return mapBoolean; } @@ -193,10 +191,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -222,10 +218,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Schema(name = "mapArrayAnytype", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_array_anytype", required = false) public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -251,10 +245,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -280,10 +272,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -301,9 +291,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @Schema(name = "anytype1", defaultValue = "") - - + + @Schema(name = "anytype_1", required = false) public Object getAnytype1() { return anytype1; } @@ -321,9 +310,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @Schema(name = "anytype2", defaultValue = "") - - + + @Schema(name = "anytype_2", required = false) public Object getAnytype2() { return anytype2; } @@ -341,9 +329,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @Schema(name = "anytype3", defaultValue = "") - - + + @Schema(name = "anytype_3", required = false) public Object getAnytype3() { return anytype3; } @@ -352,7 +339,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -384,7 +370,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 5fea577ab44b..ea102c40ed2e 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index e6eee612a24f..7a3a5d839f8a 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index d7116bd7572c..22e47f1bc1cb 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index d2022be266fb..91f47a9e83ee 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java index 6f096d5069ed..ef0fc61b5b6a 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java @@ -14,19 +14,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -42,10 +44,8 @@ public Animal className(String className) { * Get className * @return className */ - @Schema(name = "className", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "className", required = true) public String getClassName() { return className; } @@ -63,9 +63,8 @@ public Animal color(String color) { * Get color * @return color */ - @Schema(name = "color", defaultValue = "") - - + + @Schema(name = "color", required = false) public String getColor() { return color; } @@ -74,7 +73,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -97,7 +95,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index ebe36ad761a9..ad560c9d8344 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Schema(name = "arrayArrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayArrayNumber", required = false) public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -54,7 +55,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 8158dd44ab88..4409856d5a37 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Schema(name = "arrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayNumber", required = false) public List getArrayNumber() { return arrayNumber; } @@ -54,7 +55,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java index 420010561bcd..fd25397b6b67 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -50,9 +53,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @Schema(name = "arrayOfString", defaultValue = "") - - + + @Schema(name = "array_of_string", required = false) public List getArrayOfString() { return arrayOfString; } @@ -78,10 +80,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Schema(name = "arrayArrayOfInteger", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_integer", required = false) public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -107,10 +107,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Schema(name = "arrayArrayOfModel", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_model", required = false) public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -119,7 +117,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,7 +140,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java index 7f4a080ad8d2..275a075f527d 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -72,9 +75,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -83,7 +85,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java index d0a47ab5127c..3640a6301af0 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -70,9 +73,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -81,7 +83,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -103,7 +104,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java index 92d9a7245f16..80d6c5b28514 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -45,9 +48,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @Schema(name = "smallCamel", defaultValue = "") - - + + @Schema(name = "smallCamel", required = false) public String getSmallCamel() { return smallCamel; } @@ -65,9 +67,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @Schema(name = "capitalCamel", defaultValue = "") - - + + @Schema(name = "CapitalCamel", required = false) public String getCapitalCamel() { return capitalCamel; } @@ -85,9 +86,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @Schema(name = "smallSnake", defaultValue = "") - - + + @Schema(name = "small_Snake", required = false) public String getSmallSnake() { return smallSnake; } @@ -105,9 +105,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @Schema(name = "capitalSnake", defaultValue = "") - - + + @Schema(name = "Capital_Snake", required = false) public String getCapitalSnake() { return capitalSnake; } @@ -125,9 +124,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @Schema(name = "scAETHFlowPoints", defaultValue = "") - - + + @Schema(name = "SCA_ETH_Flow_Points", required = false) public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -145,9 +143,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @Schema(name = "ATT_NAME", defaultValue = "Name of the pet ") - - + + @Schema(name = "ATT_NAME", description = "Name of the pet ", required = false) public String getATTNAME() { return ATT_NAME; } @@ -156,7 +153,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -183,7 +179,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java index 2e496fb4accd..0b3c8b8759b2 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -32,9 +35,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -43,7 +45,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java index b732a62b1bc3..19ffd6fffead 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -30,9 +33,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -41,7 +43,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java index 038fc8df3afd..66dd429525dd 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -53,10 +55,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public String getName() { return name; } @@ -65,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java index fa2a736f4fb5..13a83893e619 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ -@Schema(name = "ClassModel",description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "ClassModel", description = "Model for testing model with \"_class\" property") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -31,9 +34,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "_class", required = false) public String getPropertyClass() { return propertyClass; } @@ -42,7 +44,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java index e11bd4ff1b13..9fbd7e3b4338 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -30,9 +33,8 @@ public Client client(String client) { * Get client * @return client */ - @Schema(name = "client", defaultValue = "") - - + + @Schema(name = "client", required = false) public String getClient() { return client; } @@ -41,7 +43,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java index ed5dc71a4ba2..36f36600dafa 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -32,9 +35,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -43,7 +45,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java index 2c99bc376c34..cc0bafc92e34 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -30,9 +33,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -41,7 +43,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java index e1b2df0716a2..c3e82d4c0282 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -107,9 +110,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @Schema(name = "justSymbol", defaultValue = "") - - + + @Schema(name = "just_symbol", required = false) public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -135,9 +137,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @Schema(name = "arrayEnum", defaultValue = "") - - + + @Schema(name = "array_enum", required = false) public List getArrayEnum() { return arrayEnum; } @@ -146,7 +147,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -169,7 +169,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java index e3d30c1ad453..4e6027d16c4e 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java @@ -11,6 +11,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java index 938af53e2b81..19ea0acc7a7c 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -188,9 +191,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @Schema(name = "enumString", defaultValue = "") - - + + @Schema(name = "enum_string", required = false) public EnumStringEnum getEnumString() { return enumString; } @@ -208,10 +210,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @Schema(name = "enumStringRequired", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "enum_string_required", required = true) public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -229,9 +229,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @Schema(name = "enumInteger", defaultValue = "") - - + + @Schema(name = "enum_integer", required = false) public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -249,9 +248,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @Schema(name = "enumNumber", defaultValue = "") - - + + @Schema(name = "enum_number", required = false) public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -269,10 +267,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Schema(name = "outerEnum", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "outerEnum", required = false) public OuterEnum getOuterEnum() { return outerEnum; } @@ -281,7 +277,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -307,7 +302,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java index 001b30e14755..a2ee29fbfd69 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ -@Schema(name = "File",description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "File", description = "Must be named `File` for test.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -31,9 +34,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @Schema(name = "sourceURI", defaultValue = "Test capitalization") - - + + @Schema(name = "sourceURI", description = "Test capitalization", required = false) public String getSourceURI() { return sourceURI; } @@ -42,7 +44,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java index c16669d0c25f..77868e774104 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -37,10 +40,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Schema(name = "file", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "file", required = false) public File getFile() { return file; } @@ -66,10 +67,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Schema(name = "files", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "files", required = false) public List getFiles() { return files; } @@ -78,7 +77,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -101,7 +99,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java index 6546370cd329..0c14e2c93c1b 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java @@ -9,6 +9,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -17,12 +19,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -48,14 +53,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -78,9 +83,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Schema(name = "integer", defaultValue = "") - -@Min(10) @Max(100) + @Min(10) @Max(100) + @Schema(name = "integer", required = false) public Integer getInteger() { return integer; } @@ -100,9 +104,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Schema(name = "int32", defaultValue = "") - -@Min(20) @Max(200) + @Min(20) @Max(200) + @Schema(name = "int32", required = false) public Integer getInt32() { return int32; } @@ -120,9 +123,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @Schema(name = "int64", defaultValue = "") - - + + @Schema(name = "int64", required = false) public Long getInt64() { return int64; } @@ -142,11 +144,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @Schema(name = "number", required = true, defaultValue = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") + @Schema(name = "number", required = true) public BigDecimal getNumber() { return number; } @@ -166,9 +165,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @Schema(name = "_float", defaultValue = "") - -@DecimalMin("54.3") @DecimalMax("987.6") + @DecimalMin("54.3") @DecimalMax("987.6") + @Schema(name = "float", required = false) public Float getFloat() { return _float; } @@ -188,9 +186,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @Schema(name = "_double", defaultValue = "") - -@DecimalMin("67.8") @DecimalMax("123.4") + @DecimalMin("67.8") @DecimalMax("123.4") + @Schema(name = "double", required = false) public Double getDouble() { return _double; } @@ -208,9 +205,8 @@ public FormatTest string(String string) { * Get string * @return string */ - @Schema(name = "string", defaultValue = "") - -@Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "/[a-z]/i") + @Schema(name = "string", required = false) public String getString() { return string; } @@ -228,10 +224,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @Schema(name = "_byte", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "byte", required = true) public byte[] getByte() { return _byte; } @@ -240,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -249,15 +243,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Schema(name = "binary", defaultValue = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + @Valid + @Schema(name = "binary", required = false) + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -270,11 +262,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @Schema(name = "date", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "date", required = true) public LocalDate getDate() { return date; } @@ -292,10 +281,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -313,10 +300,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", required = false) public UUID getUuid() { return uuid; } @@ -334,10 +319,8 @@ public FormatTest password(String password) { * Get password * @return password */ - @Schema(name = "password", required = true, defaultValue = "") - @NotNull - -@Size(min = 10, max = 64) + @NotNull @Size(min = 10, max = 64) + @Schema(name = "password", required = true) public String getPassword() { return password; } @@ -355,10 +338,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Schema(name = "bigDecimal", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "BigDecimal", required = false) public BigDecimal getBigDecimal() { return bigDecimal; } @@ -367,7 +348,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -402,7 +382,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index dfb615a529fc..ec728db1f145 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -53,9 +55,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @Schema(name = "foo", readOnly = true, defaultValue = "") - - + + @Schema(name = "foo", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getFoo() { return foo; } @@ -64,7 +65,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java index 3ff73062758f..2da2a81ac823 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -90,10 +93,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Schema(name = "mapMapOfString", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_map_of_string", required = false) public Map> getMapMapOfString() { return mapMapOfString; } @@ -119,9 +120,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @Schema(name = "mapOfEnumString", defaultValue = "") - - + + @Schema(name = "map_of_enum_string", required = false) public Map getMapOfEnumString() { return mapOfEnumString; } @@ -147,9 +147,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @Schema(name = "directMap", defaultValue = "") - - + + @Schema(name = "direct_map", required = false) public Map getDirectMap() { return directMap; } @@ -175,9 +174,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @Schema(name = "indirectMap", defaultValue = "") - - + + @Schema(name = "indirect_map", required = false) public Map getIndirectMap() { return indirectMap; } @@ -186,7 +184,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -211,7 +208,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 03a7be43cc4a..9681c13f29d4 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -10,6 +10,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,17 +19,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -44,10 +48,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", required = false) public UUID getUuid() { return uuid; } @@ -65,10 +67,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -94,10 +94,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Schema(name = "map", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map", required = false) public Map getMap() { return map; } @@ -106,7 +104,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -130,7 +127,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java index 77bf91649b08..48528166d1c1 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ -@Schema(name = "200_response",description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "200_response", description = "Model for testing model name starting with number") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -34,9 +37,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public Integer getName() { return name; } @@ -54,9 +56,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "class", required = false) public String getPropertyClass() { return propertyClass; } @@ -65,7 +66,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java index 2443600df226..4312ff4cc727 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -36,9 +39,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -56,9 +58,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -76,9 +77,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -87,7 +87,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -111,7 +110,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java index 03dba2801411..11078e7094e4 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -30,9 +33,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @Schema(name = "_123list", defaultValue = "") - - + + @Schema(name = "123-list", required = false) public String get123list() { return _123list; } @@ -41,7 +43,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java index 0301a47e9f3e..37c94a6aa80e 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ -@Schema(name = "Return",description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Return", description = "Model for testing reserved words") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -31,9 +34,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @Schema(name = "_return", defaultValue = "") - - + + @Schema(name = "return", required = false) public Integer getReturn() { return _return; } @@ -42,7 +44,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java index 62a16f80ee07..2876e64e9917 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ -@Schema(name = "Name",description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Name", description = "Model for testing model name same as property name") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -40,10 +43,8 @@ public Name name(Integer name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public Integer getName() { return name; } @@ -61,9 +62,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @Schema(name = "snakeCase", readOnly = true, defaultValue = "") - - + + @Schema(name = "snake_case", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer getSnakeCase() { return snakeCase; } @@ -81,9 +81,8 @@ public Name property(String property) { * Get property * @return property */ - @Schema(name = "property", defaultValue = "") - - + + @Schema(name = "property", required = false) public String getProperty() { return property; } @@ -101,9 +100,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @Schema(name = "_123number", readOnly = true, defaultValue = "") - - + + @Schema(name = "123Number", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer get123number() { return _123number; } @@ -112,7 +110,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -137,7 +134,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java index 521fad80d5a7..05c9f0a77856 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -31,10 +34,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Schema(name = "justNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "JustNumber", required = false) public BigDecimal getJustNumber() { return justNumber; } @@ -43,7 +44,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java index 05071bdfe2bf..90b0d2957184 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -14,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -30,7 +34,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -85,9 +89,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -105,9 +108,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -125,9 +127,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -145,10 +146,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public OffsetDateTime getShipDate() { return shipDate; } @@ -166,9 +165,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -186,9 +184,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -197,7 +194,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -224,7 +220,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java index a721a3dde6a0..14ff8ff8a9f4 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -37,10 +40,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Schema(name = "myNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "my_number", required = false) public BigDecimal getMyNumber() { return myNumber; } @@ -58,9 +59,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @Schema(name = "myString", defaultValue = "") - - + + @Schema(name = "my_string", required = false) public String getMyString() { return myString; } @@ -78,9 +78,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @Schema(name = "myBoolean", defaultValue = "") - - + + @Schema(name = "my_boolean", required = false) public Boolean getMyBoolean() { return myBoolean; } @@ -89,7 +88,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java index ba0cca8a5e81..7fdf6f47de31 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java @@ -11,6 +11,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index 988eb317134d..51d583a02e55 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -20,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -92,9 +95,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -112,10 +114,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -133,10 +133,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -159,10 +157,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public Set getPhotoUrls() { return photoUrls; } @@ -189,10 +185,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -210,9 +204,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -221,7 +214,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -248,7 +240,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 1c51770a8e66..1d95448aeefe 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -53,9 +55,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @Schema(name = "baz", defaultValue = "") - - + + @Schema(name = "baz", required = false) public String getBaz() { return baz; } @@ -64,7 +65,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java index 75f4be4e9f8f..3dcdd9ee3f54 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -30,9 +33,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @Schema(name = "$specialPropertyName", defaultValue = "") - - + + @Schema(name = "$special[property.name]", required = false) public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -41,7 +43,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java index 8722df999bfc..6b24df204718 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -53,9 +55,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -64,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java index 19e9bf310f76..66695c3e8478 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -46,10 +49,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", required = true) public String getStringItem() { return stringItem; } @@ -67,11 +68,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -89,10 +87,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", required = true) public Integer getIntegerItem() { return integerItem; } @@ -110,10 +106,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", required = true) public Boolean getBoolItem() { return boolItem; } @@ -136,10 +130,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", required = true) public List getArrayItem() { return arrayItem; } @@ -148,7 +140,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -174,7 +165,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java index c9a3762bc74b..fdc9a0960759 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -49,10 +52,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", example = "what", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", example = "what", required = true) public String getStringItem() { return stringItem; } @@ -70,11 +71,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", example = "1.234", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -92,10 +90,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @Schema(name = "floatItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "float_item", example = "1.234", required = true) public Float getFloatItem() { return floatItem; } @@ -113,10 +109,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", example = "-2", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", example = "-2", required = true) public Integer getIntegerItem() { return integerItem; } @@ -134,10 +128,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", example = "true", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", example = "true", required = true) public Boolean getBoolItem() { return boolItem; } @@ -160,10 +152,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", example = "[0, 1, 2, 3]", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", example = "[0, 1, 2, 3]", required = true) public List getArrayItem() { return arrayItem; } @@ -172,7 +162,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -199,7 +188,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java index 83152a155535..9aae48b0ceb2 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -51,9 +54,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -71,9 +73,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -91,9 +92,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -111,9 +111,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -131,9 +130,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -151,9 +149,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -171,9 +168,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -191,9 +187,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -202,7 +197,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -231,7 +225,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java index 59a183db0f62..b886d9d3f61e 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -126,9 +129,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @Schema(name = "attributeString", example = "string", defaultValue = "") - - + + @Schema(name = "attribute_string", example = "string", required = false) public String getAttributeString() { return attributeString; } @@ -146,10 +148,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Schema(name = "attributeNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "attribute_number", example = "1.234", required = false) public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -167,9 +167,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @Schema(name = "attributeInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "attribute_integer", example = "-2", required = false) public Integer getAttributeInteger() { return attributeInteger; } @@ -187,9 +186,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @Schema(name = "attributeBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "attribute_boolean", example = "true", required = false) public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -215,9 +213,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @Schema(name = "wrappedArray", defaultValue = "") - - + + @Schema(name = "wrapped_array", required = false) public List getWrappedArray() { return wrappedArray; } @@ -235,9 +232,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @Schema(name = "nameString", example = "string", defaultValue = "") - - + + @Schema(name = "name_string", example = "string", required = false) public String getNameString() { return nameString; } @@ -255,10 +251,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Schema(name = "nameNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "name_number", example = "1.234", required = false) public BigDecimal getNameNumber() { return nameNumber; } @@ -276,9 +270,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @Schema(name = "nameInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "name_integer", example = "-2", required = false) public Integer getNameInteger() { return nameInteger; } @@ -296,9 +289,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @Schema(name = "nameBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "name_boolean", example = "true", required = false) public Boolean getNameBoolean() { return nameBoolean; } @@ -324,9 +316,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @Schema(name = "nameArray", defaultValue = "") - - + + @Schema(name = "name_array", required = false) public List getNameArray() { return nameArray; } @@ -352,9 +343,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @Schema(name = "nameWrappedArray", defaultValue = "") - - + + @Schema(name = "name_wrapped_array", required = false) public List getNameWrappedArray() { return nameWrappedArray; } @@ -372,9 +362,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @Schema(name = "prefixString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_string", example = "string", required = false) public String getPrefixString() { return prefixString; } @@ -392,10 +381,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Schema(name = "prefixNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_number", example = "1.234", required = false) public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -413,9 +400,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @Schema(name = "prefixInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_integer", example = "-2", required = false) public Integer getPrefixInteger() { return prefixInteger; } @@ -433,9 +419,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @Schema(name = "prefixBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_boolean", example = "true", required = false) public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -461,9 +446,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @Schema(name = "prefixArray", defaultValue = "") - - + + @Schema(name = "prefix_array", required = false) public List getPrefixArray() { return prefixArray; } @@ -489,9 +473,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @Schema(name = "prefixWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_wrapped_array", required = false) public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -509,9 +492,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @Schema(name = "namespaceString", example = "string", defaultValue = "") - - + + @Schema(name = "namespace_string", example = "string", required = false) public String getNamespaceString() { return namespaceString; } @@ -529,10 +511,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Schema(name = "namespaceNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "namespace_number", example = "1.234", required = false) public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -550,9 +530,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @Schema(name = "namespaceInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "namespace_integer", example = "-2", required = false) public Integer getNamespaceInteger() { return namespaceInteger; } @@ -570,9 +549,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @Schema(name = "namespaceBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "namespace_boolean", example = "true", required = false) public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -598,9 +576,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @Schema(name = "namespaceArray", defaultValue = "") - - + + @Schema(name = "namespace_array", required = false) public List getNamespaceArray() { return namespaceArray; } @@ -626,9 +603,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @Schema(name = "namespaceWrappedArray", defaultValue = "") - - + + @Schema(name = "namespace_wrapped_array", required = false) public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -646,9 +622,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @Schema(name = "prefixNsString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_ns_string", example = "string", required = false) public String getPrefixNsString() { return prefixNsString; } @@ -666,10 +641,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Schema(name = "prefixNsNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_ns_number", example = "1.234", required = false) public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -687,9 +660,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @Schema(name = "prefixNsInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_ns_integer", example = "-2", required = false) public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -707,9 +679,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @Schema(name = "prefixNsBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_ns_boolean", example = "true", required = false) public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -735,9 +706,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @Schema(name = "prefixNsArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_array", required = false) public List getPrefixNsArray() { return prefixNsArray; } @@ -763,9 +733,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @Schema(name = "prefixNsWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_wrapped_array", required = false) public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -774,7 +743,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -824,7 +792,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index 82a5df22e20e..5b0b00add83c 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -27,7 +27,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { @@ -44,6 +46,7 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @Operation( + operationId = "call123testSpecialTags", summary = "To test special tags", tags = { "$another-fake?" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApiController.java index d8efcca7f8a4..4bad7b07b87d 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index 456caa3cf66f..9bc3c924c700 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.v3.oas.annotations.Operation; @@ -36,7 +38,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "fake", description = "the fake API") public interface FakeApi { @@ -53,6 +57,7 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @Operation( + operationId = "createXmlItem", summary = "creates an XmlItem", tags = { "fake" }, responses = { @@ -82,7 +87,7 @@ default ResponseEntity createXmlItem( * @return Output boolean (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterBooleanSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class))) @@ -111,7 +116,7 @@ default ResponseEntity fakeOuterBooleanSerialize( * @return Output composite (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterCompositeSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "application/json", schema = @Schema(implementation = OuterComposite.class))) @@ -149,7 +154,7 @@ default ResponseEntity fakeOuterCompositeSerialize( * @return Output number (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterNumberSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BigDecimal.class))) @@ -178,7 +183,7 @@ default ResponseEntity fakeOuterNumberSerialize( * @return Output string (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterStringSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))) @@ -207,7 +212,7 @@ default ResponseEntity fakeOuterStringSerialize( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithFileSchema", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -236,7 +241,7 @@ default ResponseEntity testBodyWithFileSchema( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithQueryParams", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -266,6 +271,7 @@ default ResponseEntity testBodyWithQueryParams( * @return successful operation (status code 200) */ @Operation( + operationId = "testClientModel", summary = "To test \"client\" model", tags = { "fake" }, responses = { @@ -319,6 +325,7 @@ default ResponseEntity testClientModel( * or User not found (status code 404) */ @Operation( + operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags = { "fake" }, responses = { @@ -347,8 +354,8 @@ default ResponseEntity testEndpointParameters( @Parameter(name = "float", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "float", required = false) Float _float, @Parameter(name = "string", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "string", required = false) String string, @Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestPart(value = "binary", required = false) MultipartFile binary, - @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @Parameter(name = "password", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "password", required = false) String password, @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { @@ -371,6 +378,7 @@ default ResponseEntity testEndpointParameters( * or Not found (status code 404) */ @Operation( + operationId = "testEnumParameters", summary = "To test enum parameters", tags = { "fake" }, responses = { @@ -411,6 +419,7 @@ default ResponseEntity testEnumParameters( * @return Someting wrong (status code 400) */ @Operation( + operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { @@ -443,6 +452,7 @@ default ResponseEntity testGroupParameters( * @return successful operation (status code 200) */ @Operation( + operationId = "testInlineAdditionalProperties", summary = "test inline additionalProperties", tags = { "fake" }, responses = { @@ -472,6 +482,7 @@ default ResponseEntity testInlineAdditionalProperties( * @return successful operation (status code 200) */ @Operation( + operationId = "testJsonFormData", summary = "test json serialization of form data", tags = { "fake" }, responses = { @@ -506,7 +517,7 @@ default ResponseEntity testJsonFormData( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testQueryParameterCollectionFormat", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -539,6 +550,7 @@ default ResponseEntity testQueryParameterCollectionFormat( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFileWithRequiredFile", summary = "uploads an image (required)", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java index c4b88419aabe..c150dba343e5 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 8f1db4a34810..ada59fbd2be1 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -27,7 +27,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { @@ -44,6 +46,7 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @Operation( + operationId = "testClassname", summary = "To test class name in snake case", tags = { "fake_classname_tags 123#$%^" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 85458b255da5..1fb4dc597f84 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index 67abf9f8cb5e..b44b240e3c38 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -29,7 +30,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "pet", description = "the pet API") public interface PetApi { @@ -46,6 +49,7 @@ default Optional getRequest() { * or Invalid input (status code 405) */ @Operation( + operationId = "addPet", summary = "Add a new pet to the store", tags = { "pet" }, responses = { @@ -79,6 +83,7 @@ default ResponseEntity addPet( * or Invalid pet value (status code 400) */ @Operation( + operationId = "deletePet", summary = "Deletes a pet", tags = { "pet" }, responses = { @@ -113,6 +118,7 @@ default ResponseEntity deletePet( * or Invalid status value (status code 400) */ @Operation( + operationId = "findPetsByStatus", summary = "Finds Pets by status", tags = { "pet" }, responses = { @@ -162,6 +168,7 @@ default ResponseEntity> findPetsByStatus( * @deprecated */ @Operation( + operationId = "findPetsByTags", summary = "Finds Pets by tags", tags = { "pet" }, responses = { @@ -211,6 +218,7 @@ default ResponseEntity> findPetsByTags( * or Pet not found (status code 404) */ @Operation( + operationId = "getPetById", summary = "Find pet by ID", tags = { "pet" }, responses = { @@ -261,6 +269,7 @@ default ResponseEntity getPetById( * or Validation exception (status code 405) */ @Operation( + operationId = "updatePet", summary = "Update an existing pet", tags = { "pet" }, responses = { @@ -297,6 +306,7 @@ default ResponseEntity updatePet( * @return Invalid input (status code 405) */ @Operation( + operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", tags = { "pet" }, responses = { @@ -332,6 +342,7 @@ default ResponseEntity updatePetWithForm( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFile", summary = "uploads an image", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java index e72c57e3cbec..4ad9ef06158b 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index ce360c31059f..3f7578b7e96b 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -28,7 +28,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "store", description = "the store API") public interface StoreApi { @@ -46,6 +48,7 @@ default Optional getRequest() { * or Order not found (status code 404) */ @Operation( + operationId = "deleteOrder", summary = "Delete purchase order by ID", tags = { "store" }, responses = { @@ -74,6 +77,7 @@ default ResponseEntity deleteOrder( * @return successful operation (status code 200) */ @Operation( + operationId = "getInventory", summary = "Returns pet inventories by status", tags = { "store" }, responses = { @@ -108,6 +112,7 @@ default ResponseEntity> getInventory( * or Order not found (status code 404) */ @Operation( + operationId = "getOrderById", summary = "Find purchase order by ID", tags = { "store" }, responses = { @@ -153,6 +158,7 @@ default ResponseEntity getOrderById( * or Invalid Order (status code 400) */ @Operation( + operationId = "placeOrder", summary = "Place an order for a pet", tags = { "store" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApiController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApiController.java index 1293b5c8f6e4..293d3035f805 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index 3f0113d6d1ad..6312c5190a15 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -29,7 +29,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "user", description = "the user API") public interface UserApi { @@ -46,6 +48,7 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @Operation( + operationId = "createUser", summary = "Create user", tags = { "user" }, responses = { @@ -73,6 +76,7 @@ default ResponseEntity createUser( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -100,6 +104,7 @@ default ResponseEntity createUsersWithArrayInput( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -129,6 +134,7 @@ default ResponseEntity createUsersWithListInput( * or User not found (status code 404) */ @Operation( + operationId = "deleteUser", summary = "Delete user", tags = { "user" }, responses = { @@ -159,6 +165,7 @@ default ResponseEntity deleteUser( * or User not found (status code 404) */ @Operation( + operationId = "getUserByName", summary = "Get user by user name", tags = { "user" }, responses = { @@ -205,6 +212,7 @@ default ResponseEntity getUserByName( * or Invalid username/password supplied (status code 400) */ @Operation( + operationId = "loginUser", summary = "Logs user into the system", tags = { "user" }, responses = { @@ -234,6 +242,7 @@ default ResponseEntity loginUser( * @return successful operation (status code 200) */ @Operation( + operationId = "logoutUser", summary = "Logs out current logged in user session", tags = { "user" }, responses = { @@ -264,6 +273,7 @@ default ResponseEntity logoutUser( * or User not found (status code 404) */ @Operation( + operationId = "updateUser", summary = "Updated user", tags = { "user" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApiController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApiController.java index 3f6c4d9a2d6f..aab4767a50d0 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 0c57ae7dd14c..88ea058c0c51 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index b5285ec2f29b..0d4d67f1a9e9 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index f8ca38c286d5..219d797ee642 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index dfd28ccb9963..b2245551ad3e 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -80,9 +83,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @Schema(name = "mapString", defaultValue = "") - - + + @Schema(name = "map_string", required = false) public Map getMapString() { return mapString; } @@ -108,10 +110,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Schema(name = "mapNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_number", required = false) public Map getMapNumber() { return mapNumber; } @@ -137,9 +137,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @Schema(name = "mapInteger", defaultValue = "") - - + + @Schema(name = "map_integer", required = false) public Map getMapInteger() { return mapInteger; } @@ -165,9 +164,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @Schema(name = "mapBoolean", defaultValue = "") - - + + @Schema(name = "map_boolean", required = false) public Map getMapBoolean() { return mapBoolean; } @@ -193,10 +191,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -222,10 +218,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Schema(name = "mapArrayAnytype", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_array_anytype", required = false) public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -251,10 +245,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -280,10 +272,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -301,9 +291,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @Schema(name = "anytype1", defaultValue = "") - - + + @Schema(name = "anytype_1", required = false) public Object getAnytype1() { return anytype1; } @@ -321,9 +310,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @Schema(name = "anytype2", defaultValue = "") - - + + @Schema(name = "anytype_2", required = false) public Object getAnytype2() { return anytype2; } @@ -341,9 +329,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @Schema(name = "anytype3", defaultValue = "") - - + + @Schema(name = "anytype_3", required = false) public Object getAnytype3() { return anytype3; } @@ -352,7 +339,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -384,7 +370,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 5fea577ab44b..ea102c40ed2e 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index e6eee612a24f..7a3a5d839f8a 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index d7116bd7572c..22e47f1bc1cb 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index d2022be266fb..91f47a9e83ee 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java index 6f096d5069ed..ef0fc61b5b6a 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java @@ -14,19 +14,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -42,10 +44,8 @@ public Animal className(String className) { * Get className * @return className */ - @Schema(name = "className", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "className", required = true) public String getClassName() { return className; } @@ -63,9 +63,8 @@ public Animal color(String color) { * Get color * @return color */ - @Schema(name = "color", defaultValue = "") - - + + @Schema(name = "color", required = false) public String getColor() { return color; } @@ -74,7 +73,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -97,7 +95,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index ebe36ad761a9..ad560c9d8344 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Schema(name = "arrayArrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayArrayNumber", required = false) public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -54,7 +55,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 8158dd44ab88..4409856d5a37 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Schema(name = "arrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayNumber", required = false) public List getArrayNumber() { return arrayNumber; } @@ -54,7 +55,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java index 420010561bcd..fd25397b6b67 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -50,9 +53,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @Schema(name = "arrayOfString", defaultValue = "") - - + + @Schema(name = "array_of_string", required = false) public List getArrayOfString() { return arrayOfString; } @@ -78,10 +80,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Schema(name = "arrayArrayOfInteger", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_integer", required = false) public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -107,10 +107,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Schema(name = "arrayArrayOfModel", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_model", required = false) public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -119,7 +117,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,7 +140,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java index 7f4a080ad8d2..275a075f527d 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -72,9 +75,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -83,7 +85,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java index d0a47ab5127c..3640a6301af0 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -70,9 +73,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -81,7 +83,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -103,7 +104,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java index 92d9a7245f16..80d6c5b28514 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -45,9 +48,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @Schema(name = "smallCamel", defaultValue = "") - - + + @Schema(name = "smallCamel", required = false) public String getSmallCamel() { return smallCamel; } @@ -65,9 +67,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @Schema(name = "capitalCamel", defaultValue = "") - - + + @Schema(name = "CapitalCamel", required = false) public String getCapitalCamel() { return capitalCamel; } @@ -85,9 +86,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @Schema(name = "smallSnake", defaultValue = "") - - + + @Schema(name = "small_Snake", required = false) public String getSmallSnake() { return smallSnake; } @@ -105,9 +105,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @Schema(name = "capitalSnake", defaultValue = "") - - + + @Schema(name = "Capital_Snake", required = false) public String getCapitalSnake() { return capitalSnake; } @@ -125,9 +124,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @Schema(name = "scAETHFlowPoints", defaultValue = "") - - + + @Schema(name = "SCA_ETH_Flow_Points", required = false) public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -145,9 +143,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @Schema(name = "ATT_NAME", defaultValue = "Name of the pet ") - - + + @Schema(name = "ATT_NAME", description = "Name of the pet ", required = false) public String getATTNAME() { return ATT_NAME; } @@ -156,7 +153,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -183,7 +179,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java index 2e496fb4accd..0b3c8b8759b2 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -32,9 +35,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -43,7 +45,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java index b732a62b1bc3..19ffd6fffead 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -30,9 +33,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -41,7 +43,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java index 038fc8df3afd..66dd429525dd 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -53,10 +55,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public String getName() { return name; } @@ -65,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java index fa2a736f4fb5..13a83893e619 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ -@Schema(name = "ClassModel",description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "ClassModel", description = "Model for testing model with \"_class\" property") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -31,9 +34,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "_class", required = false) public String getPropertyClass() { return propertyClass; } @@ -42,7 +44,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java index e11bd4ff1b13..9fbd7e3b4338 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -30,9 +33,8 @@ public Client client(String client) { * Get client * @return client */ - @Schema(name = "client", defaultValue = "") - - + + @Schema(name = "client", required = false) public String getClient() { return client; } @@ -41,7 +43,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java index ed5dc71a4ba2..36f36600dafa 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -32,9 +35,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -43,7 +45,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java index 2c99bc376c34..cc0bafc92e34 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -30,9 +33,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -41,7 +43,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java index e1b2df0716a2..c3e82d4c0282 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -107,9 +110,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @Schema(name = "justSymbol", defaultValue = "") - - + + @Schema(name = "just_symbol", required = false) public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -135,9 +137,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @Schema(name = "arrayEnum", defaultValue = "") - - + + @Schema(name = "array_enum", required = false) public List getArrayEnum() { return arrayEnum; } @@ -146,7 +147,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -169,7 +169,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java index e3d30c1ad453..4e6027d16c4e 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java @@ -11,6 +11,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java index 938af53e2b81..19ea0acc7a7c 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -188,9 +191,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @Schema(name = "enumString", defaultValue = "") - - + + @Schema(name = "enum_string", required = false) public EnumStringEnum getEnumString() { return enumString; } @@ -208,10 +210,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @Schema(name = "enumStringRequired", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "enum_string_required", required = true) public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -229,9 +229,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @Schema(name = "enumInteger", defaultValue = "") - - + + @Schema(name = "enum_integer", required = false) public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -249,9 +248,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @Schema(name = "enumNumber", defaultValue = "") - - + + @Schema(name = "enum_number", required = false) public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -269,10 +267,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Schema(name = "outerEnum", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "outerEnum", required = false) public OuterEnum getOuterEnum() { return outerEnum; } @@ -281,7 +277,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -307,7 +302,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java index 001b30e14755..a2ee29fbfd69 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ -@Schema(name = "File",description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "File", description = "Must be named `File` for test.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -31,9 +34,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @Schema(name = "sourceURI", defaultValue = "Test capitalization") - - + + @Schema(name = "sourceURI", description = "Test capitalization", required = false) public String getSourceURI() { return sourceURI; } @@ -42,7 +44,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java index c16669d0c25f..77868e774104 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -37,10 +40,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Schema(name = "file", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "file", required = false) public File getFile() { return file; } @@ -66,10 +67,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Schema(name = "files", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "files", required = false) public List getFiles() { return files; } @@ -78,7 +77,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -101,7 +99,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java index 6546370cd329..0c14e2c93c1b 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java @@ -9,6 +9,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -17,12 +19,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -48,14 +53,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -78,9 +83,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Schema(name = "integer", defaultValue = "") - -@Min(10) @Max(100) + @Min(10) @Max(100) + @Schema(name = "integer", required = false) public Integer getInteger() { return integer; } @@ -100,9 +104,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Schema(name = "int32", defaultValue = "") - -@Min(20) @Max(200) + @Min(20) @Max(200) + @Schema(name = "int32", required = false) public Integer getInt32() { return int32; } @@ -120,9 +123,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @Schema(name = "int64", defaultValue = "") - - + + @Schema(name = "int64", required = false) public Long getInt64() { return int64; } @@ -142,11 +144,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @Schema(name = "number", required = true, defaultValue = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") + @Schema(name = "number", required = true) public BigDecimal getNumber() { return number; } @@ -166,9 +165,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @Schema(name = "_float", defaultValue = "") - -@DecimalMin("54.3") @DecimalMax("987.6") + @DecimalMin("54.3") @DecimalMax("987.6") + @Schema(name = "float", required = false) public Float getFloat() { return _float; } @@ -188,9 +186,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @Schema(name = "_double", defaultValue = "") - -@DecimalMin("67.8") @DecimalMax("123.4") + @DecimalMin("67.8") @DecimalMax("123.4") + @Schema(name = "double", required = false) public Double getDouble() { return _double; } @@ -208,9 +205,8 @@ public FormatTest string(String string) { * Get string * @return string */ - @Schema(name = "string", defaultValue = "") - -@Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "/[a-z]/i") + @Schema(name = "string", required = false) public String getString() { return string; } @@ -228,10 +224,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @Schema(name = "_byte", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "byte", required = true) public byte[] getByte() { return _byte; } @@ -240,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -249,15 +243,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Schema(name = "binary", defaultValue = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + @Valid + @Schema(name = "binary", required = false) + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -270,11 +262,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @Schema(name = "date", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "date", required = true) public LocalDate getDate() { return date; } @@ -292,10 +281,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -313,10 +300,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", required = false) public UUID getUuid() { return uuid; } @@ -334,10 +319,8 @@ public FormatTest password(String password) { * Get password * @return password */ - @Schema(name = "password", required = true, defaultValue = "") - @NotNull - -@Size(min = 10, max = 64) + @NotNull @Size(min = 10, max = 64) + @Schema(name = "password", required = true) public String getPassword() { return password; } @@ -355,10 +338,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Schema(name = "bigDecimal", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "BigDecimal", required = false) public BigDecimal getBigDecimal() { return bigDecimal; } @@ -367,7 +348,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -402,7 +382,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index dfb615a529fc..ec728db1f145 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -53,9 +55,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @Schema(name = "foo", readOnly = true, defaultValue = "") - - + + @Schema(name = "foo", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getFoo() { return foo; } @@ -64,7 +65,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java index 3ff73062758f..2da2a81ac823 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -90,10 +93,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Schema(name = "mapMapOfString", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_map_of_string", required = false) public Map> getMapMapOfString() { return mapMapOfString; } @@ -119,9 +120,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @Schema(name = "mapOfEnumString", defaultValue = "") - - + + @Schema(name = "map_of_enum_string", required = false) public Map getMapOfEnumString() { return mapOfEnumString; } @@ -147,9 +147,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @Schema(name = "directMap", defaultValue = "") - - + + @Schema(name = "direct_map", required = false) public Map getDirectMap() { return directMap; } @@ -175,9 +174,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @Schema(name = "indirectMap", defaultValue = "") - - + + @Schema(name = "indirect_map", required = false) public Map getIndirectMap() { return indirectMap; } @@ -186,7 +184,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -211,7 +208,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 03a7be43cc4a..9681c13f29d4 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -10,6 +10,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,17 +19,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -44,10 +48,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", required = false) public UUID getUuid() { return uuid; } @@ -65,10 +67,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -94,10 +94,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Schema(name = "map", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map", required = false) public Map getMap() { return map; } @@ -106,7 +104,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -130,7 +127,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java index 77bf91649b08..48528166d1c1 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ -@Schema(name = "200_response",description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "200_response", description = "Model for testing model name starting with number") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -34,9 +37,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public Integer getName() { return name; } @@ -54,9 +56,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "class", required = false) public String getPropertyClass() { return propertyClass; } @@ -65,7 +66,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java index 2443600df226..4312ff4cc727 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -36,9 +39,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -56,9 +58,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -76,9 +77,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -87,7 +87,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -111,7 +110,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java index 03dba2801411..11078e7094e4 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -30,9 +33,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @Schema(name = "_123list", defaultValue = "") - - + + @Schema(name = "123-list", required = false) public String get123list() { return _123list; } @@ -41,7 +43,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java index 0301a47e9f3e..37c94a6aa80e 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ -@Schema(name = "Return",description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Return", description = "Model for testing reserved words") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -31,9 +34,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @Schema(name = "_return", defaultValue = "") - - + + @Schema(name = "return", required = false) public Integer getReturn() { return _return; } @@ -42,7 +44,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java index 62a16f80ee07..2876e64e9917 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ -@Schema(name = "Name",description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Name", description = "Model for testing model name same as property name") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -40,10 +43,8 @@ public Name name(Integer name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public Integer getName() { return name; } @@ -61,9 +62,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @Schema(name = "snakeCase", readOnly = true, defaultValue = "") - - + + @Schema(name = "snake_case", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer getSnakeCase() { return snakeCase; } @@ -81,9 +81,8 @@ public Name property(String property) { * Get property * @return property */ - @Schema(name = "property", defaultValue = "") - - + + @Schema(name = "property", required = false) public String getProperty() { return property; } @@ -101,9 +100,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @Schema(name = "_123number", readOnly = true, defaultValue = "") - - + + @Schema(name = "123Number", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer get123number() { return _123number; } @@ -112,7 +110,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -137,7 +134,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java index 521fad80d5a7..05c9f0a77856 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -31,10 +34,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Schema(name = "justNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "JustNumber", required = false) public BigDecimal getJustNumber() { return justNumber; } @@ -43,7 +44,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java index 05071bdfe2bf..90b0d2957184 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -14,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -30,7 +34,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -85,9 +89,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -105,9 +108,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -125,9 +127,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -145,10 +146,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public OffsetDateTime getShipDate() { return shipDate; } @@ -166,9 +165,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -186,9 +184,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -197,7 +194,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -224,7 +220,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java index a721a3dde6a0..14ff8ff8a9f4 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -37,10 +40,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Schema(name = "myNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "my_number", required = false) public BigDecimal getMyNumber() { return myNumber; } @@ -58,9 +59,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @Schema(name = "myString", defaultValue = "") - - + + @Schema(name = "my_string", required = false) public String getMyString() { return myString; } @@ -78,9 +78,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @Schema(name = "myBoolean", defaultValue = "") - - + + @Schema(name = "my_boolean", required = false) public Boolean getMyBoolean() { return myBoolean; } @@ -89,7 +88,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java index ba0cca8a5e81..7fdf6f47de31 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java @@ -11,6 +11,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index 988eb317134d..51d583a02e55 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -20,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -92,9 +95,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -112,10 +114,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -133,10 +133,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -159,10 +157,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public Set getPhotoUrls() { return photoUrls; } @@ -189,10 +185,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -210,9 +204,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -221,7 +214,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -248,7 +240,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 1c51770a8e66..1d95448aeefe 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -53,9 +55,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @Schema(name = "baz", defaultValue = "") - - + + @Schema(name = "baz", required = false) public String getBaz() { return baz; } @@ -64,7 +65,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java index 75f4be4e9f8f..3dcdd9ee3f54 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -30,9 +33,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @Schema(name = "$specialPropertyName", defaultValue = "") - - + + @Schema(name = "$special[property.name]", required = false) public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -41,7 +43,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java index 8722df999bfc..6b24df204718 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -53,9 +55,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -64,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java index 19e9bf310f76..66695c3e8478 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -46,10 +49,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", required = true) public String getStringItem() { return stringItem; } @@ -67,11 +68,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -89,10 +87,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", required = true) public Integer getIntegerItem() { return integerItem; } @@ -110,10 +106,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", required = true) public Boolean getBoolItem() { return boolItem; } @@ -136,10 +130,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", required = true) public List getArrayItem() { return arrayItem; } @@ -148,7 +140,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -174,7 +165,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java index c9a3762bc74b..fdc9a0960759 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -49,10 +52,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", example = "what", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", example = "what", required = true) public String getStringItem() { return stringItem; } @@ -70,11 +71,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", example = "1.234", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -92,10 +90,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @Schema(name = "floatItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "float_item", example = "1.234", required = true) public Float getFloatItem() { return floatItem; } @@ -113,10 +109,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", example = "-2", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", example = "-2", required = true) public Integer getIntegerItem() { return integerItem; } @@ -134,10 +128,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", example = "true", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", example = "true", required = true) public Boolean getBoolItem() { return boolItem; } @@ -160,10 +152,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", example = "[0, 1, 2, 3]", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", example = "[0, 1, 2, 3]", required = true) public List getArrayItem() { return arrayItem; } @@ -172,7 +162,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -199,7 +188,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java index 83152a155535..9aae48b0ceb2 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -51,9 +54,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -71,9 +73,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -91,9 +92,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -111,9 +111,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -131,9 +130,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -151,9 +149,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -171,9 +168,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -191,9 +187,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -202,7 +197,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -231,7 +225,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java index 59a183db0f62..b886d9d3f61e 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -126,9 +129,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @Schema(name = "attributeString", example = "string", defaultValue = "") - - + + @Schema(name = "attribute_string", example = "string", required = false) public String getAttributeString() { return attributeString; } @@ -146,10 +148,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Schema(name = "attributeNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "attribute_number", example = "1.234", required = false) public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -167,9 +167,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @Schema(name = "attributeInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "attribute_integer", example = "-2", required = false) public Integer getAttributeInteger() { return attributeInteger; } @@ -187,9 +186,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @Schema(name = "attributeBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "attribute_boolean", example = "true", required = false) public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -215,9 +213,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @Schema(name = "wrappedArray", defaultValue = "") - - + + @Schema(name = "wrapped_array", required = false) public List getWrappedArray() { return wrappedArray; } @@ -235,9 +232,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @Schema(name = "nameString", example = "string", defaultValue = "") - - + + @Schema(name = "name_string", example = "string", required = false) public String getNameString() { return nameString; } @@ -255,10 +251,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Schema(name = "nameNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "name_number", example = "1.234", required = false) public BigDecimal getNameNumber() { return nameNumber; } @@ -276,9 +270,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @Schema(name = "nameInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "name_integer", example = "-2", required = false) public Integer getNameInteger() { return nameInteger; } @@ -296,9 +289,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @Schema(name = "nameBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "name_boolean", example = "true", required = false) public Boolean getNameBoolean() { return nameBoolean; } @@ -324,9 +316,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @Schema(name = "nameArray", defaultValue = "") - - + + @Schema(name = "name_array", required = false) public List getNameArray() { return nameArray; } @@ -352,9 +343,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @Schema(name = "nameWrappedArray", defaultValue = "") - - + + @Schema(name = "name_wrapped_array", required = false) public List getNameWrappedArray() { return nameWrappedArray; } @@ -372,9 +362,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @Schema(name = "prefixString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_string", example = "string", required = false) public String getPrefixString() { return prefixString; } @@ -392,10 +381,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Schema(name = "prefixNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_number", example = "1.234", required = false) public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -413,9 +400,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @Schema(name = "prefixInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_integer", example = "-2", required = false) public Integer getPrefixInteger() { return prefixInteger; } @@ -433,9 +419,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @Schema(name = "prefixBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_boolean", example = "true", required = false) public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -461,9 +446,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @Schema(name = "prefixArray", defaultValue = "") - - + + @Schema(name = "prefix_array", required = false) public List getPrefixArray() { return prefixArray; } @@ -489,9 +473,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @Schema(name = "prefixWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_wrapped_array", required = false) public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -509,9 +492,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @Schema(name = "namespaceString", example = "string", defaultValue = "") - - + + @Schema(name = "namespace_string", example = "string", required = false) public String getNamespaceString() { return namespaceString; } @@ -529,10 +511,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Schema(name = "namespaceNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "namespace_number", example = "1.234", required = false) public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -550,9 +530,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @Schema(name = "namespaceInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "namespace_integer", example = "-2", required = false) public Integer getNamespaceInteger() { return namespaceInteger; } @@ -570,9 +549,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @Schema(name = "namespaceBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "namespace_boolean", example = "true", required = false) public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -598,9 +576,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @Schema(name = "namespaceArray", defaultValue = "") - - + + @Schema(name = "namespace_array", required = false) public List getNamespaceArray() { return namespaceArray; } @@ -626,9 +603,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @Schema(name = "namespaceWrappedArray", defaultValue = "") - - + + @Schema(name = "namespace_wrapped_array", required = false) public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -646,9 +622,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @Schema(name = "prefixNsString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_ns_string", example = "string", required = false) public String getPrefixNsString() { return prefixNsString; } @@ -666,10 +641,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Schema(name = "prefixNsNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_ns_number", example = "1.234", required = false) public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -687,9 +660,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @Schema(name = "prefixNsInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_ns_integer", example = "-2", required = false) public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -707,9 +679,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @Schema(name = "prefixNsBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_ns_boolean", example = "true", required = false) public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -735,9 +706,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @Schema(name = "prefixNsArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_array", required = false) public List getPrefixNsArray() { return prefixNsArray; } @@ -763,9 +733,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @Schema(name = "prefixNsWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_wrapped_array", required = false) public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -774,7 +743,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -824,7 +792,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index c7e2bb2b25a2..847cc88474b8 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -27,7 +27,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { @@ -44,6 +46,7 @@ default AnotherFakeApiDelegate getDelegate() { * @return successful operation (status code 200) */ @Operation( + operationId = "call123testSpecialTags", summary = "To test special tags", tags = { "$another-fake?" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiController.java index df11134c8067..f57c395c28a6 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final AnotherFakeApiDelegate delegate; - public AnotherFakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) AnotherFakeApiDelegate delegate) { + public AnotherFakeApiController(@Autowired(required = false) AnotherFakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new AnotherFakeApiDelegate() {}); } diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 2ef11c811c11..575a4e23910b 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -14,12 +14,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface AnotherFakeApiDelegate { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index 729f78eb8246..e0ac539a024c 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.v3.oas.annotations.Operation; @@ -36,7 +38,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "fake", description = "the fake API") public interface FakeApi { @@ -53,6 +57,7 @@ default FakeApiDelegate getDelegate() { * @return successful operation (status code 200) */ @Operation( + operationId = "createXmlItem", summary = "creates an XmlItem", tags = { "fake" }, responses = { @@ -80,7 +85,7 @@ default Mono> createXmlItem( * @return Output boolean (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterBooleanSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class))) @@ -107,7 +112,7 @@ default Mono> fakeOuterBooleanSerialize( * @return Output composite (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterCompositeSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "application/json", schema = @Schema(implementation = OuterComposite.class))) @@ -134,7 +139,7 @@ default Mono> fakeOuterCompositeSerialize( * @return Output number (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterNumberSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BigDecimal.class))) @@ -161,7 +166,7 @@ default Mono> fakeOuterNumberSerialize( * @return Output string (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterStringSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))) @@ -188,7 +193,7 @@ default Mono> fakeOuterStringSerialize( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithFileSchema", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -215,7 +220,7 @@ default Mono> testBodyWithFileSchema( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithQueryParams", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -243,6 +248,7 @@ default Mono> testBodyWithQueryParams( * @return successful operation (status code 200) */ @Operation( + operationId = "testClientModel", summary = "To test \"client\" model", tags = { "fake" }, responses = { @@ -285,6 +291,7 @@ default Mono> testClientModel( * or User not found (status code 404) */ @Operation( + operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags = { "fake" }, responses = { @@ -311,8 +318,8 @@ default Mono> testEndpointParameters( @Parameter(name = "float", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "float", required = false) Float _float, @Parameter(name = "string", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "string", required = false) String string, @Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestPart(value = "binary", required = false) Flux binary, - @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @Parameter(name = "password", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "password", required = false) String password, @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "callback", required = false) String paramCallback, @Parameter(hidden = true) final ServerWebExchange exchange @@ -337,6 +344,7 @@ default Mono> testEndpointParameters( * or Not found (status code 404) */ @Operation( + operationId = "testEnumParameters", summary = "To test enum parameters", tags = { "fake" }, responses = { @@ -377,6 +385,7 @@ default Mono> testEnumParameters( * @return Someting wrong (status code 400) */ @Operation( + operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { @@ -407,6 +416,7 @@ default Mono> testGroupParameters( * @return successful operation (status code 200) */ @Operation( + operationId = "testInlineAdditionalProperties", summary = "test inline additionalProperties", tags = { "fake" }, responses = { @@ -434,6 +444,7 @@ default Mono> testInlineAdditionalProperties( * @return successful operation (status code 200) */ @Operation( + operationId = "testJsonFormData", summary = "test json serialization of form data", tags = { "fake" }, responses = { @@ -466,7 +477,7 @@ default Mono> testJsonFormData( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testQueryParameterCollectionFormat", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -497,6 +508,7 @@ default Mono> testQueryParameterCollectionFormat( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFileWithRequiredFile", summary = "uploads an image (required)", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java index 6b22c1aba661..501419787efc 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final FakeApiDelegate delegate; - public FakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeApiDelegate delegate) { + public FakeApiController(@Autowired(required = false) FakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeApiDelegate() {}); } diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java index dbe78fa1c7f9..0193067433b9 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.HttpStatus; @@ -23,12 +25,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeApiDelegate { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 229cba518a2a..17dfd1cca127 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -27,7 +27,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { @@ -44,6 +46,7 @@ default FakeClassnameTestApiDelegate getDelegate() { * @return successful operation (status code 200) */ @Operation( + operationId = "testClassname", summary = "To test class name in snake case", tags = { "fake_classname_tags 123#$%^" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 58497641e4c5..0e301ab5f9b1 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final FakeClassnameTestApiDelegate delegate; - public FakeClassnameTestApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeClassnameTestApiDelegate delegate) { + public FakeClassnameTestApiController(@Autowired(required = false) FakeClassnameTestApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeClassnameTestApiDelegate() {}); } diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index 4127d96d9e3e..bd1f7f3542f8 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -14,12 +14,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeClassnameTestApiDelegate { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 150f20d9401e..09c88088125d 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -29,7 +30,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "pet", description = "the pet API") public interface PetApi { @@ -46,6 +49,7 @@ default PetApiDelegate getDelegate() { * or Invalid input (status code 405) */ @Operation( + operationId = "addPet", summary = "Add a new pet to the store", tags = { "pet" }, responses = { @@ -78,6 +82,7 @@ default Mono> addPet( * or Invalid pet value (status code 400) */ @Operation( + operationId = "deletePet", summary = "Deletes a pet", tags = { "pet" }, responses = { @@ -110,6 +115,7 @@ default Mono> deletePet( * or Invalid status value (status code 400) */ @Operation( + operationId = "findPetsByStatus", summary = "Finds Pets by status", tags = { "pet" }, responses = { @@ -143,6 +149,7 @@ default Mono>> findPetsByStatus( * @deprecated */ @Operation( + operationId = "findPetsByTags", summary = "Finds Pets by tags", tags = { "pet" }, responses = { @@ -176,6 +183,7 @@ default Mono>> findPetsByTags( * or Pet not found (status code 404) */ @Operation( + operationId = "getPetById", summary = "Find pet by ID", tags = { "pet" }, responses = { @@ -210,6 +218,7 @@ default Mono> getPetById( * or Validation exception (status code 405) */ @Operation( + operationId = "updatePet", summary = "Update an existing pet", tags = { "pet" }, responses = { @@ -244,6 +253,7 @@ default Mono> updatePet( * @return Invalid input (status code 405) */ @Operation( + operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", tags = { "pet" }, responses = { @@ -277,6 +287,7 @@ default Mono> updatePetWithForm( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFile", summary = "uploads an image", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java index 5fa088c6f10b..03b76f0b64b1 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final PetApiDelegate delegate; - public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { + public PetApiController(@Autowired(required = false) PetApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() {}); } diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java index 8dc1be776ea0..b4c51ede9184 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -2,6 +2,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -16,12 +17,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface PetApiDelegate { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java index 056bfb145d45..776ecce29b0a 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -28,7 +28,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "store", description = "the store API") public interface StoreApi { @@ -46,6 +48,7 @@ default StoreApiDelegate getDelegate() { * or Order not found (status code 404) */ @Operation( + operationId = "deleteOrder", summary = "Delete purchase order by ID", tags = { "store" }, responses = { @@ -72,6 +75,7 @@ default Mono> deleteOrder( * @return successful operation (status code 200) */ @Operation( + operationId = "getInventory", summary = "Returns pet inventories by status", tags = { "store" }, responses = { @@ -103,6 +107,7 @@ default Mono>> getInventory( * or Order not found (status code 404) */ @Operation( + operationId = "getOrderById", summary = "Find purchase order by ID", tags = { "store" }, responses = { @@ -132,6 +137,7 @@ default Mono> getOrderById( * or Invalid Order (status code 400) */ @Operation( + operationId = "placeOrder", summary = "Place an order for a pet", tags = { "store" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiController.java index 9e08c646ae92..8209043ac020 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final StoreApiDelegate delegate; - public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { + public StoreApiController(@Autowired(required = false) StoreApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() {}); } diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java index 02daadf024a1..d4f1e2efbf99 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -15,12 +15,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface StoreApiDelegate { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index 1bdbac92e64c..14d69223a9cc 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -29,7 +29,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "user", description = "the user API") public interface UserApi { @@ -46,6 +48,7 @@ default UserApiDelegate getDelegate() { * @return successful operation (status code 200) */ @Operation( + operationId = "createUser", summary = "Create user", tags = { "user" }, responses = { @@ -71,6 +74,7 @@ default Mono> createUser( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -96,6 +100,7 @@ default Mono> createUsersWithArrayInput( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -123,6 +128,7 @@ default Mono> createUsersWithListInput( * or User not found (status code 404) */ @Operation( + operationId = "deleteUser", summary = "Delete user", tags = { "user" }, responses = { @@ -151,6 +157,7 @@ default Mono> deleteUser( * or User not found (status code 404) */ @Operation( + operationId = "getUserByName", summary = "Get user by user name", tags = { "user" }, responses = { @@ -181,6 +188,7 @@ default Mono> getUserByName( * or Invalid username/password supplied (status code 400) */ @Operation( + operationId = "loginUser", summary = "Logs user into the system", tags = { "user" }, responses = { @@ -208,6 +216,7 @@ default Mono> loginUser( * @return successful operation (status code 200) */ @Operation( + operationId = "logoutUser", summary = "Logs out current logged in user session", tags = { "user" }, responses = { @@ -235,6 +244,7 @@ default Mono> logoutUser( * or User not found (status code 404) */ @Operation( + operationId = "updateUser", summary = "Updated user", tags = { "user" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiController.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiController.java index bc2d33598fd9..82725d160258 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final UserApiDelegate delegate; - public UserApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) UserApiDelegate delegate) { + public UserApiController(@Autowired(required = false) UserApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new UserApiDelegate() {}); } diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java index 3985dd30ecdf..063cd6d0ee87 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -16,12 +16,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface UserApiDelegate { default Optional getRequest() { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 0c57ae7dd14c..88ea058c0c51 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index b5285ec2f29b..0d4d67f1a9e9 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index f8ca38c286d5..219d797ee642 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index dfd28ccb9963..b2245551ad3e 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -80,9 +83,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @Schema(name = "mapString", defaultValue = "") - - + + @Schema(name = "map_string", required = false) public Map getMapString() { return mapString; } @@ -108,10 +110,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Schema(name = "mapNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_number", required = false) public Map getMapNumber() { return mapNumber; } @@ -137,9 +137,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @Schema(name = "mapInteger", defaultValue = "") - - + + @Schema(name = "map_integer", required = false) public Map getMapInteger() { return mapInteger; } @@ -165,9 +164,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @Schema(name = "mapBoolean", defaultValue = "") - - + + @Schema(name = "map_boolean", required = false) public Map getMapBoolean() { return mapBoolean; } @@ -193,10 +191,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -222,10 +218,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Schema(name = "mapArrayAnytype", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_array_anytype", required = false) public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -251,10 +245,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -280,10 +272,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -301,9 +291,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @Schema(name = "anytype1", defaultValue = "") - - + + @Schema(name = "anytype_1", required = false) public Object getAnytype1() { return anytype1; } @@ -321,9 +310,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @Schema(name = "anytype2", defaultValue = "") - - + + @Schema(name = "anytype_2", required = false) public Object getAnytype2() { return anytype2; } @@ -341,9 +329,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @Schema(name = "anytype3", defaultValue = "") - - + + @Schema(name = "anytype_3", required = false) public Object getAnytype3() { return anytype3; } @@ -352,7 +339,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -384,7 +370,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 5fea577ab44b..ea102c40ed2e 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index e6eee612a24f..7a3a5d839f8a 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index d7116bd7572c..22e47f1bc1cb 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index d2022be266fb..91f47a9e83ee 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java index 6f096d5069ed..ef0fc61b5b6a 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java @@ -14,19 +14,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -42,10 +44,8 @@ public Animal className(String className) { * Get className * @return className */ - @Schema(name = "className", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "className", required = true) public String getClassName() { return className; } @@ -63,9 +63,8 @@ public Animal color(String color) { * Get color * @return color */ - @Schema(name = "color", defaultValue = "") - - + + @Schema(name = "color", required = false) public String getColor() { return color; } @@ -74,7 +73,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -97,7 +95,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index ebe36ad761a9..ad560c9d8344 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Schema(name = "arrayArrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayArrayNumber", required = false) public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -54,7 +55,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 8158dd44ab88..4409856d5a37 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Schema(name = "arrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayNumber", required = false) public List getArrayNumber() { return arrayNumber; } @@ -54,7 +55,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java index 420010561bcd..fd25397b6b67 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -50,9 +53,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @Schema(name = "arrayOfString", defaultValue = "") - - + + @Schema(name = "array_of_string", required = false) public List getArrayOfString() { return arrayOfString; } @@ -78,10 +80,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Schema(name = "arrayArrayOfInteger", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_integer", required = false) public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -107,10 +107,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Schema(name = "arrayArrayOfModel", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_model", required = false) public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -119,7 +117,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,7 +140,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java index 7f4a080ad8d2..275a075f527d 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -72,9 +75,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -83,7 +85,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java index d0a47ab5127c..3640a6301af0 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -70,9 +73,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -81,7 +83,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -103,7 +104,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java index 92d9a7245f16..80d6c5b28514 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -45,9 +48,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @Schema(name = "smallCamel", defaultValue = "") - - + + @Schema(name = "smallCamel", required = false) public String getSmallCamel() { return smallCamel; } @@ -65,9 +67,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @Schema(name = "capitalCamel", defaultValue = "") - - + + @Schema(name = "CapitalCamel", required = false) public String getCapitalCamel() { return capitalCamel; } @@ -85,9 +86,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @Schema(name = "smallSnake", defaultValue = "") - - + + @Schema(name = "small_Snake", required = false) public String getSmallSnake() { return smallSnake; } @@ -105,9 +105,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @Schema(name = "capitalSnake", defaultValue = "") - - + + @Schema(name = "Capital_Snake", required = false) public String getCapitalSnake() { return capitalSnake; } @@ -125,9 +124,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @Schema(name = "scAETHFlowPoints", defaultValue = "") - - + + @Schema(name = "SCA_ETH_Flow_Points", required = false) public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -145,9 +143,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @Schema(name = "ATT_NAME", defaultValue = "Name of the pet ") - - + + @Schema(name = "ATT_NAME", description = "Name of the pet ", required = false) public String getATTNAME() { return ATT_NAME; } @@ -156,7 +153,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -183,7 +179,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java index 2e496fb4accd..0b3c8b8759b2 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -32,9 +35,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -43,7 +45,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java index b732a62b1bc3..19ffd6fffead 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -30,9 +33,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -41,7 +43,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java index 038fc8df3afd..66dd429525dd 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -53,10 +55,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public String getName() { return name; } @@ -65,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java index fa2a736f4fb5..13a83893e619 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ -@Schema(name = "ClassModel",description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "ClassModel", description = "Model for testing model with \"_class\" property") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -31,9 +34,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "_class", required = false) public String getPropertyClass() { return propertyClass; } @@ -42,7 +44,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java index e11bd4ff1b13..9fbd7e3b4338 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -30,9 +33,8 @@ public Client client(String client) { * Get client * @return client */ - @Schema(name = "client", defaultValue = "") - - + + @Schema(name = "client", required = false) public String getClient() { return client; } @@ -41,7 +43,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java index ed5dc71a4ba2..36f36600dafa 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -32,9 +35,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -43,7 +45,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java index 2c99bc376c34..cc0bafc92e34 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -30,9 +33,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -41,7 +43,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java index e1b2df0716a2..c3e82d4c0282 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -107,9 +110,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @Schema(name = "justSymbol", defaultValue = "") - - + + @Schema(name = "just_symbol", required = false) public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -135,9 +137,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @Schema(name = "arrayEnum", defaultValue = "") - - + + @Schema(name = "array_enum", required = false) public List getArrayEnum() { return arrayEnum; } @@ -146,7 +147,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -169,7 +169,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java index e3d30c1ad453..4e6027d16c4e 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java @@ -11,6 +11,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java index 938af53e2b81..19ea0acc7a7c 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -188,9 +191,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @Schema(name = "enumString", defaultValue = "") - - + + @Schema(name = "enum_string", required = false) public EnumStringEnum getEnumString() { return enumString; } @@ -208,10 +210,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @Schema(name = "enumStringRequired", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "enum_string_required", required = true) public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -229,9 +229,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @Schema(name = "enumInteger", defaultValue = "") - - + + @Schema(name = "enum_integer", required = false) public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -249,9 +248,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @Schema(name = "enumNumber", defaultValue = "") - - + + @Schema(name = "enum_number", required = false) public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -269,10 +267,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Schema(name = "outerEnum", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "outerEnum", required = false) public OuterEnum getOuterEnum() { return outerEnum; } @@ -281,7 +277,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -307,7 +302,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java index 001b30e14755..a2ee29fbfd69 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ -@Schema(name = "File",description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "File", description = "Must be named `File` for test.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -31,9 +34,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @Schema(name = "sourceURI", defaultValue = "Test capitalization") - - + + @Schema(name = "sourceURI", description = "Test capitalization", required = false) public String getSourceURI() { return sourceURI; } @@ -42,7 +44,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java index c16669d0c25f..77868e774104 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -37,10 +40,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Schema(name = "file", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "file", required = false) public File getFile() { return file; } @@ -66,10 +67,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Schema(name = "files", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "files", required = false) public List getFiles() { return files; } @@ -78,7 +77,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -101,7 +99,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java index 6546370cd329..0c14e2c93c1b 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java @@ -9,6 +9,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -17,12 +19,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -48,14 +53,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -78,9 +83,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Schema(name = "integer", defaultValue = "") - -@Min(10) @Max(100) + @Min(10) @Max(100) + @Schema(name = "integer", required = false) public Integer getInteger() { return integer; } @@ -100,9 +104,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Schema(name = "int32", defaultValue = "") - -@Min(20) @Max(200) + @Min(20) @Max(200) + @Schema(name = "int32", required = false) public Integer getInt32() { return int32; } @@ -120,9 +123,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @Schema(name = "int64", defaultValue = "") - - + + @Schema(name = "int64", required = false) public Long getInt64() { return int64; } @@ -142,11 +144,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @Schema(name = "number", required = true, defaultValue = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") + @Schema(name = "number", required = true) public BigDecimal getNumber() { return number; } @@ -166,9 +165,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @Schema(name = "_float", defaultValue = "") - -@DecimalMin("54.3") @DecimalMax("987.6") + @DecimalMin("54.3") @DecimalMax("987.6") + @Schema(name = "float", required = false) public Float getFloat() { return _float; } @@ -188,9 +186,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @Schema(name = "_double", defaultValue = "") - -@DecimalMin("67.8") @DecimalMax("123.4") + @DecimalMin("67.8") @DecimalMax("123.4") + @Schema(name = "double", required = false) public Double getDouble() { return _double; } @@ -208,9 +205,8 @@ public FormatTest string(String string) { * Get string * @return string */ - @Schema(name = "string", defaultValue = "") - -@Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "/[a-z]/i") + @Schema(name = "string", required = false) public String getString() { return string; } @@ -228,10 +224,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @Schema(name = "_byte", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "byte", required = true) public byte[] getByte() { return _byte; } @@ -240,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -249,15 +243,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Schema(name = "binary", defaultValue = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + @Valid + @Schema(name = "binary", required = false) + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -270,11 +262,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @Schema(name = "date", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "date", required = true) public LocalDate getDate() { return date; } @@ -292,10 +281,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -313,10 +300,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", required = false) public UUID getUuid() { return uuid; } @@ -334,10 +319,8 @@ public FormatTest password(String password) { * Get password * @return password */ - @Schema(name = "password", required = true, defaultValue = "") - @NotNull - -@Size(min = 10, max = 64) + @NotNull @Size(min = 10, max = 64) + @Schema(name = "password", required = true) public String getPassword() { return password; } @@ -355,10 +338,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Schema(name = "bigDecimal", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "BigDecimal", required = false) public BigDecimal getBigDecimal() { return bigDecimal; } @@ -367,7 +348,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -402,7 +382,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index dfb615a529fc..ec728db1f145 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -53,9 +55,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @Schema(name = "foo", readOnly = true, defaultValue = "") - - + + @Schema(name = "foo", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getFoo() { return foo; } @@ -64,7 +65,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java index 3ff73062758f..2da2a81ac823 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -90,10 +93,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Schema(name = "mapMapOfString", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_map_of_string", required = false) public Map> getMapMapOfString() { return mapMapOfString; } @@ -119,9 +120,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @Schema(name = "mapOfEnumString", defaultValue = "") - - + + @Schema(name = "map_of_enum_string", required = false) public Map getMapOfEnumString() { return mapOfEnumString; } @@ -147,9 +147,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @Schema(name = "directMap", defaultValue = "") - - + + @Schema(name = "direct_map", required = false) public Map getDirectMap() { return directMap; } @@ -175,9 +174,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @Schema(name = "indirectMap", defaultValue = "") - - + + @Schema(name = "indirect_map", required = false) public Map getIndirectMap() { return indirectMap; } @@ -186,7 +184,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -211,7 +208,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 03a7be43cc4a..9681c13f29d4 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -10,6 +10,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,17 +19,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -44,10 +48,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", required = false) public UUID getUuid() { return uuid; } @@ -65,10 +67,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -94,10 +94,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Schema(name = "map", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map", required = false) public Map getMap() { return map; } @@ -106,7 +104,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -130,7 +127,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java index 77bf91649b08..48528166d1c1 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ -@Schema(name = "200_response",description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "200_response", description = "Model for testing model name starting with number") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -34,9 +37,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public Integer getName() { return name; } @@ -54,9 +56,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "class", required = false) public String getPropertyClass() { return propertyClass; } @@ -65,7 +66,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java index 2443600df226..4312ff4cc727 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -36,9 +39,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -56,9 +58,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -76,9 +77,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -87,7 +87,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -111,7 +110,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java index 03dba2801411..11078e7094e4 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -30,9 +33,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @Schema(name = "_123list", defaultValue = "") - - + + @Schema(name = "123-list", required = false) public String get123list() { return _123list; } @@ -41,7 +43,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java index 0301a47e9f3e..37c94a6aa80e 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ -@Schema(name = "Return",description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Return", description = "Model for testing reserved words") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -31,9 +34,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @Schema(name = "_return", defaultValue = "") - - + + @Schema(name = "return", required = false) public Integer getReturn() { return _return; } @@ -42,7 +44,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java index 62a16f80ee07..2876e64e9917 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ -@Schema(name = "Name",description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Name", description = "Model for testing model name same as property name") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -40,10 +43,8 @@ public Name name(Integer name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public Integer getName() { return name; } @@ -61,9 +62,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @Schema(name = "snakeCase", readOnly = true, defaultValue = "") - - + + @Schema(name = "snake_case", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer getSnakeCase() { return snakeCase; } @@ -81,9 +81,8 @@ public Name property(String property) { * Get property * @return property */ - @Schema(name = "property", defaultValue = "") - - + + @Schema(name = "property", required = false) public String getProperty() { return property; } @@ -101,9 +100,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @Schema(name = "_123number", readOnly = true, defaultValue = "") - - + + @Schema(name = "123Number", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer get123number() { return _123number; } @@ -112,7 +110,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -137,7 +134,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java index 521fad80d5a7..05c9f0a77856 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -31,10 +34,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Schema(name = "justNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "JustNumber", required = false) public BigDecimal getJustNumber() { return justNumber; } @@ -43,7 +44,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java index 05071bdfe2bf..90b0d2957184 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -14,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -30,7 +34,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -85,9 +89,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -105,9 +108,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -125,9 +127,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -145,10 +146,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public OffsetDateTime getShipDate() { return shipDate; } @@ -166,9 +165,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -186,9 +184,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -197,7 +194,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -224,7 +220,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java index a721a3dde6a0..14ff8ff8a9f4 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -37,10 +40,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Schema(name = "myNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "my_number", required = false) public BigDecimal getMyNumber() { return myNumber; } @@ -58,9 +59,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @Schema(name = "myString", defaultValue = "") - - + + @Schema(name = "my_string", required = false) public String getMyString() { return myString; } @@ -78,9 +78,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @Schema(name = "myBoolean", defaultValue = "") - - + + @Schema(name = "my_boolean", required = false) public Boolean getMyBoolean() { return myBoolean; } @@ -89,7 +88,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java index ba0cca8a5e81..7fdf6f47de31 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java @@ -11,6 +11,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java index 988eb317134d..51d583a02e55 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java @@ -20,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -92,9 +95,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -112,10 +114,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -133,10 +133,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -159,10 +157,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public Set getPhotoUrls() { return photoUrls; } @@ -189,10 +185,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -210,9 +204,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -221,7 +214,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -248,7 +240,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 1c51770a8e66..1d95448aeefe 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -53,9 +55,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @Schema(name = "baz", defaultValue = "") - - + + @Schema(name = "baz", required = false) public String getBaz() { return baz; } @@ -64,7 +65,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java index 75f4be4e9f8f..3dcdd9ee3f54 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -30,9 +33,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @Schema(name = "$specialPropertyName", defaultValue = "") - - + + @Schema(name = "$special[property.name]", required = false) public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -41,7 +43,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java index 8722df999bfc..6b24df204718 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -53,9 +55,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -64,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java index 19e9bf310f76..66695c3e8478 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -46,10 +49,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", required = true) public String getStringItem() { return stringItem; } @@ -67,11 +68,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -89,10 +87,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", required = true) public Integer getIntegerItem() { return integerItem; } @@ -110,10 +106,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", required = true) public Boolean getBoolItem() { return boolItem; } @@ -136,10 +130,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", required = true) public List getArrayItem() { return arrayItem; } @@ -148,7 +140,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -174,7 +165,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java index c9a3762bc74b..fdc9a0960759 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -49,10 +52,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", example = "what", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", example = "what", required = true) public String getStringItem() { return stringItem; } @@ -70,11 +71,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", example = "1.234", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -92,10 +90,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @Schema(name = "floatItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "float_item", example = "1.234", required = true) public Float getFloatItem() { return floatItem; } @@ -113,10 +109,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", example = "-2", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", example = "-2", required = true) public Integer getIntegerItem() { return integerItem; } @@ -134,10 +128,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", example = "true", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", example = "true", required = true) public Boolean getBoolItem() { return boolItem; } @@ -160,10 +152,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", example = "[0, 1, 2, 3]", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", example = "[0, 1, 2, 3]", required = true) public List getArrayItem() { return arrayItem; } @@ -172,7 +162,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -199,7 +188,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java index 83152a155535..9aae48b0ceb2 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -51,9 +54,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -71,9 +73,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -91,9 +92,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -111,9 +111,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -131,9 +130,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -151,9 +149,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -171,9 +168,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -191,9 +187,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -202,7 +197,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -231,7 +225,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java index 59a183db0f62..b886d9d3f61e 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -126,9 +129,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @Schema(name = "attributeString", example = "string", defaultValue = "") - - + + @Schema(name = "attribute_string", example = "string", required = false) public String getAttributeString() { return attributeString; } @@ -146,10 +148,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Schema(name = "attributeNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "attribute_number", example = "1.234", required = false) public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -167,9 +167,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @Schema(name = "attributeInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "attribute_integer", example = "-2", required = false) public Integer getAttributeInteger() { return attributeInteger; } @@ -187,9 +186,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @Schema(name = "attributeBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "attribute_boolean", example = "true", required = false) public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -215,9 +213,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @Schema(name = "wrappedArray", defaultValue = "") - - + + @Schema(name = "wrapped_array", required = false) public List getWrappedArray() { return wrappedArray; } @@ -235,9 +232,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @Schema(name = "nameString", example = "string", defaultValue = "") - - + + @Schema(name = "name_string", example = "string", required = false) public String getNameString() { return nameString; } @@ -255,10 +251,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Schema(name = "nameNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "name_number", example = "1.234", required = false) public BigDecimal getNameNumber() { return nameNumber; } @@ -276,9 +270,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @Schema(name = "nameInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "name_integer", example = "-2", required = false) public Integer getNameInteger() { return nameInteger; } @@ -296,9 +289,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @Schema(name = "nameBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "name_boolean", example = "true", required = false) public Boolean getNameBoolean() { return nameBoolean; } @@ -324,9 +316,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @Schema(name = "nameArray", defaultValue = "") - - + + @Schema(name = "name_array", required = false) public List getNameArray() { return nameArray; } @@ -352,9 +343,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @Schema(name = "nameWrappedArray", defaultValue = "") - - + + @Schema(name = "name_wrapped_array", required = false) public List getNameWrappedArray() { return nameWrappedArray; } @@ -372,9 +362,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @Schema(name = "prefixString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_string", example = "string", required = false) public String getPrefixString() { return prefixString; } @@ -392,10 +381,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Schema(name = "prefixNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_number", example = "1.234", required = false) public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -413,9 +400,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @Schema(name = "prefixInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_integer", example = "-2", required = false) public Integer getPrefixInteger() { return prefixInteger; } @@ -433,9 +419,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @Schema(name = "prefixBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_boolean", example = "true", required = false) public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -461,9 +446,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @Schema(name = "prefixArray", defaultValue = "") - - + + @Schema(name = "prefix_array", required = false) public List getPrefixArray() { return prefixArray; } @@ -489,9 +473,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @Schema(name = "prefixWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_wrapped_array", required = false) public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -509,9 +492,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @Schema(name = "namespaceString", example = "string", defaultValue = "") - - + + @Schema(name = "namespace_string", example = "string", required = false) public String getNamespaceString() { return namespaceString; } @@ -529,10 +511,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Schema(name = "namespaceNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "namespace_number", example = "1.234", required = false) public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -550,9 +530,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @Schema(name = "namespaceInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "namespace_integer", example = "-2", required = false) public Integer getNamespaceInteger() { return namespaceInteger; } @@ -570,9 +549,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @Schema(name = "namespaceBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "namespace_boolean", example = "true", required = false) public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -598,9 +576,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @Schema(name = "namespaceArray", defaultValue = "") - - + + @Schema(name = "namespace_array", required = false) public List getNamespaceArray() { return namespaceArray; } @@ -626,9 +603,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @Schema(name = "namespaceWrappedArray", defaultValue = "") - - + + @Schema(name = "namespace_wrapped_array", required = false) public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -646,9 +622,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @Schema(name = "prefixNsString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_ns_string", example = "string", required = false) public String getPrefixNsString() { return prefixNsString; } @@ -666,10 +641,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Schema(name = "prefixNsNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_ns_number", example = "1.234", required = false) public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -687,9 +660,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @Schema(name = "prefixNsInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_ns_integer", example = "-2", required = false) public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -707,9 +679,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @Schema(name = "prefixNsBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_ns_boolean", example = "true", required = false) public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -735,9 +706,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @Schema(name = "prefixNsArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_array", required = false) public List getPrefixNsArray() { return prefixNsArray; } @@ -763,9 +733,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @Schema(name = "prefixNsWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_wrapped_array", required = false) public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -774,7 +743,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -824,7 +792,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java index ccd404fbf320..26879041d82e 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -27,7 +27,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { @@ -44,6 +46,7 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @Operation( + operationId = "call123testSpecialTags", summary = "To test special tags", tags = { "$another-fake?" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApiController.java index d8efcca7f8a4..4bad7b07b87d 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index 720457848da9..f34a5b0d2b79 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.v3.oas.annotations.Operation; @@ -36,7 +38,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "fake", description = "the fake API") public interface FakeApi { @@ -53,6 +57,7 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @Operation( + operationId = "createXmlItem", summary = "creates an XmlItem", tags = { "fake" }, responses = { @@ -80,7 +85,7 @@ default ResponseEntity createXmlItem( * @return Output boolean (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterBooleanSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class))) @@ -107,7 +112,7 @@ default ResponseEntity fakeOuterBooleanSerialize( * @return Output composite (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterCompositeSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "application/json", schema = @Schema(implementation = OuterComposite.class))) @@ -143,7 +148,7 @@ default ResponseEntity fakeOuterCompositeSerialize( * @return Output number (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterNumberSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BigDecimal.class))) @@ -170,7 +175,7 @@ default ResponseEntity fakeOuterNumberSerialize( * @return Output string (status code 200) */ @Operation( - summary = "", + operationId = "fakeOuterStringSerialize", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))) @@ -197,7 +202,7 @@ default ResponseEntity fakeOuterStringSerialize( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithFileSchema", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -224,7 +229,7 @@ default ResponseEntity testBodyWithFileSchema( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testBodyWithQueryParams", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -252,6 +257,7 @@ default ResponseEntity testBodyWithQueryParams( * @return successful operation (status code 200) */ @Operation( + operationId = "testClientModel", summary = "To test \"client\" model", tags = { "fake" }, responses = { @@ -303,6 +309,7 @@ default ResponseEntity testClientModel( * or User not found (status code 404) */ @Operation( + operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags = { "fake" }, responses = { @@ -329,8 +336,8 @@ default ResponseEntity testEndpointParameters( @Parameter(name = "float", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "float", required = false) Float _float, @Parameter(name = "string", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "string", required = false) String string, @Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestPart(value = "binary", required = false) MultipartFile binary, - @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @Parameter(name = "password", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "password", required = false) String password, @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { @@ -355,6 +362,7 @@ default ResponseEntity testEndpointParameters( * or Not found (status code 404) */ @Operation( + operationId = "testEnumParameters", summary = "To test enum parameters", tags = { "fake" }, responses = { @@ -395,6 +403,7 @@ default ResponseEntity testEnumParameters( * @return Someting wrong (status code 400) */ @Operation( + operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { @@ -425,6 +434,7 @@ default ResponseEntity testGroupParameters( * @return successful operation (status code 200) */ @Operation( + operationId = "testInlineAdditionalProperties", summary = "test inline additionalProperties", tags = { "fake" }, responses = { @@ -452,6 +462,7 @@ default ResponseEntity testInlineAdditionalProperties( * @return successful operation (status code 200) */ @Operation( + operationId = "testJsonFormData", summary = "test json serialization of form data", tags = { "fake" }, responses = { @@ -484,7 +495,7 @@ default ResponseEntity testJsonFormData( * @return Success (status code 200) */ @Operation( - summary = "", + operationId = "testQueryParameterCollectionFormat", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -515,6 +526,7 @@ default ResponseEntity testQueryParameterCollectionFormat( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFileWithRequiredFile", summary = "uploads an image (required)", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java index c4b88419aabe..c150dba343e5 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 62e378597251..ff42c358bc41 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -27,7 +27,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { @@ -44,6 +46,7 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @Operation( + operationId = "testClassname", summary = "To test class name in snake case", tags = { "fake_classname_tags 123#$%^" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 85458b255da5..1fb4dc597f84 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index f28b85a83435..5f049169a647 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -29,7 +30,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "pet", description = "the pet API") public interface PetApi { @@ -46,6 +49,7 @@ default Optional getRequest() { * or Invalid input (status code 405) */ @Operation( + operationId = "addPet", summary = "Add a new pet to the store", tags = { "pet" }, responses = { @@ -78,6 +82,7 @@ default ResponseEntity addPet( * or Invalid pet value (status code 400) */ @Operation( + operationId = "deletePet", summary = "Deletes a pet", tags = { "pet" }, responses = { @@ -110,6 +115,7 @@ default ResponseEntity deletePet( * or Invalid status value (status code 400) */ @Operation( + operationId = "findPetsByStatus", summary = "Finds Pets by status", tags = { "pet" }, responses = { @@ -157,6 +163,7 @@ default ResponseEntity> findPetsByStatus( * @deprecated */ @Operation( + operationId = "findPetsByTags", summary = "Finds Pets by tags", tags = { "pet" }, responses = { @@ -204,6 +211,7 @@ default ResponseEntity> findPetsByTags( * or Pet not found (status code 404) */ @Operation( + operationId = "getPetById", summary = "Find pet by ID", tags = { "pet" }, responses = { @@ -252,6 +260,7 @@ default ResponseEntity getPetById( * or Validation exception (status code 405) */ @Operation( + operationId = "updatePet", summary = "Update an existing pet", tags = { "pet" }, responses = { @@ -286,6 +295,7 @@ default ResponseEntity updatePet( * @return Invalid input (status code 405) */ @Operation( + operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", tags = { "pet" }, responses = { @@ -319,6 +329,7 @@ default ResponseEntity updatePetWithForm( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFile", summary = "uploads an image", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java index e72c57e3cbec..4ad9ef06158b 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index de9b9d16f830..2709d5b98b60 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -28,7 +28,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "store", description = "the store API") public interface StoreApi { @@ -46,6 +48,7 @@ default Optional getRequest() { * or Order not found (status code 404) */ @Operation( + operationId = "deleteOrder", summary = "Delete purchase order by ID", tags = { "store" }, responses = { @@ -72,6 +75,7 @@ default ResponseEntity deleteOrder( * @return successful operation (status code 200) */ @Operation( + operationId = "getInventory", summary = "Returns pet inventories by status", tags = { "store" }, responses = { @@ -104,6 +108,7 @@ default ResponseEntity> getInventory( * or Order not found (status code 404) */ @Operation( + operationId = "getOrderById", summary = "Find purchase order by ID", tags = { "store" }, responses = { @@ -147,6 +152,7 @@ default ResponseEntity getOrderById( * or Invalid Order (status code 400) */ @Operation( + operationId = "placeOrder", summary = "Place an order for a pet", tags = { "store" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApiController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApiController.java index 1293b5c8f6e4..293d3035f805 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index 5a85648b515c..9c87066a553a 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -29,7 +29,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "user", description = "the user API") public interface UserApi { @@ -46,6 +48,7 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @Operation( + operationId = "createUser", summary = "Create user", tags = { "user" }, responses = { @@ -71,6 +74,7 @@ default ResponseEntity createUser( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -96,6 +100,7 @@ default ResponseEntity createUsersWithArrayInput( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -123,6 +128,7 @@ default ResponseEntity createUsersWithListInput( * or User not found (status code 404) */ @Operation( + operationId = "deleteUser", summary = "Delete user", tags = { "user" }, responses = { @@ -151,6 +157,7 @@ default ResponseEntity deleteUser( * or User not found (status code 404) */ @Operation( + operationId = "getUserByName", summary = "Get user by user name", tags = { "user" }, responses = { @@ -195,6 +202,7 @@ default ResponseEntity getUserByName( * or Invalid username/password supplied (status code 400) */ @Operation( + operationId = "loginUser", summary = "Logs user into the system", tags = { "user" }, responses = { @@ -222,6 +230,7 @@ default ResponseEntity loginUser( * @return successful operation (status code 200) */ @Operation( + operationId = "logoutUser", summary = "Logs out current logged in user session", tags = { "user" }, responses = { @@ -250,6 +259,7 @@ default ResponseEntity logoutUser( * or User not found (status code 404) */ @Operation( + operationId = "updateUser", summary = "Updated user", tags = { "user" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApiController.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApiController.java index 3f6c4d9a2d6f..aab4767a50d0 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 0c57ae7dd14c..88ea058c0c51 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index b5285ec2f29b..0d4d67f1a9e9 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index f8ca38c286d5..219d797ee642 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index dfd28ccb9963..b2245551ad3e 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -80,9 +83,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ - @Schema(name = "mapString", defaultValue = "") - - + + @Schema(name = "map_string", required = false) public Map getMapString() { return mapString; } @@ -108,10 +110,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ - @Schema(name = "mapNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_number", required = false) public Map getMapNumber() { return mapNumber; } @@ -137,9 +137,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ - @Schema(name = "mapInteger", defaultValue = "") - - + + @Schema(name = "map_integer", required = false) public Map getMapInteger() { return mapInteger; } @@ -165,9 +164,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ - @Schema(name = "mapBoolean", defaultValue = "") - - + + @Schema(name = "map_boolean", required = false) public Map getMapBoolean() { return mapBoolean; } @@ -193,10 +191,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -222,10 +218,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ - @Schema(name = "mapArrayAnytype", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_array_anytype", required = false) public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -251,10 +245,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -280,10 +272,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -301,9 +291,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ - @Schema(name = "anytype1", defaultValue = "") - - + + @Schema(name = "anytype_1", required = false) public Object getAnytype1() { return anytype1; } @@ -321,9 +310,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ - @Schema(name = "anytype2", defaultValue = "") - - + + @Schema(name = "anytype_2", required = false) public Object getAnytype2() { return anytype2; } @@ -341,9 +329,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ - @Schema(name = "anytype3", defaultValue = "") - - + + @Schema(name = "anytype_3", required = false) public Object getAnytype3() { return anytype3; } @@ -352,7 +339,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -384,7 +370,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 5fea577ab44b..ea102c40ed2e 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index e6eee612a24f..7a3a5d839f8a 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index d7116bd7572c..22e47f1bc1cb 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index d2022be266fb..91f47a9e83ee 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java index 6f096d5069ed..ef0fc61b5b6a 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java @@ -14,19 +14,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -42,10 +44,8 @@ public Animal className(String className) { * Get className * @return className */ - @Schema(name = "className", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "className", required = true) public String getClassName() { return className; } @@ -63,9 +63,8 @@ public Animal color(String color) { * Get color * @return color */ - @Schema(name = "color", defaultValue = "") - - + + @Schema(name = "color", required = false) public String getColor() { return color; } @@ -74,7 +73,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -97,7 +95,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index ebe36ad761a9..ad560c9d8344 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ - @Schema(name = "arrayArrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayArrayNumber", required = false) public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -54,7 +55,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 8158dd44ab88..4409856d5a37 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ - @Schema(name = "arrayNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "ArrayNumber", required = false) public List getArrayNumber() { return arrayNumber; } @@ -54,7 +55,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java index 420010561bcd..fd25397b6b67 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -50,9 +53,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ - @Schema(name = "arrayOfString", defaultValue = "") - - + + @Schema(name = "array_of_string", required = false) public List getArrayOfString() { return arrayOfString; } @@ -78,10 +80,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ - @Schema(name = "arrayArrayOfInteger", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_integer", required = false) public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -107,10 +107,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ - @Schema(name = "arrayArrayOfModel", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "array_array_of_model", required = false) public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -119,7 +117,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,7 +140,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java index 7f4a080ad8d2..275a075f527d 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -72,9 +75,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -83,7 +85,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java index d0a47ab5127c..3640a6301af0 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -70,9 +73,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ - @Schema(name = "kind", defaultValue = "") - - + + @Schema(name = "kind", required = false) public KindEnum getKind() { return kind; } @@ -81,7 +83,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -103,7 +104,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java index 92d9a7245f16..80d6c5b28514 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -45,9 +48,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ - @Schema(name = "smallCamel", defaultValue = "") - - + + @Schema(name = "smallCamel", required = false) public String getSmallCamel() { return smallCamel; } @@ -65,9 +67,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ - @Schema(name = "capitalCamel", defaultValue = "") - - + + @Schema(name = "CapitalCamel", required = false) public String getCapitalCamel() { return capitalCamel; } @@ -85,9 +86,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ - @Schema(name = "smallSnake", defaultValue = "") - - + + @Schema(name = "small_Snake", required = false) public String getSmallSnake() { return smallSnake; } @@ -105,9 +105,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ - @Schema(name = "capitalSnake", defaultValue = "") - - + + @Schema(name = "Capital_Snake", required = false) public String getCapitalSnake() { return capitalSnake; } @@ -125,9 +124,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ - @Schema(name = "scAETHFlowPoints", defaultValue = "") - - + + @Schema(name = "SCA_ETH_Flow_Points", required = false) public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -145,9 +143,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ - @Schema(name = "ATT_NAME", defaultValue = "Name of the pet ") - - + + @Schema(name = "ATT_NAME", description = "Name of the pet ", required = false) public String getATTNAME() { return ATT_NAME; } @@ -156,7 +153,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -183,7 +179,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java index 2e496fb4accd..0b3c8b8759b2 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -32,9 +35,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -43,7 +45,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java index b732a62b1bc3..19ffd6fffead 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -30,9 +33,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ - @Schema(name = "declawed", defaultValue = "") - - + + @Schema(name = "declawed", required = false) public Boolean getDeclawed() { return declawed; } @@ -41,7 +43,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java index 038fc8df3afd..66dd429525dd 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -53,10 +55,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public String getName() { return name; } @@ -65,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java index fa2a736f4fb5..13a83893e619 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ -@Schema(name = "ClassModel",description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "ClassModel", description = "Model for testing model with \"_class\" property") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -31,9 +34,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "_class", required = false) public String getPropertyClass() { return propertyClass; } @@ -42,7 +44,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java index e11bd4ff1b13..9fbd7e3b4338 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -30,9 +33,8 @@ public Client client(String client) { * Get client * @return client */ - @Schema(name = "client", defaultValue = "") - - + + @Schema(name = "client", required = false) public String getClient() { return client; } @@ -41,7 +43,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java index ed5dc71a4ba2..36f36600dafa 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -32,9 +35,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -43,7 +45,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java index 2c99bc376c34..cc0bafc92e34 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -30,9 +33,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ - @Schema(name = "breed", defaultValue = "") - - + + @Schema(name = "breed", required = false) public String getBreed() { return breed; } @@ -41,7 +43,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java index e1b2df0716a2..c3e82d4c0282 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -107,9 +110,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ - @Schema(name = "justSymbol", defaultValue = "") - - + + @Schema(name = "just_symbol", required = false) public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -135,9 +137,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ - @Schema(name = "arrayEnum", defaultValue = "") - - + + @Schema(name = "array_enum", required = false) public List getArrayEnum() { return arrayEnum; } @@ -146,7 +147,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -169,7 +169,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java index e3d30c1ad453..4e6027d16c4e 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java @@ -11,6 +11,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java index 938af53e2b81..19ea0acc7a7c 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -188,9 +191,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ - @Schema(name = "enumString", defaultValue = "") - - + + @Schema(name = "enum_string", required = false) public EnumStringEnum getEnumString() { return enumString; } @@ -208,10 +210,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ - @Schema(name = "enumStringRequired", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "enum_string_required", required = true) public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -229,9 +229,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ - @Schema(name = "enumInteger", defaultValue = "") - - + + @Schema(name = "enum_integer", required = false) public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -249,9 +248,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ - @Schema(name = "enumNumber", defaultValue = "") - - + + @Schema(name = "enum_number", required = false) public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -269,10 +267,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ - @Schema(name = "outerEnum", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "outerEnum", required = false) public OuterEnum getOuterEnum() { return outerEnum; } @@ -281,7 +277,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -307,7 +302,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java index 001b30e14755..a2ee29fbfd69 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ -@Schema(name = "File",description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "File", description = "Must be named `File` for test.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -31,9 +34,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ - @Schema(name = "sourceURI", defaultValue = "Test capitalization") - - + + @Schema(name = "sourceURI", description = "Test capitalization", required = false) public String getSourceURI() { return sourceURI; } @@ -42,7 +44,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java index c16669d0c25f..77868e774104 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -37,10 +40,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ - @Schema(name = "file", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "file", required = false) public File getFile() { return file; } @@ -66,10 +67,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ - @Schema(name = "files", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "files", required = false) public List getFiles() { return files; } @@ -78,7 +77,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -101,7 +99,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java index 6546370cd329..0c14e2c93c1b 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java @@ -9,6 +9,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -17,12 +19,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -48,14 +53,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -78,9 +83,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ - @Schema(name = "integer", defaultValue = "") - -@Min(10) @Max(100) + @Min(10) @Max(100) + @Schema(name = "integer", required = false) public Integer getInteger() { return integer; } @@ -100,9 +104,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ - @Schema(name = "int32", defaultValue = "") - -@Min(20) @Max(200) + @Min(20) @Max(200) + @Schema(name = "int32", required = false) public Integer getInt32() { return int32; } @@ -120,9 +123,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ - @Schema(name = "int64", defaultValue = "") - - + + @Schema(name = "int64", required = false) public Long getInt64() { return int64; } @@ -142,11 +144,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ - @Schema(name = "number", required = true, defaultValue = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") + @Schema(name = "number", required = true) public BigDecimal getNumber() { return number; } @@ -166,9 +165,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ - @Schema(name = "_float", defaultValue = "") - -@DecimalMin("54.3") @DecimalMax("987.6") + @DecimalMin("54.3") @DecimalMax("987.6") + @Schema(name = "float", required = false) public Float getFloat() { return _float; } @@ -188,9 +186,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ - @Schema(name = "_double", defaultValue = "") - -@DecimalMin("67.8") @DecimalMax("123.4") + @DecimalMin("67.8") @DecimalMax("123.4") + @Schema(name = "double", required = false) public Double getDouble() { return _double; } @@ -208,9 +205,8 @@ public FormatTest string(String string) { * Get string * @return string */ - @Schema(name = "string", defaultValue = "") - -@Pattern(regexp = "/[a-z]/i") + @Pattern(regexp = "/[a-z]/i") + @Schema(name = "string", required = false) public String getString() { return string; } @@ -228,10 +224,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ - @Schema(name = "_byte", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "byte", required = true) public byte[] getByte() { return _byte; } @@ -240,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -249,15 +243,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ - @Schema(name = "binary", defaultValue = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + @Valid + @Schema(name = "binary", required = false) + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -270,11 +262,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ - @Schema(name = "date", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "date", required = true) public LocalDate getDate() { return date; } @@ -292,10 +281,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -313,10 +300,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", example = "72f98069-206d-4f12-9f12-3d1e525a8e84", required = false) public UUID getUuid() { return uuid; } @@ -334,10 +319,8 @@ public FormatTest password(String password) { * Get password * @return password */ - @Schema(name = "password", required = true, defaultValue = "") - @NotNull - -@Size(min = 10, max = 64) + @NotNull @Size(min = 10, max = 64) + @Schema(name = "password", required = true) public String getPassword() { return password; } @@ -355,10 +338,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ - @Schema(name = "bigDecimal", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "BigDecimal", required = false) public BigDecimal getBigDecimal() { return bigDecimal; } @@ -367,7 +348,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -402,7 +382,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index dfb615a529fc..ec728db1f145 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -53,9 +55,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ - @Schema(name = "foo", readOnly = true, defaultValue = "") - - + + @Schema(name = "foo", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getFoo() { return foo; } @@ -64,7 +65,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java index 3ff73062758f..2da2a81ac823 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -90,10 +93,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ - @Schema(name = "mapMapOfString", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map_map_of_string", required = false) public Map> getMapMapOfString() { return mapMapOfString; } @@ -119,9 +120,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ - @Schema(name = "mapOfEnumString", defaultValue = "") - - + + @Schema(name = "map_of_enum_string", required = false) public Map getMapOfEnumString() { return mapOfEnumString; } @@ -147,9 +147,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ - @Schema(name = "directMap", defaultValue = "") - - + + @Schema(name = "direct_map", required = false) public Map getDirectMap() { return directMap; } @@ -175,9 +174,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ - @Schema(name = "indirectMap", defaultValue = "") - - + + @Schema(name = "indirect_map", required = false) public Map getIndirectMap() { return indirectMap; } @@ -186,7 +184,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -211,7 +208,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 03a7be43cc4a..9681c13f29d4 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -10,6 +10,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,17 +19,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -44,10 +48,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ - @Schema(name = "uuid", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "uuid", required = false) public UUID getUuid() { return uuid; } @@ -65,10 +67,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ - @Schema(name = "dateTime", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "dateTime", required = false) public OffsetDateTime getDateTime() { return dateTime; } @@ -94,10 +94,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ - @Schema(name = "map", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "map", required = false) public Map getMap() { return map; } @@ -106,7 +104,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -130,7 +127,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java index 77bf91649b08..48528166d1c1 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ -@Schema(name = "200_response",description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "200_response", description = "Model for testing model name starting with number") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -34,9 +37,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public Integer getName() { return name; } @@ -54,9 +56,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ - @Schema(name = "propertyClass", defaultValue = "") - - + + @Schema(name = "class", required = false) public String getPropertyClass() { return propertyClass; } @@ -65,7 +66,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java index 2443600df226..4312ff4cc727 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -36,9 +39,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -56,9 +58,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -76,9 +77,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -87,7 +87,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -111,7 +110,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java index 03dba2801411..11078e7094e4 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -30,9 +33,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ - @Schema(name = "_123list", defaultValue = "") - - + + @Schema(name = "123-list", required = false) public String get123list() { return _123list; } @@ -41,7 +43,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java index 0301a47e9f3e..37c94a6aa80e 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ -@Schema(name = "Return",description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Return", description = "Model for testing reserved words") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -31,9 +34,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ - @Schema(name = "_return", defaultValue = "") - - + + @Schema(name = "return", required = false) public Integer getReturn() { return _return; } @@ -42,7 +44,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java index 62a16f80ee07..2876e64e9917 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ -@Schema(name = "Name",description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Name", description = "Model for testing model name same as property name") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -40,10 +43,8 @@ public Name name(Integer name) { * Get name * @return name */ - @Schema(name = "name", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", required = true) public Integer getName() { return name; } @@ -61,9 +62,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ - @Schema(name = "snakeCase", readOnly = true, defaultValue = "") - - + + @Schema(name = "snake_case", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer getSnakeCase() { return snakeCase; } @@ -81,9 +81,8 @@ public Name property(String property) { * Get property * @return property */ - @Schema(name = "property", defaultValue = "") - - + + @Schema(name = "property", required = false) public String getProperty() { return property; } @@ -101,9 +100,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ - @Schema(name = "_123number", readOnly = true, defaultValue = "") - - + + @Schema(name = "123Number", accessMode = Schema.AccessMode.READ_ONLY, required = false) public Integer get123number() { return _123number; } @@ -112,7 +110,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -137,7 +134,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java index 521fad80d5a7..05c9f0a77856 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -31,10 +34,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ - @Schema(name = "justNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "JustNumber", required = false) public BigDecimal getJustNumber() { return justNumber; } @@ -43,7 +44,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java index 05071bdfe2bf..90b0d2957184 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -14,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -30,7 +34,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -85,9 +89,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -105,9 +108,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -125,9 +127,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -145,10 +146,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public OffsetDateTime getShipDate() { return shipDate; } @@ -166,9 +165,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -186,9 +184,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -197,7 +194,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -224,7 +220,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java index a721a3dde6a0..14ff8ff8a9f4 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -37,10 +40,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ - @Schema(name = "myNumber", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "my_number", required = false) public BigDecimal getMyNumber() { return myNumber; } @@ -58,9 +59,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ - @Schema(name = "myString", defaultValue = "") - - + + @Schema(name = "my_string", required = false) public String getMyString() { return myString; } @@ -78,9 +78,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ - @Schema(name = "myBoolean", defaultValue = "") - - + + @Schema(name = "my_boolean", required = false) public Boolean getMyBoolean() { return myBoolean; } @@ -89,7 +88,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java index ba0cca8a5e81..7fdf6f47de31 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java @@ -11,6 +11,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java index 988eb317134d..51d583a02e55 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java @@ -20,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -92,9 +95,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -112,10 +114,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -133,10 +133,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -159,10 +157,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public Set getPhotoUrls() { return photoUrls; } @@ -189,10 +185,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -210,9 +204,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -221,7 +214,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -248,7 +240,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 1c51770a8e66..1d95448aeefe 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ - @Schema(name = "bar", readOnly = true, defaultValue = "") - - + + @Schema(name = "bar", accessMode = Schema.AccessMode.READ_ONLY, required = false) public String getBar() { return bar; } @@ -53,9 +55,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ - @Schema(name = "baz", defaultValue = "") - - + + @Schema(name = "baz", required = false) public String getBaz() { return baz; } @@ -64,7 +65,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java index 75f4be4e9f8f..3dcdd9ee3f54 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -30,9 +33,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ - @Schema(name = "$specialPropertyName", defaultValue = "") - - + + @Schema(name = "$special[property.name]", required = false) public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -41,7 +43,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java index 8722df999bfc..6b24df204718 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -53,9 +55,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -64,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java index 19e9bf310f76..66695c3e8478 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -46,10 +49,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", required = true) public String getStringItem() { return stringItem; } @@ -67,11 +68,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -89,10 +87,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", required = true) public Integer getIntegerItem() { return integerItem; } @@ -110,10 +106,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", required = true) public Boolean getBoolItem() { return boolItem; } @@ -136,10 +130,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", required = true) public List getArrayItem() { return arrayItem; } @@ -148,7 +140,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -174,7 +165,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java index c9a3762bc74b..fdc9a0960759 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -49,10 +52,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ - @Schema(name = "stringItem", example = "what", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "string_item", example = "what", required = true) public String getStringItem() { return stringItem; } @@ -70,11 +71,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ - @Schema(name = "numberItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - @Valid - + @NotNull @Valid + @Schema(name = "number_item", example = "1.234", required = true) public BigDecimal getNumberItem() { return numberItem; } @@ -92,10 +90,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ - @Schema(name = "floatItem", example = "1.234", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "float_item", example = "1.234", required = true) public Float getFloatItem() { return floatItem; } @@ -113,10 +109,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ - @Schema(name = "integerItem", example = "-2", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "integer_item", example = "-2", required = true) public Integer getIntegerItem() { return integerItem; } @@ -134,10 +128,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ - @Schema(name = "boolItem", example = "true", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "bool_item", example = "true", required = true) public Boolean getBoolItem() { return boolItem; } @@ -160,10 +152,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ - @Schema(name = "arrayItem", example = "[0, 1, 2, 3]", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "array_item", example = "[0, 1, 2, 3]", required = true) public List getArrayItem() { return arrayItem; } @@ -172,7 +162,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -199,7 +188,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java index 83152a155535..9aae48b0ceb2 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -51,9 +54,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -71,9 +73,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -91,9 +92,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -111,9 +111,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -131,9 +130,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -151,9 +149,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -171,9 +168,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -191,9 +187,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -202,7 +197,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -231,7 +225,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java index 59a183db0f62..b886d9d3f61e 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -126,9 +129,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ - @Schema(name = "attributeString", example = "string", defaultValue = "") - - + + @Schema(name = "attribute_string", example = "string", required = false) public String getAttributeString() { return attributeString; } @@ -146,10 +148,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ - @Schema(name = "attributeNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "attribute_number", example = "1.234", required = false) public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -167,9 +167,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ - @Schema(name = "attributeInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "attribute_integer", example = "-2", required = false) public Integer getAttributeInteger() { return attributeInteger; } @@ -187,9 +186,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ - @Schema(name = "attributeBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "attribute_boolean", example = "true", required = false) public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -215,9 +213,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ - @Schema(name = "wrappedArray", defaultValue = "") - - + + @Schema(name = "wrapped_array", required = false) public List getWrappedArray() { return wrappedArray; } @@ -235,9 +232,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ - @Schema(name = "nameString", example = "string", defaultValue = "") - - + + @Schema(name = "name_string", example = "string", required = false) public String getNameString() { return nameString; } @@ -255,10 +251,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ - @Schema(name = "nameNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "name_number", example = "1.234", required = false) public BigDecimal getNameNumber() { return nameNumber; } @@ -276,9 +270,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ - @Schema(name = "nameInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "name_integer", example = "-2", required = false) public Integer getNameInteger() { return nameInteger; } @@ -296,9 +289,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ - @Schema(name = "nameBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "name_boolean", example = "true", required = false) public Boolean getNameBoolean() { return nameBoolean; } @@ -324,9 +316,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ - @Schema(name = "nameArray", defaultValue = "") - - + + @Schema(name = "name_array", required = false) public List getNameArray() { return nameArray; } @@ -352,9 +343,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ - @Schema(name = "nameWrappedArray", defaultValue = "") - - + + @Schema(name = "name_wrapped_array", required = false) public List getNameWrappedArray() { return nameWrappedArray; } @@ -372,9 +362,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ - @Schema(name = "prefixString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_string", example = "string", required = false) public String getPrefixString() { return prefixString; } @@ -392,10 +381,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ - @Schema(name = "prefixNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_number", example = "1.234", required = false) public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -413,9 +400,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ - @Schema(name = "prefixInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_integer", example = "-2", required = false) public Integer getPrefixInteger() { return prefixInteger; } @@ -433,9 +419,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ - @Schema(name = "prefixBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_boolean", example = "true", required = false) public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -461,9 +446,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ - @Schema(name = "prefixArray", defaultValue = "") - - + + @Schema(name = "prefix_array", required = false) public List getPrefixArray() { return prefixArray; } @@ -489,9 +473,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ - @Schema(name = "prefixWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_wrapped_array", required = false) public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -509,9 +492,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ - @Schema(name = "namespaceString", example = "string", defaultValue = "") - - + + @Schema(name = "namespace_string", example = "string", required = false) public String getNamespaceString() { return namespaceString; } @@ -529,10 +511,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ - @Schema(name = "namespaceNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "namespace_number", example = "1.234", required = false) public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -550,9 +530,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ - @Schema(name = "namespaceInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "namespace_integer", example = "-2", required = false) public Integer getNamespaceInteger() { return namespaceInteger; } @@ -570,9 +549,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ - @Schema(name = "namespaceBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "namespace_boolean", example = "true", required = false) public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -598,9 +576,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ - @Schema(name = "namespaceArray", defaultValue = "") - - + + @Schema(name = "namespace_array", required = false) public List getNamespaceArray() { return namespaceArray; } @@ -626,9 +603,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ - @Schema(name = "namespaceWrappedArray", defaultValue = "") - - + + @Schema(name = "namespace_wrapped_array", required = false) public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -646,9 +622,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ - @Schema(name = "prefixNsString", example = "string", defaultValue = "") - - + + @Schema(name = "prefix_ns_string", example = "string", required = false) public String getPrefixNsString() { return prefixNsString; } @@ -666,10 +641,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ - @Schema(name = "prefixNsNumber", example = "1.234", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "prefix_ns_number", example = "1.234", required = false) public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -687,9 +660,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ - @Schema(name = "prefixNsInteger", example = "-2", defaultValue = "") - - + + @Schema(name = "prefix_ns_integer", example = "-2", required = false) public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -707,9 +679,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ - @Schema(name = "prefixNsBoolean", example = "true", defaultValue = "") - - + + @Schema(name = "prefix_ns_boolean", example = "true", required = false) public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -735,9 +706,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ - @Schema(name = "prefixNsArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_array", required = false) public List getPrefixNsArray() { return prefixNsArray; } @@ -763,9 +733,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ - @Schema(name = "prefixNsWrappedArray", defaultValue = "") - - + + @Schema(name = "prefix_ns_wrapped_array", required = false) public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -774,7 +743,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -824,7 +792,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index 0bec586d6930..f27571c387be 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -28,7 +29,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "pet", description = "the pet API") public interface PetApi { @@ -45,6 +48,7 @@ default Optional getRequest() { * or Invalid input (status code 405) */ @Operation( + operationId = "addPet", summary = "Add a new pet to the store", tags = { "pet" }, responses = { @@ -91,6 +95,7 @@ default ResponseEntity addPet( * @return Invalid pet value (status code 400) */ @Operation( + operationId = "deletePet", summary = "Deletes a pet", tags = { "pet" }, responses = { @@ -122,6 +127,7 @@ default ResponseEntity deletePet( * or Invalid status value (status code 400) */ @Operation( + operationId = "findPetsByStatus", summary = "Finds Pets by status", tags = { "pet" }, responses = { @@ -169,6 +175,7 @@ default ResponseEntity> findPetsByStatus( * @deprecated */ @Operation( + operationId = "findPetsByTags", summary = "Finds Pets by tags", tags = { "pet" }, responses = { @@ -216,6 +223,7 @@ default ResponseEntity> findPetsByTags( * or Pet not found (status code 404) */ @Operation( + operationId = "getPetById", summary = "Find pet by ID", tags = { "pet" }, responses = { @@ -264,6 +272,7 @@ default ResponseEntity getPetById( * or Validation exception (status code 405) */ @Operation( + operationId = "updatePet", summary = "Update an existing pet", tags = { "pet" }, responses = { @@ -313,6 +322,7 @@ default ResponseEntity updatePet( * @return Invalid input (status code 405) */ @Operation( + operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", tags = { "pet" }, responses = { @@ -346,6 +356,7 @@ default ResponseEntity updatePetWithForm( * @return successful operation (status code 200) */ @Operation( + operationId = "uploadFile", summary = "uploads an image", tags = { "pet" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java index e72c57e3cbec..4ad9ef06158b 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index 98cbb475200d..04b786a8ba48 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -28,7 +28,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "store", description = "the store API") public interface StoreApi { @@ -46,6 +48,7 @@ default Optional getRequest() { * or Order not found (status code 404) */ @Operation( + operationId = "deleteOrder", summary = "Delete purchase order by ID", tags = { "store" }, responses = { @@ -72,6 +75,7 @@ default ResponseEntity deleteOrder( * @return successful operation (status code 200) */ @Operation( + operationId = "getInventory", summary = "Returns pet inventories by status", tags = { "store" }, responses = { @@ -104,6 +108,7 @@ default ResponseEntity> getInventory( * or Order not found (status code 404) */ @Operation( + operationId = "getOrderById", summary = "Find purchase order by ID", tags = { "store" }, responses = { @@ -147,6 +152,7 @@ default ResponseEntity getOrderById( * or Invalid Order (status code 400) */ @Operation( + operationId = "placeOrder", summary = "Place an order for a pet", tags = { "store" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApiController.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApiController.java index 1293b5c8f6e4..293d3035f805 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index 899416135fc5..3268f2475c06 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -29,7 +29,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Tag(name = "user", description = "the user API") public interface UserApi { @@ -46,6 +48,7 @@ default Optional getRequest() { * @return successful operation (status code 200) */ @Operation( + operationId = "createUser", summary = "Create user", tags = { "user" }, responses = { @@ -75,6 +78,7 @@ default ResponseEntity createUser( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -104,6 +108,7 @@ default ResponseEntity createUsersWithArrayInput( * @return successful operation (status code 200) */ @Operation( + operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", tags = { "user" }, responses = { @@ -135,6 +140,7 @@ default ResponseEntity createUsersWithListInput( * or User not found (status code 404) */ @Operation( + operationId = "deleteUser", summary = "Delete user", tags = { "user" }, responses = { @@ -166,6 +172,7 @@ default ResponseEntity deleteUser( * or User not found (status code 404) */ @Operation( + operationId = "getUserByName", summary = "Get user by user name", tags = { "user" }, responses = { @@ -210,6 +217,7 @@ default ResponseEntity getUserByName( * or Invalid username/password supplied (status code 400) */ @Operation( + operationId = "loginUser", summary = "Logs user into the system", tags = { "user" }, responses = { @@ -237,6 +245,7 @@ default ResponseEntity loginUser( * @return successful operation (status code 200) */ @Operation( + operationId = "logoutUser", summary = "Logs out current logged in user session", tags = { "user" }, responses = { @@ -268,6 +277,7 @@ default ResponseEntity logoutUser( * or User not found (status code 404) */ @Operation( + operationId = "updateUser", summary = "Updated user", tags = { "user" }, responses = { diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApiController.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApiController.java index 3f6c4d9a2d6f..aab4767a50d0 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java index 463de0ed39a3..823adb2ae4d8 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A category for a pet */ -@Schema(name = "Category",description = "A category for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Category", description = "A category for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -54,9 +56,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - -@Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + @Schema(name = "name", required = false) public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ef610e38f01..ea4f1e402648 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Describes the result of uploading an image resource */ -@Schema(name = "ApiResponse",description = "Describes the result of uploading an image resource") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java index 528598b79ea7..e624a0d7c1fe 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -14,13 +15,16 @@ import java.util.*; +import javax.annotation.Generated; /** * An order for a pets from the pet store */ -@Schema(name = "Order",description = "An order for a pets from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Order", description = "An order for a pets from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java index 7c2986fea846..ddff66759bac 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java @@ -17,13 +17,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A pet for sale in the pet store */ -@Schema(name = "Pet",description = "A pet for sale in the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Pet", description = "A pet for sale in the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -90,9 +93,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -110,10 +112,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -131,10 +131,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -157,10 +155,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public List getPhotoUrls() { return photoUrls; } @@ -186,10 +182,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -207,9 +201,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -218,7 +211,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -245,7 +237,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java index 27166f687a27..5c3ac82ba6e8 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A tag for a pet */ -@Schema(name = "Tag",description = "A tag for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "Tag", description = "A tag for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/User.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/User.java index ba24f681c1df..328569672eb4 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/User.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/User.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * A User who is purchasing from the pet store */ -@Schema(name = "User",description = "A User who is purchasing from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Schema(name = "User", description = "A User who is purchasing from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java index b5835986beca..e8a00e182c54 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java @@ -16,15 +16,20 @@ import javax.xml.bind.annotation.*; import java.util.*; +import javax.annotation.Generated; /** * A category for a pet */ -@Schema(name = "Category",description = "A category for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen")@JacksonXmlRootElement(localName = "Category") + +@Schema(name = "Category", description = "A category for a pet") +@JacksonXmlRootElement(localName = "Category") @XmlRootElement(name = "Category") @XmlAccessorType(XmlAccessType.FIELD) + +@Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen") public class Category { + @JsonProperty("id") @JacksonXmlProperty(localName = "id") private Long id; @@ -42,9 +47,8 @@ public Category id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -62,9 +66,8 @@ public Category name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - -@Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + @Schema(name = "name", required = false) public String getName() { return name; } @@ -73,7 +76,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -96,7 +98,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java index 4029a7a8be32..9be107507838 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -16,15 +16,20 @@ import javax.xml.bind.annotation.*; import java.util.*; +import javax.annotation.Generated; /** * Describes the result of uploading an image resource */ -@Schema(name = "ApiResponse",description = "Describes the result of uploading an image resource") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen")@JacksonXmlRootElement(localName = "ModelApiResponse") + +@Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") +@JacksonXmlRootElement(localName = "ModelApiResponse") @XmlRootElement(name = "ModelApiResponse") @XmlAccessorType(XmlAccessType.FIELD) + +@Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen") public class ModelApiResponse { + @JsonProperty("code") @JacksonXmlProperty(localName = "code") private Integer code; @@ -46,9 +51,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ - @Schema(name = "code", defaultValue = "") - - + + @Schema(name = "code", required = false) public Integer getCode() { return code; } @@ -66,9 +70,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ - @Schema(name = "type", defaultValue = "") - - + + @Schema(name = "type", required = false) public String getType() { return type; } @@ -86,9 +89,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ - @Schema(name = "message", defaultValue = "") - - + + @Schema(name = "message", required = false) public String getMessage() { return message; } @@ -97,7 +99,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -121,7 +122,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java index 50fc948d4d59..5e8e4d0fc1aa 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Date; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,15 +19,20 @@ import javax.xml.bind.annotation.*; import java.util.*; +import javax.annotation.Generated; /** * An order for a pets from the pet store */ -@Schema(name = "Order",description = "An order for a pets from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen")@JacksonXmlRootElement(localName = "Order") + +@Schema(name = "Order", description = "An order for a pets from the pet store") +@JacksonXmlRootElement(localName = "Order") @XmlRootElement(name = "Order") @XmlAccessorType(XmlAccessType.FIELD) + +@Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen") public class Order { + @JsonProperty("id") @JacksonXmlProperty(localName = "id") private Long id; @@ -41,7 +47,7 @@ public class Order { @JsonProperty("shipDate") @JacksonXmlProperty(localName = "shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private Date shipDate; /** @@ -98,9 +104,8 @@ public Order id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -118,9 +123,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ - @Schema(name = "petId", defaultValue = "") - - + + @Schema(name = "petId", required = false) public Long getPetId() { return petId; } @@ -138,9 +142,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ - @Schema(name = "quantity", defaultValue = "") - - + + @Schema(name = "quantity", required = false) public Integer getQuantity() { return quantity; } @@ -158,10 +161,8 @@ public Order shipDate(Date shipDate) { * Get shipDate * @return shipDate */ - @Schema(name = "shipDate", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "shipDate", required = false) public Date getShipDate() { return shipDate; } @@ -179,9 +180,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ - @Schema(name = "status", defaultValue = "Order Status") - - + + @Schema(name = "status", description = "Order Status", required = false) public StatusEnum getStatus() { return status; } @@ -199,9 +199,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ - @Schema(name = "complete", defaultValue = "") - - + + @Schema(name = "complete", required = false) public Boolean getComplete() { return complete; } @@ -210,7 +209,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -237,7 +235,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java index 04fe97643f6e..22b7ba48291b 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java @@ -21,15 +21,20 @@ import javax.xml.bind.annotation.*; import java.util.*; +import javax.annotation.Generated; /** * A pet for sale in the pet store */ -@Schema(name = "Pet",description = "A pet for sale in the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen")@JacksonXmlRootElement(localName = "Pet") + +@Schema(name = "Pet", description = "A pet for sale in the pet store") +@JacksonXmlRootElement(localName = "Pet") @XmlRootElement(name = "Pet") @XmlAccessorType(XmlAccessType.FIELD) + +@Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen") public class Pet { + @JsonProperty("id") @JacksonXmlProperty(localName = "id") private Long id; @@ -102,9 +107,8 @@ public Pet id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -122,10 +126,8 @@ public Pet category(Category category) { * Get category * @return category */ - @Schema(name = "category", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "category", required = false) public Category getCategory() { return category; } @@ -143,10 +145,8 @@ public Pet name(String name) { * Get name * @return name */ - @Schema(name = "name", example = "doggie", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "name", example = "doggie", required = true) public String getName() { return name; } @@ -169,10 +169,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ - @Schema(name = "photoUrls", required = true, defaultValue = "") - @NotNull - - + @NotNull + @Schema(name = "photoUrls", required = true) public List getPhotoUrls() { return photoUrls; } @@ -198,10 +196,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ - @Schema(name = "tags", defaultValue = "") - - @Valid - + @Valid + @Schema(name = "tags", required = false) public List getTags() { return tags; } @@ -219,9 +215,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ - @Schema(name = "status", defaultValue = "pet status in the store") - - + + @Schema(name = "status", description = "pet status in the store", required = false) public StatusEnum getStatus() { return status; } @@ -230,7 +225,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -257,7 +251,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java index 1c26d8799952..a7beefc24152 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java @@ -16,15 +16,20 @@ import javax.xml.bind.annotation.*; import java.util.*; +import javax.annotation.Generated; /** * A tag for a pet */ -@Schema(name = "Tag",description = "A tag for a pet") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen")@JacksonXmlRootElement(localName = "Tag") + +@Schema(name = "Tag", description = "A tag for a pet") +@JacksonXmlRootElement(localName = "Tag") @XmlRootElement(name = "Tag") @XmlAccessorType(XmlAccessType.FIELD) + +@Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen") public class Tag { + @JsonProperty("id") @JacksonXmlProperty(localName = "id") private Long id; @@ -42,9 +47,8 @@ public Tag id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -62,9 +66,8 @@ public Tag name(String name) { * Get name * @return name */ - @Schema(name = "name", defaultValue = "") - - + + @Schema(name = "name", required = false) public String getName() { return name; } @@ -73,7 +76,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -96,7 +98,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java index e6943a48f328..f8b1176d41bb 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java @@ -16,15 +16,20 @@ import javax.xml.bind.annotation.*; import java.util.*; +import javax.annotation.Generated; /** * A User who is purchasing from the pet store */ -@Schema(name = "User",description = "A User who is purchasing from the pet store") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen")@JacksonXmlRootElement(localName = "User") + +@Schema(name = "User", description = "A User who is purchasing from the pet store") +@JacksonXmlRootElement(localName = "User") @XmlRootElement(name = "User") @XmlAccessorType(XmlAccessType.FIELD) + +@Generated(value = "org.openapitools.codegen.languages.JavaCamelServerCodegen") public class User { + @JsonProperty("id") @JacksonXmlProperty(localName = "id") private Long id; @@ -66,9 +71,8 @@ public User id(Long id) { * Get id * @return id */ - @Schema(name = "id", defaultValue = "") - - + + @Schema(name = "id", required = false) public Long getId() { return id; } @@ -86,9 +90,8 @@ public User username(String username) { * Get username * @return username */ - @Schema(name = "username", defaultValue = "") - - + + @Schema(name = "username", required = false) public String getUsername() { return username; } @@ -106,9 +109,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ - @Schema(name = "firstName", defaultValue = "") - - + + @Schema(name = "firstName", required = false) public String getFirstName() { return firstName; } @@ -126,9 +128,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ - @Schema(name = "lastName", defaultValue = "") - - + + @Schema(name = "lastName", required = false) public String getLastName() { return lastName; } @@ -146,9 +147,8 @@ public User email(String email) { * Get email * @return email */ - @Schema(name = "email", defaultValue = "") - - + + @Schema(name = "email", required = false) public String getEmail() { return email; } @@ -166,9 +166,8 @@ public User password(String password) { * Get password * @return password */ - @Schema(name = "password", defaultValue = "") - - + + @Schema(name = "password", required = false) public String getPassword() { return password; } @@ -186,9 +185,8 @@ public User phone(String phone) { * Get phone * @return phone */ - @Schema(name = "phone", defaultValue = "") - - + + @Schema(name = "phone", required = false) public String getPhone() { return phone; } @@ -206,9 +204,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ - @Schema(name = "userStatus", defaultValue = "User Status") - - + + @Schema(name = "userStatus", description = "User Status", required = false) public Integer getUserStatus() { return userStatus; } @@ -217,7 +214,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -246,7 +242,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java index f4cc86e3817c..cf414337bbc0 100644 --- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java +++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "test-headers", description = "the test-headers API") public interface TestHeadersApi { diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApiController.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApiController.java index 503c9cea6617..cdc9e71f4347 100644 --- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApiController.java +++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.toto.base-path:}") public class TestHeadersApiController implements TestHeadersApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public TestHeadersApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java index 208840a0b056..e585fe05b84f 100644 --- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java +++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "test-query-params", description = "the test-query-params API") public interface TestQueryParamsApi { diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApiController.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApiController.java index 8ded34a79bbb..1884ac71c223 100644 --- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApiController.java +++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.toto.base-path:}") public class TestQueryParamsApiController implements TestQueryParamsApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public TestQueryParamsApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/model/TestResponse.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/model/TestResponse.java index e7115a5f13b9..cae289f03d1b 100644 --- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/model/TestResponse.java +++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/model/TestResponse.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TestResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TestResponse { + @JsonProperty("id") private Integer id; @@ -41,10 +44,8 @@ public TestResponse id(Integer id) { * Get id * @return id */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getId() { return id; } @@ -62,10 +63,8 @@ public TestResponse stringField(String stringField) { * Get stringField * @return stringField */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringField() { return stringField; } @@ -83,11 +82,8 @@ public TestResponse numberField(BigDecimal numberField) { * Get numberField * @return numberField */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberField() { return numberField; } @@ -105,10 +101,8 @@ public TestResponse booleanField(Boolean booleanField) { * Get booleanField * @return booleanField */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBooleanField() { return booleanField; } @@ -117,7 +111,6 @@ public void setBooleanField(Boolean booleanField) { this.booleanField = booleanField; } - @Override public boolean equals(Object o) { if (this == o) { @@ -142,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TestResponse {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" stringField: ").append(toIndentedString(stringField)).append("\n"); sb.append(" numberField: ").append(toIndentedString(numberField)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java index 57027ab454f9..82d201bd766e 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -21,7 +21,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApiController.java index 7e8132190d66..81dcb1da85e4 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java index 5481edab7a72..8b5f909ae5ce 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -30,7 +32,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -350,8 +354,8 @@ default CompletableFuture> testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApiController.java index 1ac9ecd804c4..b81393d39d3b 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 4d7d81f1a1b5..05159a4c14f9 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -21,7 +21,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 68f9c4233e88..3f4a45e1f9fa 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java index 22c715f84ef6..053fc844b0d1 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; @@ -23,7 +24,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApiController.java index 1485b58cb3ec..57cbf21bde71 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java index f3637cae181f..00a99bf54ba8 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java @@ -22,7 +22,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApiController.java index 3a8489c4176d..a1f02f844bf3 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java index 1293676616e2..e8b247455d18 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java @@ -23,7 +23,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApiController.java index 85e906911582..8efc6418c2e8 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java index fbf95bc75027..682e77202d1e 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java @@ -20,8 +20,9 @@ import org.springframework.data.web.PageableHandlerMethodArgumentResolver; import java.util.List; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Configuration @ComponentScan(basePackages = {"org.openapitools.api", "org.openapitools.configuration"}) @EnableWebMvc diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/WebApplication.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/WebApplication.java index 01abb13330d9..8e9d7af82449 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/WebApplication.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/WebApplication.java @@ -1,8 +1,9 @@ package org.openapitools.configuration; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class WebApplication extends AbstractAnnotationConfigDispatcherServletInitializer { @Override diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java index 1fa5ce119f81..691a5378ca49 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java @@ -2,8 +2,9 @@ import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class WebMvcConfiguration extends WebMvcConfigurationSupport { @Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Animal.java index 7598b6f55612..fcd78770a43d 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Animal.java @@ -15,19 +15,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -43,10 +45,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -64,9 +64,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -75,7 +74,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -98,7 +96,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCat.java index 1835c7bf2114..68a00f5edd47 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCat.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -73,9 +76,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -84,7 +86,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCatAllOf.java index 43555f5bfed0..0a8bd5228731 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +105,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java index 9aa5cb53c513..9f17ad305dae 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java @@ -21,12 +21,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -93,9 +96,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -113,10 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -134,10 +134,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1667ef188aeb..1883d899779a 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApiController.java index 7e8132190d66..81dcb1da85e4 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java index bc0af05b90fe..8c4c84d27003 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.time.LocalDateTime; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -29,7 +31,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -345,8 +349,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) LocalDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApiController.java index 1ac9ecd804c4..b81393d39d3b 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e2459cc308c6..138c4a9bf953 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 68f9c4233e88..3f4a45e1f9fa 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java index e969bf667650..90ce18382beb 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; @@ -22,7 +23,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApiController.java index 1485b58cb3ec..57cbf21bde71 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java index 19ab0bb614b6..bc6e370299dc 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApiController.java index 3a8489c4176d..a1f02f844bf3 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java index 9ab7a9c21f56..acaf496cde75 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApiController.java index 85e906911582..8efc6418c2e8 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java index fbf95bc75027..682e77202d1e 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java @@ -20,8 +20,9 @@ import org.springframework.data.web.PageableHandlerMethodArgumentResolver; import java.util.List; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Configuration @ComponentScan(basePackages = {"org.openapitools.api", "org.openapitools.configuration"}) @EnableWebMvc diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/WebApplication.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/WebApplication.java index 01abb13330d9..8e9d7af82449 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/WebApplication.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/WebApplication.java @@ -1,8 +1,9 @@ package org.openapitools.configuration; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class WebApplication extends AbstractAnnotationConfigDispatcherServletInitializer { @Override diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java index 1fa5ce119f81..691a5378ca49 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java @@ -2,8 +2,9 @@ import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class WebMvcConfiguration extends WebMvcConfigurationSupport { @Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Animal.java index 7598b6f55612..fcd78770a43d 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Animal.java @@ -15,19 +15,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -43,10 +45,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -64,9 +64,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -75,7 +74,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -98,7 +96,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCat.java index 1835c7bf2114..68a00f5edd47 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCat.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -73,9 +76,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -84,7 +86,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCatAllOf.java index 43555f5bfed0..0a8bd5228731 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +105,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java index 1eb518cb89d3..63af72a20e4c 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.LocalDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private LocalDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(LocalDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public LocalDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 04802633a427..d36d85b62d81 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private LocalDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(LocalDateTime dateTi * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public LocalDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java index 593ed335a0fd..2a6c352f08b1 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.LocalDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private LocalDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(LocalDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public LocalDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java index 9aa5cb53c513..9f17ad305dae 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java @@ -21,12 +21,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -93,9 +96,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -113,10 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -134,10 +134,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1667ef188aeb..1883d899779a 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java index 7e8132190d66..81dcb1da85e4 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index 71ffda67b0c2..f63a9141189c 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -29,7 +31,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -345,8 +349,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java index 1ac9ecd804c4..b81393d39d3b 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e2459cc308c6..138c4a9bf953 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 68f9c4233e88..3f4a45e1f9fa 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java index e969bf667650..90ce18382beb 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; @@ -22,7 +23,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApiController.java index 1485b58cb3ec..57cbf21bde71 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index 19ab0bb614b6..bc6e370299dc 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java index 3a8489c4176d..a1f02f844bf3 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java index 97583359e3b1..c4a0e46979fa 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApiController.java index 85e906911582..8efc6418c2e8 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java index 97c36459aa0f..7e3d25bb2752 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java @@ -19,8 +19,9 @@ import org.springframework.data.web.PageableHandlerMethodArgumentResolver; import java.util.List; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Configuration @ComponentScan(basePackages = {"org.openapitools.api", "org.openapitools.configuration"}) @EnableWebMvc diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/WebApplication.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/WebApplication.java index 01abb13330d9..8e9d7af82449 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/WebApplication.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/WebApplication.java @@ -1,8 +1,9 @@ package org.openapitools.configuration; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class WebApplication extends AbstractAnnotationConfigDispatcherServletInitializer { @Override diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java index 1fa5ce119f81..691a5378ca49 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java @@ -2,8 +2,9 @@ import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class WebMvcConfiguration extends WebMvcConfigurationSupport { @Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 54acb5633367..73241ece58af 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index af849ea35e73..8ccdac40b273 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index e494b1b2c600..a191e434268c 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 00ab9b250fb4..b319600c9510 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -80,9 +83,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -108,10 +110,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -137,9 +137,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -165,9 +164,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -193,10 +191,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -222,10 +218,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -251,10 +245,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -280,10 +272,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -301,9 +291,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -321,9 +310,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -341,9 +329,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -352,7 +339,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -384,7 +370,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 7e78c62f6e16..989f88c0c63d 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index d01dc2c8e740..32e7a118e940 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index ef6da01824ae..a9f074c13f65 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 13174a324c55..fcf049c6af9c 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Animal.java index e61b1eb77b6e..c15efd1d937b 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Animal.java @@ -14,19 +14,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -42,10 +44,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -63,9 +63,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -74,7 +73,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -97,7 +95,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 96aec05a7434..aecbda603cb5 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -54,7 +55,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index d15054d62914..194acd76a434 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -54,7 +55,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java index d6ac2177926c..8e8b948cac22 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -50,9 +53,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -78,10 +80,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -107,10 +107,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -119,7 +117,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,7 +140,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCat.java index d2ece0d81f96..4f3be6ed2259 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -72,9 +75,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -83,7 +85,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java index a280a3f6cdcf..824974fe6142 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -70,9 +73,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -81,7 +83,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -103,7 +104,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Capitalization.java index a064557cd58a..57505b24226d 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Capitalization.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -45,9 +48,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -65,9 +67,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -85,9 +86,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -105,9 +105,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -125,9 +124,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -145,9 +143,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -156,7 +153,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -183,7 +179,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Cat.java index fc4ab35c4fa2..b8976cec9e36 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Cat.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -32,9 +35,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -43,7 +45,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java index 9a1f6caceff6..1ad2fc260c02 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -30,9 +33,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -41,7 +43,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Category.java index 250c280e8b17..96a6580d410a 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Category.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -53,10 +55,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -65,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ClassModel.java index 24a57ea3f813..45154ca12c1d 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ClassModel.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -31,9 +34,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -42,7 +44,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Client.java index 2b17053e1e65..fce7506b0322 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Client.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -30,9 +33,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -41,7 +43,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Dog.java index e1f27783a597..204603129979 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Dog.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -32,9 +35,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -43,7 +45,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java index 05f26186f9a2..5ff013305270 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -30,9 +33,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -41,7 +43,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java index e8101183905e..5c758075628f 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -107,9 +110,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -135,9 +137,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -146,7 +147,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -169,7 +169,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumClass.java index 6dc082079cf5..21a99583f0d2 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumClass.java @@ -9,6 +9,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -16,6 +17,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumTest.java index 20672ddb0ff3..f29a046fa29d 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumTest.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -188,9 +191,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -208,10 +210,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -229,9 +229,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -249,9 +248,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -269,10 +267,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -281,7 +277,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -307,7 +302,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/File.java index 05ee5b5aa9b3..35dca542482f 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/File.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -31,9 +34,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -42,7 +44,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 7e130932b58b..77b8104b7a75 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -37,10 +40,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -66,10 +67,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -78,7 +77,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -101,7 +99,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FormatTest.java index 0379f1c5c6e1..e37ca0109135 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FormatTest.java @@ -11,18 +11,23 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -48,14 +53,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -78,9 +83,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -100,9 +104,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -120,9 +123,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -142,11 +144,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -166,9 +165,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -188,9 +186,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -208,9 +205,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -228,10 +224,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -240,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -249,15 +243,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -270,11 +262,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -292,10 +281,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -313,10 +300,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -334,10 +319,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -355,10 +338,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -367,7 +348,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -402,7 +382,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index f4b869294be5..09dc39be6e83 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -53,9 +55,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -64,7 +65,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MapTest.java index feba6551cdb2..d23c0b96ca06 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MapTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -90,10 +93,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -119,9 +120,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -147,9 +147,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -175,9 +174,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -186,7 +184,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -211,7 +208,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index abbc1403bb6f..0a91f59ff49b 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,23 +12,27 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -44,10 +48,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -65,10 +67,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -94,10 +94,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -106,7 +104,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -130,7 +127,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Model200Response.java index 513c6029234f..1270afd57ba1 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Model200Response.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -34,9 +37,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -54,9 +56,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -65,7 +66,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java index 8e7128437969..8ced5f5e4169 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -36,9 +39,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -56,9 +58,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -76,9 +77,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -87,7 +87,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -111,7 +110,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelList.java index 7685326df760..5dbced071c03 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelList.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -30,9 +33,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -41,7 +43,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java index 0c8859109559..37f2d7b22f0c 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -31,9 +34,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -42,7 +44,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Name.java index 5551de4c5438..d0980783d75b 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Name.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -40,10 +43,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -61,9 +62,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -81,9 +81,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -101,9 +100,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -112,7 +110,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -137,7 +134,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java index 4f9793f1e12a..f52e43c1dd84 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -31,10 +34,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -43,7 +44,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Order.java index 89be413bc219..83e683e3d6ae 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Order.java @@ -8,18 +8,22 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -30,7 +34,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -85,9 +89,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -105,9 +108,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -125,9 +127,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -145,10 +146,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -166,9 +165,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -186,9 +184,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -197,7 +194,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -224,7 +220,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java index e365d6f2f39e..50e684f86e5c 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -37,10 +40,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -58,9 +59,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -78,9 +78,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -89,7 +88,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java index 41cfb97d1e69..cb8a02c1e184 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java @@ -9,6 +9,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -16,6 +17,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Pet.java index 9c5a7d4617d0..db4c1ce0513c 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Pet.java @@ -20,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -92,9 +95,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -112,10 +114,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -133,10 +133,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -162,10 +160,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -192,10 +188,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -213,9 +207,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -224,7 +217,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -251,7 +243,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f31a23539b97..6d313020ae9c 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -53,9 +55,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -64,7 +65,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java index 36c8e903bf46..0dca87914aff 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -30,9 +33,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -41,7 +43,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Tag.java index a6afe72ee647..5c803770a210 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Tag.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -53,9 +55,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -64,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java index 529910bf9e05..ac0dd3265f79 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -46,10 +49,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -67,11 +68,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -89,10 +87,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -110,10 +106,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -139,10 +133,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -151,7 +143,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -177,7 +168,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java index 6f9abf43c41e..b13b6e0d1d14 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -49,10 +52,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -70,11 +71,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -92,10 +90,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -113,10 +109,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -134,10 +128,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -163,10 +155,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -175,7 +165,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -202,7 +191,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/User.java index 523bd4962749..cd278220668f 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/User.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -51,9 +54,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -71,9 +73,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -91,9 +92,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -111,9 +111,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -131,9 +130,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -151,9 +149,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -171,9 +168,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -191,9 +187,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -202,7 +197,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -231,7 +225,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/XmlItem.java index 2eb5145f1970..cd6bf2b1a1d5 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/XmlItem.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -126,9 +129,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -146,10 +148,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -167,9 +167,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -187,9 +186,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -215,9 +213,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -235,9 +232,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -255,10 +251,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -276,9 +270,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -296,9 +289,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -324,9 +316,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -352,9 +343,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -372,9 +362,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -392,10 +381,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -413,9 +400,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -433,9 +419,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -461,9 +446,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -489,9 +473,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -509,9 +492,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -529,10 +511,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -550,9 +530,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -570,9 +549,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -598,9 +576,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -626,9 +603,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -646,9 +622,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -666,10 +641,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -687,9 +660,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -707,9 +679,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -735,9 +706,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -763,9 +733,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -774,7 +743,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -824,7 +792,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1667ef188aeb..1883d899779a 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApiController.java index 7e8132190d66..81dcb1da85e4 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index 14af6c292108..2bc50f00c65b 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -29,7 +31,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -345,8 +349,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApiController.java index 1ac9ecd804c4..b81393d39d3b 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e2459cc308c6..138c4a9bf953 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 68f9c4233e88..3f4a45e1f9fa 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index dc4a8ace4c6f..294576ae0454 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -5,8 +5,11 @@ */ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -21,7 +24,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { @@ -136,7 +141,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -191,7 +196,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApiController.java index 1485b58cb3ec..57cbf21bde71 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 19ab0bb614b6..bc6e370299dc 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApiController.java index 3a8489c4176d..a1f02f844bf3 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 97583359e3b1..c4a0e46979fa 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApiController.java index 85e906911582..8efc6418c2e8 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java index fbf95bc75027..682e77202d1e 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java @@ -20,8 +20,9 @@ import org.springframework.data.web.PageableHandlerMethodArgumentResolver; import java.util.List; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Configuration @ComponentScan(basePackages = {"org.openapitools.api", "org.openapitools.configuration"}) @EnableWebMvc diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/WebApplication.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/WebApplication.java index 01abb13330d9..8e9d7af82449 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/WebApplication.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/WebApplication.java @@ -1,8 +1,9 @@ package org.openapitools.configuration; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class WebApplication extends AbstractAnnotationConfigDispatcherServletInitializer { @Override diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java index 1fa5ce119f81..691a5378ca49 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java @@ -2,8 +2,9 @@ import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class WebMvcConfiguration extends WebMvcConfigurationSupport { @Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Animal.java index db4f29350ded..1dc5fc69c61b 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Animal.java @@ -15,18 +15,20 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -42,10 +44,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -63,9 +63,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -74,7 +73,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -97,7 +95,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Pet.java index 729ef7defa59..d330c28e6791 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -18,12 +18,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -90,9 +93,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -110,10 +112,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -131,10 +131,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -157,10 +155,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getPhotoUrls() { return photoUrls; } @@ -186,10 +182,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -207,9 +201,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -218,7 +211,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -245,7 +237,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1667ef188aeb..1883d899779a 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApiController.java index 7e8132190d66..81dcb1da85e4 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java index 71ffda67b0c2..f63a9141189c 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -29,7 +31,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -345,8 +349,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java index 1ac9ecd804c4..b81393d39d3b 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e2459cc308c6..138c4a9bf953 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 68f9c4233e88..3f4a45e1f9fa 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java index e969bf667650..90ce18382beb 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; @@ -22,7 +23,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java index 1485b58cb3ec..57cbf21bde71 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java index 19ab0bb614b6..bc6e370299dc 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApiController.java index 3a8489c4176d..a1f02f844bf3 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java index 97583359e3b1..c4a0e46979fa 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApiController.java index 85e906911582..8efc6418c2e8 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java index fbf95bc75027..682e77202d1e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/OpenAPIUiConfiguration.java @@ -20,8 +20,9 @@ import org.springframework.data.web.PageableHandlerMethodArgumentResolver; import java.util.List; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Configuration @ComponentScan(basePackages = {"org.openapitools.api", "org.openapitools.configuration"}) @EnableWebMvc diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/WebApplication.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/WebApplication.java index 01abb13330d9..8e9d7af82449 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/WebApplication.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/WebApplication.java @@ -1,8 +1,9 @@ package org.openapitools.configuration; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class WebApplication extends AbstractAnnotationConfigDispatcherServletInitializer { @Override diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java index 1fa5ce119f81..691a5378ca49 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/WebMvcConfiguration.java @@ -2,8 +2,9 @@ import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; +import javax.annotation.Generated; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class WebMvcConfiguration extends WebMvcConfigurationSupport { @Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 6de38b1147e6..f72d9b894ce0 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,14 +15,17 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -35,9 +38,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -46,7 +48,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index cacb0750801f..17d2e07868be 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -36,9 +39,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -47,7 +49,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 84aa067c80d0..5a89a239c7bb 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,14 +15,17 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -35,9 +38,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -46,7 +48,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index afbcf499d332..e1c617b3a62e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,14 +17,17 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -83,9 +86,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -111,10 +113,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -140,9 +140,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -168,9 +167,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -196,10 +194,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -225,10 +221,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -254,10 +248,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -283,10 +275,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -304,9 +294,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -324,9 +313,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -344,9 +332,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -355,7 +342,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -387,7 +373,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index acc58a56a368..dc95c5c9454a 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,14 +15,17 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -35,9 +38,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -46,7 +48,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index be84ad677c57..7325cfa7dd1f 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -36,9 +39,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -47,7 +49,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index c9e823070d8e..7e8cab024670 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,14 +15,17 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -35,9 +38,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -46,7 +48,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index c62dc11f2ed2..d14290a194c1 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,14 +15,17 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -35,9 +38,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -46,7 +48,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Animal.java index 14f743766311..aded2bae8cb8 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Animal.java @@ -15,21 +15,23 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) -@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") -@com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -45,10 +47,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -66,9 +66,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -77,7 +76,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -100,7 +98,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 61c61fc91997..f733f6d05d5b 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -45,10 +48,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -57,7 +58,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +79,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 3ad7d2361f7c..948967dfb0e3 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -45,10 +48,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -57,7 +58,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -79,7 +79,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayTest.java index 4bfc2cfbb4db..e9c533969a90 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -53,9 +56,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -81,10 +83,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -110,10 +110,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -122,7 +120,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -146,7 +143,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCat.java index ada0edb12a9b..832369e9ff4e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCat.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -76,9 +79,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -87,7 +89,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCatAllOf.java index 461ed180406a..d52a06bb429c 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -14,14 +14,17 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -74,9 +77,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -85,7 +87,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -107,7 +108,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Capitalization.java index 437e279449e5..63572bf8e8e3 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Capitalization.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -48,9 +51,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -68,9 +70,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -88,9 +89,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -108,9 +108,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -128,9 +127,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -148,9 +146,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -159,7 +156,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -186,7 +182,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Cat.java index 12ca73636c60..108e5c8b30a5 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Cat.java @@ -15,14 +15,17 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -35,9 +38,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -46,7 +48,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/CatAllOf.java index bb4667b4e2cb..08432295c3d2 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +67,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Category.java index 84099ff8042b..1497947c1e7e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Category.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -36,9 +39,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -56,10 +58,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -68,7 +68,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -91,7 +90,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ClassModel.java index f74c32f05c74..359d871aa11b 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ClassModel.java @@ -13,15 +13,18 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ -@ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@ApiModel(description = "Model for testing model with \"_class\" property") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -34,9 +37,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -45,7 +47,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -67,7 +68,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Client.java index 55fa62058c17..a7b07bf268c3 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Client.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -33,9 +36,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -44,7 +46,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +67,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Dog.java index 93c917674106..800b5daa10cf 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Dog.java @@ -15,14 +15,17 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -35,9 +38,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -46,7 +48,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/DogAllOf.java index 025e4d7759b9..ce03d3658685 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +67,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java index 30fe225638ea..816494968a44 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -112,9 +115,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -140,9 +142,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -151,7 +152,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -174,7 +174,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumClass.java index 2d83af41c8e3..acf588be02cd 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ * Gets or Sets EnumClass */ @com.fasterxml.jackson.annotation.JsonFormat + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java index 33ea4eacb0f7..747b908c75fa 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java @@ -15,14 +15,17 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -195,9 +198,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -215,10 +217,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -236,9 +236,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -256,9 +255,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -276,10 +274,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -288,7 +284,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -314,7 +309,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/File.java index f483d840515f..f0763ba3be83 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/File.java @@ -13,15 +13,18 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ -@ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@ApiModel(description = "Must be named `File` for test.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -34,9 +37,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -45,7 +47,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -67,7 +68,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 89db3e7f8028..c85e7c28fb92 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -40,10 +43,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -69,10 +70,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -81,7 +80,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +102,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java index 86d421a9d886..0964a16e87c9 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,14 +20,17 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -51,14 +56,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -81,9 +86,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -103,9 +107,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -123,9 +126,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -145,11 +147,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -169,9 +168,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -191,9 +189,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -211,9 +208,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -231,10 +227,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -243,7 +237,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -252,15 +246,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -273,11 +265,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -295,10 +284,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -316,10 +303,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -337,10 +322,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -358,10 +341,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -370,7 +351,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -405,7 +385,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 97d1a64a22d5..94d26e272480 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -36,9 +39,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -56,9 +58,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -67,7 +68,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -90,7 +90,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java index 726c8b5fcf0d..a67a2f842a80 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java @@ -17,14 +17,17 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -94,10 +97,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -123,9 +124,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -151,9 +151,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -179,9 +178,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -190,7 +188,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -215,7 +212,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index b20b2dec7273..09ac3cd1254e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,19 +20,22 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -47,10 +51,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -68,10 +70,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -97,10 +97,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -109,7 +107,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -133,7 +130,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Model200Response.java index f74c29e604cf..df2b0df09245 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Model200Response.java @@ -13,15 +13,18 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ -@ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@ApiModel(description = "Model for testing model name starting with number") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -37,9 +40,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -57,9 +59,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -68,7 +69,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -91,7 +91,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelApiResponse.java index 01d035fa32d8..607b3d9db62f 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -39,9 +42,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -59,9 +61,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -79,9 +80,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -90,7 +90,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +113,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelList.java index e9926c427982..2ba4741b6610 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelList.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -33,9 +36,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -44,7 +46,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +67,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelReturn.java index d17a0da84c8f..0eb9f005974f 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,15 +13,18 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ -@ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@ApiModel(description = "Model for testing reserved words") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -34,9 +37,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -45,7 +47,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -67,7 +68,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Name.java index c5882dc983a9..9afeb6c3d0a7 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Name.java @@ -13,15 +13,18 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ -@ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@ApiModel(description = "Model for testing model name same as property name") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -43,10 +46,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -64,9 +65,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -84,9 +84,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -104,9 +103,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -115,7 +113,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -140,7 +137,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/NumberOnly.java index fc212048b084..e78ca1fb663d 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,14 +14,17 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -34,10 +37,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -46,7 +47,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -68,7 +68,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java index ede10667c9d7..05b93a9c0c79 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -33,7 +37,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -89,9 +93,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -109,9 +112,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -129,9 +131,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -149,10 +150,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -170,9 +169,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -190,9 +188,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -201,7 +198,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -228,7 +224,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java index 0e0d3dc1c394..6b6318d1e2c6 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,14 +14,17 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -40,10 +43,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -61,9 +62,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -81,9 +81,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -92,7 +91,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -116,7 +114,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterEnum.java index e293d46d7b43..1adaf1da0cd6 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -18,6 +19,8 @@ * Gets or Sets OuterEnum */ @com.fasterxml.jackson.annotation.JsonFormat + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java index 7f2bff42e91e..07fb58bfa1f1 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java @@ -21,14 +21,17 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -96,9 +99,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -116,10 +118,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -137,10 +137,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -163,10 +161,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -193,10 +189,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -214,9 +208,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -225,7 +218,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -252,7 +244,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 1ddffebe8f53..f54ba1923dc9 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -36,9 +39,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -56,9 +58,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -67,7 +68,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -90,7 +90,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/SpecialModelName.java index 32a7f5a8851a..240ccd256470 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -33,9 +36,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -44,7 +46,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +67,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Tag.java index 96053497912d..ddc332d38703 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Tag.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -36,9 +39,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -56,9 +58,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -67,7 +68,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -90,7 +90,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderDefault.java index 91863ff730f2..42fd3375bfd1 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -49,10 +52,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -70,11 +71,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -92,10 +90,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -113,10 +109,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -139,10 +133,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -151,7 +143,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -177,7 +168,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderExample.java index 9d2b60593521..48b53ae02b86 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -52,10 +55,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -73,11 +74,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -95,10 +93,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -116,10 +112,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -137,10 +131,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -163,10 +155,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -175,7 +165,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -202,7 +191,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/User.java index 3fa19e61270a..f889aba17b7e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/User.java @@ -13,14 +13,17 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -54,9 +57,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -74,9 +76,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -94,9 +95,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -114,9 +114,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -134,9 +133,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -154,9 +152,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -174,9 +171,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -194,9 +190,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -205,7 +200,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -234,7 +228,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/XmlItem.java index 5d477653f0c2..699a0dc85003 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/XmlItem.java @@ -16,14 +16,17 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") +@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -129,9 +132,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -149,10 +151,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -170,9 +170,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -190,9 +189,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -218,9 +216,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -238,9 +235,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -258,10 +254,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -279,9 +273,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -299,9 +292,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -327,9 +319,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -355,9 +346,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -375,9 +365,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -395,10 +384,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -416,9 +403,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -436,9 +422,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -464,9 +449,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -492,9 +476,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -512,9 +495,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -532,10 +514,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -553,9 +533,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -573,9 +552,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -601,9 +579,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -629,9 +606,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -649,9 +625,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -669,10 +644,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -690,9 +663,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -710,9 +682,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -738,9 +709,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -766,9 +736,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -777,7 +746,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -827,7 +795,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index eb4da37da2c4..5a4e5b8c884b 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java index e8f022846bfc..c9ae29ba1fea 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -20,14 +21,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index ce2e0775f783..b14b9f6fecad 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -25,7 +27,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -295,8 +299,8 @@ ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java index 76034668bf3c..aa5e668384ee 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -22,6 +24,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -29,14 +32,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } @@ -209,8 +214,8 @@ public ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f482b6bf5ac9..ccd8d276dc65 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index b705c60d83bb..e1119b1010d6 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -20,14 +21,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index f0ab551e4d9f..c32bead44069 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; @@ -18,7 +19,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java index f5625cea3f90..ba115c2cd0a4 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java @@ -2,6 +2,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; @@ -15,6 +16,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -22,14 +24,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index cb72ccb357fd..5dce0416efbc 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -17,7 +17,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java index 203faf80f73c..d25fe52ea15c 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java @@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -21,14 +22,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index 3f8d7b71b281..07fe60cce885 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -18,7 +18,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java index 224d437db48a..af6939bbb160 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java @@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -22,14 +23,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 66ec66896784..3792eec67489 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -31,9 +34,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -42,7 +44,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index aeb477e916f2..7bbca47bb996 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 4631883198a5..386a47d64607 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -31,9 +34,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -42,7 +44,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 8b8eaffbe717..47118d90ba4e 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -79,9 +82,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -107,10 +109,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -136,9 +136,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -164,9 +163,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -192,10 +190,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -221,10 +217,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -250,10 +244,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -279,10 +271,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -300,9 +290,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -320,9 +309,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -340,9 +328,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -351,7 +338,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -383,7 +369,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 30654d0bec87..995edc193238 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -31,9 +34,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -42,7 +44,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 1a2c2a018f13..114425f840c5 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 4f14fb1747d0..c655acde2d48 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -31,9 +34,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -42,7 +44,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 3cbd66fa9308..62824a372517 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -31,9 +34,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -42,7 +44,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java index 65534bbd4e39..188d2098d77b 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java @@ -13,19 +13,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -41,10 +43,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -62,9 +62,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -73,7 +72,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -96,7 +94,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 6366e913a321..0b434e5d80dd 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -41,10 +44,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -53,7 +54,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -75,7 +75,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 373e9f19c382..704b68432d7d 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -41,10 +44,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -53,7 +54,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -75,7 +75,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java index 209d51c584d3..5ca8ee5b7d8e 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -49,9 +52,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -77,10 +79,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -106,10 +106,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -118,7 +116,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -142,7 +139,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java index f0fa16873cb8..56f1dd720fd6 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java index a296dfc58190..1c40cb56ac25 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -69,9 +72,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -80,7 +82,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +103,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java index 638fd85562a5..6bad3f78e73a 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -44,9 +47,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -64,9 +66,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -84,9 +85,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -104,9 +104,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -124,9 +123,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -144,9 +142,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -155,7 +152,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -182,7 +178,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java index f1a6ba0ecd89..bd2f9fc3ca08 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java index 166fdfaf7c88..f47941a937ae 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -29,9 +32,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -40,7 +42,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -62,7 +63,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java index 3ca433624284..49c5f68bebdc 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -32,9 +35,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -52,10 +54,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -64,7 +64,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +86,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java index 314cec6e2053..f5363eb06dc9 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java @@ -11,13 +11,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -30,9 +33,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -41,7 +43,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java index 1853eeff5f03..fd5095aade68 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -29,9 +32,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -40,7 +42,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -62,7 +63,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java index e1d49d613485..df2817a964b3 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java index 0249347555d8..25131d8dc35a 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -29,9 +32,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -40,7 +42,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -62,7 +63,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java index 2c22712b9ce4..27bbf28c2b38 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -106,9 +109,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -134,9 +136,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -145,7 +146,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -168,7 +168,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java index 344a5cc7f8d9..1e8800e0b670 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java @@ -8,6 +8,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -15,6 +16,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java index 47feac7def26..450377215592 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -187,9 +190,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -207,10 +209,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -228,9 +228,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -248,9 +247,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -268,10 +266,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -280,7 +276,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -306,7 +301,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java index cbbbf5213c15..f0a6777289cd 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/File.java @@ -11,13 +11,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -30,9 +33,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -41,7 +43,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 8b9090cdc97a..ecb3820b0cf5 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -36,10 +39,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -65,10 +66,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -77,7 +76,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -100,7 +98,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java index d7d44db402c7..063aed84e30d 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java @@ -9,6 +9,8 @@ import java.math.BigDecimal; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import javax.validation.Valid; @@ -16,12 +18,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -47,14 +52,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -77,9 +82,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -99,9 +103,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -119,9 +122,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -141,11 +143,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -165,9 +164,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -187,9 +185,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -207,9 +204,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -227,10 +223,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -239,7 +233,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -248,15 +242,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -269,11 +261,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -291,10 +280,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -312,10 +299,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -333,10 +318,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -354,10 +337,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -366,7 +347,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -401,7 +381,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 055eaea62215..a6100dec7e69 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -32,9 +35,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -52,9 +54,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -63,7 +64,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -86,7 +86,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java index 777ec8f061f8..53e126c34fe7 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -89,10 +92,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -118,9 +119,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -146,9 +146,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -174,9 +173,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -185,7 +183,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -210,7 +207,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 31f0e9691e44..68e453768196 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -11,23 +11,27 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -43,10 +47,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -64,10 +66,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -93,10 +93,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -105,7 +103,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -129,7 +126,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java index a523a095a0d0..ff5f1cbfd767 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java @@ -11,13 +11,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -33,9 +36,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -53,9 +55,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -64,7 +65,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java index e2c8aca9fccb..61fd70ab5992 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -35,9 +38,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -55,9 +57,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -75,9 +76,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -86,7 +86,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -110,7 +109,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java index 5fbabcc7122c..029b4bf191ea 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelList.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -29,9 +32,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -40,7 +42,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -62,7 +63,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java index 2887e82ae242..6e7190a8bb66 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java @@ -11,13 +11,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -30,9 +33,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -41,7 +43,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java index e90e446667d0..ac665b62dd94 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java @@ -11,13 +11,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -39,10 +42,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -60,9 +61,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -80,9 +80,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -100,9 +99,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -111,7 +109,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -136,7 +133,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java index e7453ce92624..ce78534bcf72 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -30,10 +33,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -42,7 +43,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java index d90339edc7e3..a9627499bf79 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java @@ -7,18 +7,22 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -29,7 +33,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -84,9 +88,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -104,9 +107,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -124,9 +126,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -144,10 +145,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -165,9 +164,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -185,9 +183,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -196,7 +193,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -223,7 +219,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java index 44d5a9dc16d6..2300973669e6 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -36,10 +39,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -57,9 +58,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -77,9 +77,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -88,7 +87,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +110,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java index 214947f375cd..874cedf63cfc 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java @@ -8,6 +8,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -15,6 +16,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java index 7c8eeae0204c..90683df8d08a 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java @@ -19,12 +19,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -91,9 +94,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -111,10 +113,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -132,10 +132,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -161,10 +159,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -191,10 +187,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -212,9 +206,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -223,7 +216,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -250,7 +242,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java index af3367a7ffc1..a374f2899ff7 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -32,9 +35,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -52,9 +54,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -63,7 +64,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -86,7 +86,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java index 6cde569d9c0b..d9c67e23a77a 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -29,9 +32,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -40,7 +42,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -62,7 +63,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java index 219b5ef9b872..e24b0968e5ca 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -32,9 +35,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -52,9 +54,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -63,7 +64,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -86,7 +86,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java index 5ddbf1ebca16..922da4c45a33 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -45,10 +48,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -66,11 +67,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -88,10 +86,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -109,10 +105,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -138,10 +132,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -150,7 +142,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -176,7 +167,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java index ad7786409091..c090002feadf 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -48,10 +51,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -69,11 +70,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -91,10 +89,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -112,10 +108,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -133,10 +127,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -162,10 +154,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -174,7 +164,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -201,7 +190,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java index 6e56bc32a2e5..f2b4ed4a98ee 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java @@ -11,12 +11,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -50,9 +53,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -70,9 +72,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -90,9 +91,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -110,9 +110,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -130,9 +129,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -150,9 +148,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -170,9 +167,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -190,9 +186,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -201,7 +196,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -230,7 +224,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java index 621f973ebaeb..c9267532f459 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -125,9 +128,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -145,10 +147,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -166,9 +166,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -186,9 +185,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -214,9 +212,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -234,9 +231,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -254,10 +250,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -275,9 +269,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -295,9 +288,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -323,9 +315,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -351,9 +342,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -371,9 +361,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -391,10 +380,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -412,9 +399,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -432,9 +418,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -460,9 +445,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -488,9 +472,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -508,9 +491,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -528,10 +510,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -549,9 +529,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -569,9 +548,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -597,9 +575,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -625,9 +602,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -645,9 +621,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -665,10 +640,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -686,9 +659,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -706,9 +678,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -734,9 +705,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -762,9 +732,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -773,7 +742,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -823,7 +791,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1667ef188aeb..1883d899779a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApiController.java index d8efcca7f8a4..4bad7b07b87d 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index 71ffda67b0c2..f63a9141189c 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -29,7 +31,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -345,8 +349,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java index c4b88419aabe..c150dba343e5 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e2459cc308c6..138c4a9bf953 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 85458b255da5..1fb4dc597f84 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index e969bf667650..90ce18382beb 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; @@ -22,7 +23,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java index e72c57e3cbec..4ad9ef06158b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java index 19ab0bb614b6..bc6e370299dc 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApiController.java index 1293b5c8f6e4..293d3035f805 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java index 97583359e3b1..c4a0e46979fa 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApiController.java index 3f6c4d9a2d6f..aab4767a50d0 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java index 7598b6f55612..fcd78770a43d 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java @@ -15,19 +15,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -43,10 +45,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -64,9 +64,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -75,7 +74,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -98,7 +96,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java index 1835c7bf2114..68a00f5edd47 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -73,9 +76,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -84,7 +86,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java index 43555f5bfed0..0a8bd5228731 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +105,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java index 9aa5cb53c513..9f17ad305dae 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java @@ -21,12 +21,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -93,9 +96,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -113,10 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -134,10 +134,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index ff5677cd8c33..25aa61f48d66 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java index df11134c8067..f57c395c28a6 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final AnotherFakeApiDelegate delegate; - public AnotherFakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) AnotherFakeApiDelegate delegate) { + public AnotherFakeApiController(@Autowired(required = false) AnotherFakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new AnotherFakeApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index a86542ddf223..2d5e24bcd5f6 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -10,12 +10,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface AnotherFakeApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java index 52267c039104..960fdd4fbb22 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -25,7 +27,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -315,8 +319,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiController.java index 6b22c1aba661..501419787efc 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final FakeApiDelegate delegate; - public FakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeApiDelegate delegate) { + public FakeApiController(@Autowired(required = false) FakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java index d3a949e65d81..3796fc00ce58 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.HttpStatus; @@ -19,12 +21,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f76698310b49..a1b0656bc43b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 58497641e4c5..0e301ab5f9b1 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final FakeClassnameTestApiDelegate delegate; - public FakeClassnameTestApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeClassnameTestApiDelegate delegate) { + public FakeClassnameTestApiController(@Autowired(required = false) FakeClassnameTestApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeClassnameTestApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index ed5a6bfc09a0..fb689b13f943 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -10,12 +10,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeClassnameTestApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index c62662ff8c93..289e898a6831 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; @@ -18,7 +19,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiController.java index 5fa088c6f10b..03b76f0b64b1 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final PetApiDelegate delegate; - public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { + public PetApiController(@Autowired(required = false) PetApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java index e3adc7d4bca7..9c616c14aaa8 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -2,6 +2,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -12,12 +13,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface PetApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java index 39f4c0b7c7e9..0f4dda3730fd 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -17,7 +17,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApiController.java index 9e08c646ae92..8209043ac020 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final StoreApiDelegate delegate; - public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { + public StoreApiController(@Autowired(required = false) StoreApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java index dfe4bb314961..e9b7146b52a8 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -11,12 +11,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface StoreApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java index b45b075f9240..e7aa6f28b61b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java @@ -18,7 +18,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiController.java index bc2d33598fd9..82725d160258 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final UserApiDelegate delegate; - public UserApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) UserApiDelegate delegate) { + public UserApiController(@Autowired(required = false) UserApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new UserApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java index 2efbd71c9dc9..c39231c6b299 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -12,12 +12,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface UserApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java index 7598b6f55612..fcd78770a43d 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java @@ -15,19 +15,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -43,10 +45,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -64,9 +64,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -75,7 +74,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -98,7 +96,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java index 1835c7bf2114..68a00f5edd47 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -73,9 +76,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -84,7 +86,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java index 43555f5bfed0..0a8bd5228731 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +105,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java index 9aa5cb53c513..9f17ad305dae 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java @@ -21,12 +21,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -93,9 +96,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -113,10 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -134,10 +134,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index ff5677cd8c33..25aa61f48d66 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiController.java index df11134c8067..f57c395c28a6 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final AnotherFakeApiDelegate delegate; - public AnotherFakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) AnotherFakeApiDelegate delegate) { + public AnotherFakeApiController(@Autowired(required = false) AnotherFakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new AnotherFakeApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index a86542ddf223..2d5e24bcd5f6 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -10,12 +10,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface AnotherFakeApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 52267c039104..960fdd4fbb22 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -25,7 +27,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -315,8 +319,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java index 6b22c1aba661..501419787efc 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final FakeApiDelegate delegate; - public FakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeApiDelegate delegate) { + public FakeApiController(@Autowired(required = false) FakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java index d3a949e65d81..3796fc00ce58 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.HttpStatus; @@ -19,12 +21,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f76698310b49..a1b0656bc43b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 58497641e4c5..0e301ab5f9b1 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final FakeClassnameTestApiDelegate delegate; - public FakeClassnameTestApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeClassnameTestApiDelegate delegate) { + public FakeClassnameTestApiController(@Autowired(required = false) FakeClassnameTestApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeClassnameTestApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index ed5a6bfc09a0..fb689b13f943 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -10,12 +10,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeClassnameTestApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index c62662ff8c93..289e898a6831 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; @@ -18,7 +19,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java index 5fa088c6f10b..03b76f0b64b1 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final PetApiDelegate delegate; - public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { + public PetApiController(@Autowired(required = false) PetApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java index e3adc7d4bca7..9c616c14aaa8 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -2,6 +2,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -12,12 +13,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface PetApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index 39f4c0b7c7e9..0f4dda3730fd 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -17,7 +17,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiController.java index 9e08c646ae92..8209043ac020 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final StoreApiDelegate delegate; - public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { + public StoreApiController(@Autowired(required = false) StoreApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java index dfe4bb314961..e9b7146b52a8 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -11,12 +11,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface StoreApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index b45b075f9240..e7aa6f28b61b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -18,7 +18,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiController.java index bc2d33598fd9..82725d160258 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final UserApiDelegate delegate; - public UserApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) UserApiDelegate delegate) { + public UserApiController(@Autowired(required = false) UserApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new UserApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java index 2efbd71c9dc9..c39231c6b299 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -12,12 +12,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface UserApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java index 7598b6f55612..fcd78770a43d 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java @@ -15,19 +15,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -43,10 +45,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -64,9 +64,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -75,7 +74,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -98,7 +96,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java index 1835c7bf2114..68a00f5edd47 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -73,9 +76,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -84,7 +86,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java index 43555f5bfed0..0a8bd5228731 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +105,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index 9aa5cb53c513..9f17ad305dae 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -21,12 +21,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -93,9 +96,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -113,10 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -134,10 +134,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index 08fad3c33bf2..f32b3ca03b66 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApiController.java index d8efcca7f8a4..4bad7b07b87d 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index 940a74845194..037a13dee307 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -29,7 +31,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -363,8 +367,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java index c4b88419aabe..c150dba343e5 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 902ff4d66003..b52a218dd3ee 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 85458b255da5..1fb4dc597f84 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index 9ea20fa79798..19270de6e6e6 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; @@ -22,7 +23,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java index e72c57e3cbec..4ad9ef06158b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index 60aaea2af9a5..565feb9ad1ca 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApiController.java index 1293b5c8f6e4..293d3035f805 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index 47da1e2faf2b..fa813d7e9465 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApiController.java index 3f6c4d9a2d6f..aab4767a50d0 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java index 7598b6f55612..fcd78770a43d 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java @@ -15,19 +15,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -43,10 +45,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -64,9 +64,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -75,7 +74,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -98,7 +96,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java index 1835c7bf2114..68a00f5edd47 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -73,9 +76,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -84,7 +86,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java index 43555f5bfed0..0a8bd5228731 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +105,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index 9aa5cb53c513..9f17ad305dae 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -21,12 +21,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -93,9 +96,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -113,10 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -134,10 +134,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index 3fb97da7defe..0f78f2944335 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -20,7 +20,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiController.java index df11134c8067..f57c395c28a6 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final AnotherFakeApiDelegate delegate; - public AnotherFakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) AnotherFakeApiDelegate delegate) { + public AnotherFakeApiController(@Autowired(required = false) AnotherFakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new AnotherFakeApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 2ef11c811c11..575a4e23910b 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -14,12 +14,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface AnotherFakeApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index c01306b7fd40..5471ba1820dd 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -29,7 +31,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -327,8 +331,8 @@ default Mono> testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) Flux binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback, final ServerWebExchange exchange diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java index 6b22c1aba661..501419787efc 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final FakeApiDelegate delegate; - public FakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeApiDelegate delegate) { + public FakeApiController(@Autowired(required = false) FakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java index dbe78fa1c7f9..0193067433b9 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.HttpStatus; @@ -23,12 +25,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 4d2d37f1a59a..6a78bd00fe93 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -20,7 +20,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 58497641e4c5..0e301ab5f9b1 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final FakeClassnameTestApiDelegate delegate; - public FakeClassnameTestApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeClassnameTestApiDelegate delegate) { + public FakeClassnameTestApiController(@Autowired(required = false) FakeClassnameTestApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeClassnameTestApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index 4127d96d9e3e..bd1f7f3542f8 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -14,12 +14,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeClassnameTestApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 877603ff0094..4277d5fc01bf 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; @@ -22,7 +23,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java index 5fa088c6f10b..03b76f0b64b1 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final PetApiDelegate delegate; - public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { + public PetApiController(@Autowired(required = false) PetApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java index 8dc1be776ea0..b4c51ede9184 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -2,6 +2,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -16,12 +17,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface PetApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java index 1b8cd8622037..6d31ec918325 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -21,7 +21,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiController.java index 9e08c646ae92..8209043ac020 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final StoreApiDelegate delegate; - public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { + public StoreApiController(@Autowired(required = false) StoreApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java index 02daadf024a1..d4f1e2efbf99 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -15,12 +15,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface StoreApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index 60a2f999e4bd..923cedcc6469 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiController.java index bc2d33598fd9..82725d160258 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final UserApiDelegate delegate; - public UserApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) UserApiDelegate delegate) { + public UserApiController(@Autowired(required = false) UserApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new UserApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java index 3985dd30ecdf..063cd6d0ee87 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -16,12 +16,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface UserApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java index 7598b6f55612..fcd78770a43d 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java @@ -15,19 +15,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -43,10 +45,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -64,9 +64,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -75,7 +74,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -98,7 +96,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java index 1835c7bf2114..68a00f5edd47 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -73,9 +76,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -84,7 +86,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java index 43555f5bfed0..0a8bd5228731 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +105,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java index 9aa5cb53c513..9f17ad305dae 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java @@ -21,12 +21,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -93,9 +96,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -113,10 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -134,10 +134,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index eb4da37da2c4..5a4e5b8c884b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java index f1ca88a6a5ed..26b35dd83986 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -13,20 +13,23 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.multipart.MultipartFile; import javax.validation.constraints.*; import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final AnotherFakeApiDelegate delegate; - public AnotherFakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) AnotherFakeApiDelegate delegate) { + public AnotherFakeApiController(@Autowired(required = false) AnotherFakeApiDelegate delegate) { this.delegate = delegate; } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index 17244270c859..0e0027d4bc33 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -6,12 +6,13 @@ import java.util.List; import java.util.Map; +import javax.annotation.Generated; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface AnotherFakeApiDelegate { /** diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java index 1030dcc870c8..df8e22923773 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -25,7 +27,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -295,8 +299,8 @@ ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java index 76cc2bb95757..78cddbd6dd52 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -22,20 +24,23 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.multipart.MultipartFile; import javax.validation.constraints.*; import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final FakeApiDelegate delegate; - public FakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeApiDelegate delegate) { + public FakeApiController(@Autowired(required = false) FakeApiDelegate delegate) { this.delegate = delegate; } @@ -185,8 +190,8 @@ public ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java index e88b7aa6ca50..717b8a75310b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.ResponseEntity; @@ -15,12 +17,13 @@ import java.util.List; import java.util.Map; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeApiDelegate { /** diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f482b6bf5ac9..ccd8d276dc65 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 65de19a78d30..498a7ee2e459 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -13,20 +13,23 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.multipart.MultipartFile; import javax.validation.constraints.*; import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final FakeClassnameTestApiDelegate delegate; - public FakeClassnameTestApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeClassnameTestApiDelegate delegate) { + public FakeClassnameTestApiController(@Autowired(required = false) FakeClassnameTestApiDelegate delegate) { this.delegate = delegate; } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index 31b94ac10958..414a09aed4e3 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -6,12 +6,13 @@ import java.util.List; import java.util.Map; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeClassnameTestApiDelegate { /** diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java index c8b2da14ebfc..9cf42e2e281c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -5,8 +5,11 @@ */ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; @@ -17,7 +20,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { @@ -122,7 +127,7 @@ ResponseEntity deletePet( ) ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ); @@ -160,7 +165,7 @@ ResponseEntity> findPetsByStatus( ) ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java index 5583546f3e50..18e06dce43de 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java @@ -1,7 +1,10 @@ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -14,20 +17,23 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.multipart.MultipartFile; import javax.validation.constraints.*; import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final PetApiDelegate delegate; - public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { + public PetApiController(@Autowired(required = false) PetApiDelegate delegate) { this.delegate = delegate; } @@ -72,7 +78,7 @@ public ResponseEntity deletePet( */ public ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, - @springfox.documentation.annotations.ApiIgnore final Pageable pageable + @ApiIgnore final Pageable pageable ) { return delegate.findPetsByStatus(status, pageable); } @@ -89,7 +95,7 @@ public ResponseEntity> findPetsByStatus( */ public ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, - @springfox.documentation.annotations.ApiIgnore final Pageable pageable + @ApiIgnore final Pageable pageable ) { return delegate.findPetsByTags(tags, pageable); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java index 94d3c58d3327..2537ce30da04 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -1,18 +1,22 @@ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import org.springframework.http.ResponseEntity; import org.springframework.web.multipart.MultipartFile; import java.util.List; import java.util.Map; +import javax.annotation.Generated; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface PetApiDelegate { /** @@ -46,7 +50,7 @@ ResponseEntity deletePet(Long petId, * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - ResponseEntity> findPetsByStatus(List status, final org.springframework.data.domain.Pageable pageable); + ResponseEntity> findPetsByStatus(List status, final Pageable pageable); /** * GET /pet/findByTags : Finds Pets by tags @@ -58,7 +62,7 @@ ResponseEntity deletePet(Long petId, * @deprecated * @see PetApi#findPetsByTags */ - ResponseEntity> findPetsByTags(List tags, final org.springframework.data.domain.Pageable pageable); + ResponseEntity> findPetsByTags(List tags, final Pageable pageable); /** * GET /pet/{petId} : Find pet by ID diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java index cb72ccb357fd..5dce0416efbc 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -17,7 +17,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiController.java index 3becdad6f4a6..9cc8ee421f69 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiController.java @@ -14,20 +14,23 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.multipart.MultipartFile; import javax.validation.constraints.*; import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final StoreApiDelegate delegate; - public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { + public StoreApiController(@Autowired(required = false) StoreApiDelegate delegate) { this.delegate = delegate; } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java index a6ad2c609955..5d4bde80620a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -7,12 +7,13 @@ import java.util.List; import java.util.Map; +import javax.annotation.Generated; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface StoreApiDelegate { /** diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java index 3f8d7b71b281..07fe60cce885 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -18,7 +18,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java index a9721c9a469e..777032bef5d4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java @@ -15,20 +15,23 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.multipart.MultipartFile; import javax.validation.constraints.*; import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final UserApiDelegate delegate; - public UserApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) UserApiDelegate delegate) { + public UserApiController(@Autowired(required = false) UserApiDelegate delegate) { this.delegate = delegate; } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java index f41ca92fd595..f1d806c05fd2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -8,12 +8,13 @@ import java.util.List; import java.util.Map; +import javax.annotation.Generated; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface UserApiDelegate { /** diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 46281c6456d3..2874aee40b58 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 474278b1b192..303eb0c55db0 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index c670f89cdfc0..1cac5fc9adca 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 9f89c16c1bcf..167352b36568 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -80,9 +83,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -108,10 +110,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -137,9 +137,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -165,9 +164,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -193,10 +191,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -222,10 +218,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -251,10 +245,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -280,10 +272,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -301,9 +291,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -321,9 +310,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -341,9 +329,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -352,7 +339,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -384,7 +370,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 5ef4af43bbd9..faeaecb95cd2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 95a742297272..522c7e8dda03 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 9969c2fe7201..617d4fb867fd 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 757c0a536fd8..74e04286771a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java index 22249d7cc27e..4bdbbcad59db 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java @@ -14,18 +14,20 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -41,10 +43,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -62,9 +62,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -73,7 +72,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -96,7 +94,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 995bebadda86..622be10459ed 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -54,7 +55,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 922dc7a56667..b0eb6b00dd7c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -54,7 +55,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java index 6937756d45c7..8f34930a5e83 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -50,9 +53,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -78,10 +80,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -107,10 +107,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -119,7 +117,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,7 +140,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Capitalization.java index 19ab1f8baff0..60748a7366ac 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Capitalization.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -45,9 +48,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -65,9 +67,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -85,9 +86,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -105,9 +105,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -125,9 +124,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -145,9 +143,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -156,7 +153,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -183,7 +179,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java index ebf9c7cec807..9fd111c8430c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -32,9 +35,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -43,7 +45,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/CatAllOf.java index 257322699ab9..8e08090e24a3 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/CatAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -30,9 +33,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -41,7 +43,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java index 3c2a6be2b25f..06d98844c504 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -53,10 +55,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -65,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ClassModel.java index 4d88c1e45a8e..2bffe7eecb0e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ClassModel.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -31,9 +34,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -42,7 +44,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Client.java index bb63f835363f..9bc13add64aa 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Client.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -30,9 +33,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -41,7 +43,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java index 21a27eb4e458..daf01294455d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -32,9 +35,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -43,7 +45,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/DogAllOf.java index 09bb08f9458b..6792f7900e9b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/DogAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -30,9 +33,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -41,7 +43,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java index 14bf9e2c281c..aacc863a201b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -107,9 +110,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -135,9 +137,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -146,7 +147,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -169,7 +169,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumClass.java index ed676c3662e1..233a854ff582 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumClass.java @@ -9,6 +9,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -16,6 +17,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java index 3a9a9e85a8c2..cf2427d7be17 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -188,9 +191,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -208,10 +210,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -229,9 +229,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -249,9 +248,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -269,10 +267,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -281,7 +277,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -307,7 +302,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/File.java index 2042a57883ea..baed9c12618f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/File.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -31,9 +34,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -42,7 +44,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java index b71b91db26ba..1d8395401695 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -37,10 +40,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -66,10 +67,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -78,7 +77,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -101,7 +99,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java index 7f83ebda6cbf..d44579f78f94 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -9,6 +9,8 @@ import java.math.BigDecimal; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; @@ -17,12 +19,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -48,14 +53,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -78,9 +83,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -100,9 +104,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -120,9 +123,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -142,11 +144,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -166,9 +165,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -188,9 +186,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -208,9 +205,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -228,10 +224,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -240,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -249,15 +243,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -270,11 +262,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -292,10 +281,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -313,10 +300,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -334,10 +319,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -355,10 +338,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -367,7 +348,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -402,7 +382,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index a712d19243f9..001a3cea2863 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -53,9 +55,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -64,7 +65,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java index a4f10eadf355..d9bc6491e74a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -90,10 +93,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -119,9 +120,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -147,9 +147,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -175,9 +174,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -186,7 +184,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -211,7 +208,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index b6607ec1de22..a3e6d4338bf9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -11,6 +11,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; @@ -18,17 +19,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -44,10 +48,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -65,10 +67,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -94,10 +94,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -106,7 +104,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -130,7 +127,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Model200Response.java index 8e51dc7b0bf5..a308820b4be5 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Model200Response.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -34,9 +37,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -54,9 +56,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -65,7 +66,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java index 1c50e0984df6..a932355454b9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -36,9 +39,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -56,9 +58,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -76,9 +77,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -87,7 +87,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -111,7 +110,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelList.java index f0fbf712e6b2..55133349d684 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelList.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -30,9 +33,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -41,7 +43,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelReturn.java index f71f60f59709..2c67234126d6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelReturn.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -31,9 +34,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -42,7 +44,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java index 8336bed2c940..96cadd497361 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -40,10 +43,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -61,9 +62,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -81,9 +81,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -101,9 +100,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -112,7 +110,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -137,7 +134,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/NumberOnly.java index 87c0551edfce..4ed41292ec07 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/NumberOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -31,10 +34,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -43,7 +44,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Order.java index c03246a0acb9..6c5cc6ed8b20 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Order.java @@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; @@ -14,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -30,7 +34,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -85,9 +89,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -105,9 +108,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -125,9 +127,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -145,10 +146,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -166,9 +165,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -186,9 +184,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -197,7 +194,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -224,7 +220,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterComposite.java index 34098a524fc2..2fa1e8576afe 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterComposite.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -37,10 +40,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -58,9 +59,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -78,9 +78,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -89,7 +88,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterEnum.java index 33f64f0954e6..542939a2a636 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterEnum.java @@ -9,6 +9,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -16,6 +17,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java index 8e56b7045abc..1a4e757a147e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -89,9 +92,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -109,10 +111,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -130,10 +130,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -156,10 +154,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getPhotoUrls() { return photoUrls; } @@ -185,10 +181,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -206,9 +200,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -217,7 +210,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -244,7 +236,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 655154d2cf28..5cf483cb584b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -53,9 +55,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -64,7 +65,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java index beddd922ad47..6f360adf416b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -30,9 +33,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -41,7 +43,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Tag.java index c7dba2565eea..0131b8854d89 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Tag.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -53,9 +55,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -64,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index 9dbb6eeeb09d..66adede6dd12 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -46,10 +49,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -67,11 +68,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -89,10 +87,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -110,10 +106,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -136,10 +130,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -148,7 +140,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -174,7 +165,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index 998c11fb3232..b03cc5c37ec4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -49,10 +52,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -70,11 +71,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -92,10 +90,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -113,10 +109,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -134,10 +128,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -160,10 +152,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -172,7 +162,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -199,7 +188,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/User.java index ac48b7bd3ac7..f443caa28bf0 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/User.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -51,9 +54,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -71,9 +73,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -91,9 +92,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -111,9 +111,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -131,9 +130,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -151,9 +149,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -171,9 +168,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -191,9 +187,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -202,7 +197,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -231,7 +225,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java index fa83623c4bfb..4c6f7d42bd96 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -126,9 +129,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -146,10 +148,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -167,9 +167,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -187,9 +186,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -215,9 +213,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -235,9 +232,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -255,10 +251,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -276,9 +270,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -296,9 +289,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -324,9 +316,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -352,9 +343,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -372,9 +362,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -392,10 +381,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -413,9 +400,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -433,9 +419,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -461,9 +446,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -489,9 +473,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -509,9 +492,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -529,10 +511,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -550,9 +530,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -570,9 +549,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -598,9 +576,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -626,9 +603,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -646,9 +622,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -666,10 +641,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -687,9 +660,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -707,9 +679,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -735,9 +706,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -763,9 +733,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -774,7 +743,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -824,7 +792,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java index ff5677cd8c33..25aa61f48d66 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiController.java index df11134c8067..f57c395c28a6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final AnotherFakeApiDelegate delegate; - public AnotherFakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) AnotherFakeApiDelegate delegate) { + public AnotherFakeApiController(@Autowired(required = false) AnotherFakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new AnotherFakeApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java index a86542ddf223..2d5e24bcd5f6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApiDelegate.java @@ -10,12 +10,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link AnotherFakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface AnotherFakeApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java index 0abbadcd381d..7dee6868f6e4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -25,7 +27,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -315,8 +319,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiController.java index 6b22c1aba661..501419787efc 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final FakeApiDelegate delegate; - public FakeApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeApiDelegate delegate) { + public FakeApiController(@Autowired(required = false) FakeApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java index de03df402674..b8e9dd88d450 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import org.springframework.http.HttpStatus; @@ -19,12 +21,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f76698310b49..a1b0656bc43b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 58497641e4c5..0e301ab5f9b1 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final FakeClassnameTestApiDelegate delegate; - public FakeClassnameTestApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) FakeClassnameTestApiDelegate delegate) { + public FakeClassnameTestApiController(@Autowired(required = false) FakeClassnameTestApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new FakeClassnameTestApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java index ed5a6bfc09a0..fb689b13f943 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApiDelegate.java @@ -10,12 +10,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link FakeClassnameTestApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface FakeClassnameTestApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java index ad5e552b083c..84d8d7bb47b2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java @@ -5,8 +5,11 @@ */ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; @@ -17,7 +20,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { @@ -130,7 +135,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ) { return getDelegate().findPetsByStatus(status, pageable); } @@ -170,7 +175,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ) { return getDelegate().findPetsByTags(tags, pageable); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiController.java index 5fa088c6f10b..03b76f0b64b1 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final PetApiDelegate delegate; - public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { + public PetApiController(@Autowired(required = false) PetApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java index 02d3eee8e53f..2fa88df6b0cf 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -1,7 +1,10 @@ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -11,12 +14,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link PetApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface PetApiDelegate { default Optional getRequest() { @@ -60,7 +64,7 @@ default ResponseEntity deletePet(Long petId, * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - default ResponseEntity> findPetsByStatus(List status, final org.springframework.data.domain.Pageable pageable) { + default ResponseEntity> findPetsByStatus(List status, final Pageable pageable) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -89,7 +93,7 @@ default ResponseEntity> findPetsByStatus(List status, final or * @deprecated * @see PetApi#findPetsByTags */ - default ResponseEntity> findPetsByTags(List tags, final org.springframework.data.domain.Pageable pageable) { + default ResponseEntity> findPetsByTags(List tags, final Pageable pageable) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java index 39f4c0b7c7e9..0f4dda3730fd 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java @@ -17,7 +17,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiController.java index 9e08c646ae92..8209043ac020 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final StoreApiDelegate delegate; - public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { + public StoreApiController(@Autowired(required = false) StoreApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiDelegate.java index dfe4bb314961..e9b7146b52a8 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -11,12 +11,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link StoreApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface StoreApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java index b45b075f9240..e7aa6f28b61b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java @@ -18,7 +18,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiController.java index bc2d33598fd9..82725d160258 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiController.java @@ -2,15 +2,18 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final UserApiDelegate delegate; - public UserApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) UserApiDelegate delegate) { + public UserApiController(@Autowired(required = false) UserApiDelegate delegate) { this.delegate = Optional.ofNullable(delegate).orElse(new UserApiDelegate() {}); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java index 2efbd71c9dc9..c39231c6b299 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -12,12 +12,13 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import javax.annotation.Generated; /** * A delegate to be called by the {@link UserApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public interface UserApiDelegate { default Optional getRequest() { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java index db4f29350ded..1dc5fc69c61b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java @@ -15,18 +15,20 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -42,10 +44,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -63,9 +63,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -74,7 +73,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -97,7 +95,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java index 729ef7defa59..d330c28e6791 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java @@ -18,12 +18,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -90,9 +93,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -110,10 +112,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -131,10 +131,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -157,10 +155,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getPhotoUrls() { return photoUrls; } @@ -186,10 +182,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -207,9 +201,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -218,7 +211,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -245,7 +237,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index eb4da37da2c4..5a4e5b8c884b 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java index e8f022846bfc..c9ae29ba1fea 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -20,14 +21,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java index 1030dcc870c8..df8e22923773 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -25,7 +27,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -295,8 +299,8 @@ ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java index 9a5306056e85..e0f6cf75c832 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,12 +2,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import org.threeten.bp.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.threeten.bp.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -22,6 +24,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -29,14 +32,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } @@ -209,8 +214,8 @@ public ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f482b6bf5ac9..ccd8d276dc65 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -16,7 +16,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index b705c60d83bb..e1119b1010d6 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -20,14 +21,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java index c8b2da14ebfc..9cf42e2e281c 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -5,8 +5,11 @@ */ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; @@ -17,7 +20,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { @@ -122,7 +127,7 @@ ResponseEntity deletePet( ) ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ); @@ -160,7 +165,7 @@ ResponseEntity> findPetsByStatus( ) ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java index 32b8031cf835..139d599af041 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java @@ -1,7 +1,10 @@ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -14,6 +17,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -21,14 +25,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } @@ -76,7 +82,7 @@ public ResponseEntity deletePet( */ public ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, - @springfox.documentation.annotations.ApiIgnore final Pageable pageable + @ApiIgnore final Pageable pageable ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -106,7 +112,7 @@ public ResponseEntity> findPetsByStatus( */ public ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, - @springfox.documentation.annotations.ApiIgnore final Pageable pageable + @ApiIgnore final Pageable pageable ) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java index cb72ccb357fd..5dce0416efbc 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -17,7 +17,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApiController.java index 203faf80f73c..d25fe52ea15c 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApiController.java @@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -21,14 +22,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java index 3f8d7b71b281..07fe60cce885 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -18,7 +18,9 @@ import javax.validation.constraints.*; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java index 224d437db48a..af6939bbb160 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java @@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.multipart.MultipartFile; @@ -22,14 +23,16 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 46281c6456d3..2874aee40b58 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 474278b1b192..303eb0c55db0 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index c670f89cdfc0..1cac5fc9adca 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 9f89c16c1bcf..167352b36568 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -80,9 +83,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -108,10 +110,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -137,9 +137,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -165,9 +164,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -193,10 +191,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -222,10 +218,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -251,10 +245,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -280,10 +272,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -301,9 +291,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -321,9 +310,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -341,9 +329,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -352,7 +339,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -384,7 +370,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 5ef4af43bbd9..faeaecb95cd2 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 95a742297272..522c7e8dda03 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 9969c2fe7201..617d4fb867fd 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 757c0a536fd8..74e04286771a 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -32,9 +35,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -43,7 +45,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java index 22249d7cc27e..4bdbbcad59db 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java @@ -14,18 +14,20 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -41,10 +43,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -62,9 +62,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -73,7 +72,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -96,7 +94,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 995bebadda86..622be10459ed 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -54,7 +55,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 922dc7a56667..b0eb6b00dd7c 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -42,10 +45,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -54,7 +55,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -76,7 +76,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java index 6937756d45c7..8f34930a5e83 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -50,9 +53,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -78,10 +80,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -107,10 +107,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -119,7 +117,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -143,7 +140,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Capitalization.java index 19ab1f8baff0..60748a7366ac 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Capitalization.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -45,9 +48,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -65,9 +67,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -85,9 +86,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -105,9 +105,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -125,9 +124,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -145,9 +143,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -156,7 +153,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -183,7 +179,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java index ebf9c7cec807..9fd111c8430c 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -32,9 +35,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -43,7 +45,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/CatAllOf.java index 257322699ab9..8e08090e24a3 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/CatAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -30,9 +33,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -41,7 +43,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java index 3c2a6be2b25f..06d98844c504 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -53,10 +55,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -65,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ClassModel.java index 4d88c1e45a8e..2bffe7eecb0e 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ClassModel.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -31,9 +34,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -42,7 +44,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Client.java index bb63f835363f..9bc13add64aa 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Client.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -30,9 +33,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -41,7 +43,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java index 21a27eb4e458..daf01294455d 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -32,9 +35,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -43,7 +45,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/DogAllOf.java index 09bb08f9458b..6792f7900e9b 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/DogAllOf.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -30,9 +33,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -41,7 +43,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java index 14bf9e2c281c..aacc863a201b 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -107,9 +110,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -135,9 +137,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -146,7 +147,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -169,7 +169,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumClass.java index ed676c3662e1..233a854ff582 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumClass.java @@ -9,6 +9,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -16,6 +17,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java index 3a9a9e85a8c2..cf2427d7be17 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -188,9 +191,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -208,10 +210,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -229,9 +229,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -249,9 +248,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -269,10 +267,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -281,7 +277,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -307,7 +302,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/File.java index 2042a57883ea..baed9c12618f 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/File.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -31,9 +34,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -42,7 +44,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java index b71b91db26ba..1d8395401695 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -37,10 +40,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -66,10 +67,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -78,7 +77,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -101,7 +99,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java index 7f83ebda6cbf..d44579f78f94 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -9,6 +9,8 @@ import java.math.BigDecimal; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; @@ -17,12 +19,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -48,14 +53,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -78,9 +83,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -100,9 +104,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -120,9 +123,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -142,11 +144,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -166,9 +165,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -188,9 +186,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -208,9 +205,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -228,10 +224,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -240,7 +234,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -249,15 +243,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -270,11 +262,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -292,10 +281,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -313,10 +300,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -334,10 +319,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -355,10 +338,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -367,7 +348,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -402,7 +382,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index a712d19243f9..001a3cea2863 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -53,9 +55,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -64,7 +65,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java index a4f10eadf355..d9bc6491e74a 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -90,10 +93,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -119,9 +120,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -147,9 +147,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -175,9 +174,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -186,7 +184,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -211,7 +208,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index b6607ec1de22..a3e6d4338bf9 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -11,6 +11,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; @@ -18,17 +19,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -44,10 +48,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -65,10 +67,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -94,10 +94,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -106,7 +104,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -130,7 +127,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Model200Response.java index 8e51dc7b0bf5..a308820b4be5 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Model200Response.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -34,9 +37,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -54,9 +56,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -65,7 +66,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java index 1c50e0984df6..a932355454b9 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -36,9 +39,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -56,9 +58,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -76,9 +77,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -87,7 +87,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -111,7 +110,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelList.java index f0fbf712e6b2..55133349d684 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelList.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -30,9 +33,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -41,7 +43,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelReturn.java index f71f60f59709..2c67234126d6 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelReturn.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -31,9 +34,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -42,7 +44,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java index 8336bed2c940..96cadd497361 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java @@ -12,13 +12,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -40,10 +43,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -61,9 +62,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -81,9 +81,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -101,9 +100,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -112,7 +110,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -137,7 +134,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/NumberOnly.java index 87c0551edfce..4ed41292ec07 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/NumberOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -31,10 +34,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -43,7 +44,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Order.java index c03246a0acb9..6c5cc6ed8b20 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Order.java @@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.springframework.format.annotation.DateTimeFormat; import org.threeten.bp.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; @@ -14,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -30,7 +34,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -85,9 +89,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -105,9 +108,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -125,9 +127,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -145,10 +146,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -166,9 +165,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -186,9 +184,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -197,7 +194,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -224,7 +220,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterComposite.java index 34098a524fc2..2fa1e8576afe 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterComposite.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -37,10 +40,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -58,9 +59,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -78,9 +78,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -89,7 +88,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -113,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterEnum.java index 33f64f0954e6..542939a2a636 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterEnum.java @@ -9,6 +9,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -16,6 +17,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java index 8e56b7045abc..1a4e757a147e 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -89,9 +92,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -109,10 +111,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -130,10 +130,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -156,10 +154,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getPhotoUrls() { return photoUrls; } @@ -185,10 +181,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -206,9 +200,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -217,7 +210,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -244,7 +236,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 655154d2cf28..5cf483cb584b 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -33,9 +36,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -53,9 +55,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -64,7 +65,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java index beddd922ad47..6f360adf416b 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -30,9 +33,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -41,7 +43,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -63,7 +64,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Tag.java index c7dba2565eea..0131b8854d89 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Tag.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -33,9 +36,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -53,9 +55,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -64,7 +65,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -87,7 +87,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index 9dbb6eeeb09d..66adede6dd12 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -46,10 +49,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -67,11 +68,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -89,10 +87,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -110,10 +106,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -136,10 +130,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -148,7 +140,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -174,7 +165,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index 998c11fb3232..b03cc5c37ec4 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -49,10 +52,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -70,11 +71,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -92,10 +90,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -113,10 +109,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -134,10 +128,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -160,10 +152,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -172,7 +162,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -199,7 +188,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/User.java index ac48b7bd3ac7..f443caa28bf0 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/User.java @@ -12,12 +12,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -51,9 +54,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -71,9 +73,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -91,9 +92,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -111,9 +111,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -131,9 +130,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -151,9 +149,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -171,9 +168,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -191,9 +187,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -202,7 +197,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -231,7 +225,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java index fa83623c4bfb..4c6f7d42bd96 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -126,9 +129,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -146,10 +148,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -167,9 +167,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -187,9 +186,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -215,9 +213,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -235,9 +232,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -255,10 +251,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -276,9 +270,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -296,9 +289,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -324,9 +316,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -352,9 +343,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -372,9 +362,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -392,10 +381,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -413,9 +400,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -433,9 +419,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -461,9 +446,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -489,9 +473,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -509,9 +492,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -529,10 +511,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -550,9 +530,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -570,9 +549,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -598,9 +576,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -626,9 +603,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -646,9 +622,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -666,10 +641,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -687,9 +660,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -707,9 +679,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -735,9 +706,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -763,9 +733,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -774,7 +743,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -824,7 +792,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1667ef188aeb..1883d899779a 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApiController.java index d8efcca7f8a4..4bad7b07b87d 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index 14af6c292108..2bc50f00c65b 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -29,7 +31,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -345,8 +349,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApiController.java index c4b88419aabe..c150dba343e5 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e2459cc308c6..138c4a9bf953 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 85458b255da5..1fb4dc597f84 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index dc4a8ace4c6f..294576ae0454 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -5,8 +5,11 @@ */ package org.openapitools.api; +import springfox.documentation.annotations.ApiIgnore; import org.openapitools.model.ModelApiResponse; +import org.springframework.data.domain.Pageable; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -21,7 +24,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { @@ -136,7 +141,7 @@ default ResponseEntity deletePet( ) default ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -191,7 +196,7 @@ default ResponseEntity> findPetsByStatus( ) default ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, - @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable + @ApiIgnore final Pageable pageable ) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApiController.java index e72c57e3cbec..4ad9ef06158b 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 19ab0bb614b6..bc6e370299dc 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApiController.java index 1293b5c8f6e4..293d3035f805 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 97583359e3b1..c4a0e46979fa 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApiController.java index 3f6c4d9a2d6f..aab4767a50d0 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java index db4f29350ded..1dc5fc69c61b 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java @@ -15,18 +15,20 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -42,10 +44,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -63,9 +63,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -74,7 +73,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -97,7 +95,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java index 729ef7defa59..d330c28e6791 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -18,12 +18,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -90,9 +93,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -110,10 +112,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -131,10 +131,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -157,10 +155,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getPhotoUrls() { return photoUrls; } @@ -186,10 +182,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -207,9 +201,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -218,7 +211,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -245,7 +237,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1667ef188aeb..1883d899779a 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApiController.java index d8efcca7f8a4..4bad7b07b87d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index 8a9cd128c463..b558d892cbb1 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -29,7 +31,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -345,8 +349,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java index c4b88419aabe..c150dba343e5 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e2459cc308c6..138c4a9bf953 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 85458b255da5..1fb4dc597f84 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index a5de2295a582..559dc219a4fe 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; @@ -22,7 +23,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java index e72c57e3cbec..4ad9ef06158b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index 19ab0bb614b6..bc6e370299dc 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApiController.java index 1293b5c8f6e4..293d3035f805 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index 97583359e3b1..c4a0e46979fa 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApiController.java index 3f6c4d9a2d6f..aab4767a50d0 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java index 7598b6f55612..fcd78770a43d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java @@ -15,19 +15,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -43,10 +45,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -64,9 +64,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -75,7 +74,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -98,7 +96,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java index 1835c7bf2114..68a00f5edd47 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -73,9 +76,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -84,7 +86,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java index 43555f5bfed0..0a8bd5228731 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +105,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java index 9aa5cb53c513..9f17ad305dae 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java @@ -21,12 +21,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -93,9 +96,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -113,10 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -134,10 +134,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java index 6504bc555c21..244f5f910bde 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") @VirtualService diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApiController.java index 78ba74424cb6..7245dbfc6448 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java index 8cfa7936f844..3c59680b33c8 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.virtualan.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.virtualan.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.virtualan.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.virtualan.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.virtualan.model.User; import org.openapitools.virtualan.model.XmlItem; import io.swagger.annotations.*; @@ -31,7 +33,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") @VirtualService @@ -357,8 +361,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApiController.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApiController.java index 4d76ead36678..ece740199a68 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApiController.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java index 4eb9dd69cdda..4278ca712647 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") @VirtualService diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApiController.java index a737205f48f6..b49aa3047d7e 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java index cc2491e204ff..ed063f0a8b72 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.virtualan.model.ModelApiResponse; import org.openapitools.virtualan.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import io.virtualan.annotation.ApiVirtual; @@ -24,7 +25,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") @VirtualService diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApiController.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApiController.java index 0abcfc3c7138..944d8536c305 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApiController.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java index 3a23f5a91257..2f5b01082fbb 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java @@ -23,7 +23,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") @VirtualService diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApiController.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApiController.java index 8302e1607788..d7441d6c6e04 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApiController.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java index 9d2430db5628..3d8032a80bce 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java @@ -24,7 +24,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") @VirtualService diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApiController.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApiController.java index 46bbd55b84f9..676266d17024 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApiController.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesAnyType.java index 22fa90b899c0..7a9d204bd401 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesArray.java index 83acca5c876f..a286c969cdc4 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesBoolean.java index 8d09220b9cbb..b379ee89c6c7 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java index d51807ac9765..e88acdf73662 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesInteger.java index cac69369d0ae..72f7d357b895 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesNumber.java index b58b9bc950c4..d6ee16b057d3 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesObject.java index 67b8b985fedf..bc35d0c6c349 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesString.java index 51c6a3054665..afe4036afffd 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java index 51c6715f728d..f6ff1b04411c 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java @@ -15,19 +15,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -43,10 +45,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -64,9 +64,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -75,7 +74,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -98,7 +96,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java index bafe2d77003b..15759a42b451 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java index e7c79260c172..d2cd808c864f 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java index 620e277c3746..3d8904d1860d 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java index 4ed49f643a6b..21f41931c652 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -73,9 +76,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -84,7 +86,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java index 943231933200..ec9f1f735d14 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +105,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java index d21f7764706b..c8b98732c14f 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java index 395738af94c2..9575c51db521 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/CatAllOf.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/CatAllOf.java index b0ad30eb11c5..07df0cf4f63b 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/CatAllOf.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java index c626fa4b8cfa..89b1e16c9568 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java index cef8cd8b90a0..e2fbb4c84841 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java index 28b2c3b1b5fd..0d17cf36c362 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java index 8af075378f7f..ad083982b12c 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/DogAllOf.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/DogAllOf.java index 678e4809263a..03a99e51d04e 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/DogAllOf.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java index c2d6663545f4..fc07498099ec 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumClass.java index 85be2a8ca87e..395fca337a5c 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java index d27c78376abc..716aa26971ad 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/File.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/File.java index b3ec7aef4076..a10d9cf3cbaf 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/File.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java index b7c9bd3b2163..1bdf0037dbb1 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java index b17cb35148c0..7495eb4765bc 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java index e74e246e1eeb..d80b97c6a2a4 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java index 1aac4a7b761e..8668bdd52295 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java index 3b7c1d6f066e..d3062bf298a2 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.virtualan.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java index d6ee65d5da49..57d1ea9cf5a3 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java index 7aa0db2e770b..3245ee17d3fb 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelList.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelList.java index 17c4c30952e2..74de2ea47b29 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelList.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java index beccd82a057a..d201058acd36 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java index 09c2ff8ded9c..ca925033ab9b 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java index ac7912f6bb3a..ec8823c6d1d0 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java index f7053b1ef4c8..f87bbe4c5b63 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java index 654297922e7e..6fa8aa39a0b0 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterEnum.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterEnum.java index 574ca853a37b..3f9a06195792 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterEnum.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java index 997db40fa479..d5f7277f3364 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java @@ -21,12 +21,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -93,9 +96,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -113,10 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -134,10 +134,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java index 0da3f27957b7..945a44bdc55e 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java index 030ff057ae43..8b156545d7fd 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java index 05f100a5113d..ba86da8547fc 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java index 603dceb13698..ac1bbc674047 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java index a8470a066d82..21ceeea10b87 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java index 8232f1059a48..14aeefb90b47 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java index 0a23cfea1162..01e81e5fdc63 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1667ef188aeb..1883d899779a 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "another-fake", description = "the another-fake API") public interface AnotherFakeApi { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApiController.java index d8efcca7f8a4..4bad7b07b87d 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class AnotherFakeApiController implements AnotherFakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public AnotherFakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java index 71ffda67b0c2..f63a9141189c 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java @@ -7,12 +7,14 @@ import java.math.BigDecimal; import org.openapitools.model.Client; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; import java.time.LocalDate; import java.util.Map; import org.openapitools.model.ModelApiResponse; import java.time.OffsetDateTime; import org.openapitools.model.OuterComposite; +import org.springframework.core.io.Resource; import org.openapitools.model.User; import org.openapitools.model.XmlItem; import io.swagger.annotations.*; @@ -29,7 +31,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake", description = "the fake API") public interface FakeApi { @@ -345,8 +349,8 @@ default ResponseEntity testEndpointParameters( @ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, @ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, @ApiParam(value = "None") @RequestPart(value = "binary", required = false) MultipartFile binary, - @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, + @ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, + @ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, @ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback ) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApiController.java index c4b88419aabe..c150dba343e5 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeApiController implements FakeApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e2459cc308c6..138c4a9bf953 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -20,7 +20,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "fake_classname_test", description = "the fake_classname_test API") public interface FakeClassnameTestApi { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 85458b255da5..1fb4dc597f84 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class FakeClassnameTestApiController implements FakeClassnameTestApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public FakeClassnameTestApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index e969bf667650..90ce18382beb 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import org.springframework.core.io.Resource; import java.util.Set; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; @@ -22,7 +23,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "pet", description = "the pet API") public interface PetApi { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java index e72c57e3cbec..4ad9ef06158b 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class PetApiController implements PetApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public PetApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index 19ab0bb614b6..bc6e370299dc 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -21,7 +21,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "store", description = "the store API") public interface StoreApi { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApiController.java index 1293b5c8f6e4..293d3035f805 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class StoreApiController implements StoreApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public StoreApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index 97583359e3b1..c4a0e46979fa 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -22,7 +22,9 @@ import java.util.List; import java.util.Map; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated @Api(value = "user", description = "the user API") public interface UserApi { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApiController.java index 3f6c4d9a2d6f..aab4767a50d0 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApiController.java @@ -2,16 +2,19 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.request.NativeWebRequest; import java.util.Optional; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Controller @RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") public class UserApiController implements UserApi { private final NativeWebRequest request; - @org.springframework.beans.factory.annotation.Autowired + @Autowired public UserApiController(NativeWebRequest request) { this.request = request; } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 847d9f37777c..ea719cc4ad89 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesAnyType */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesAnyType extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesAnyType name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31b7fad0c945..a4ec39252ebe 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesArray */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesArray extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesArray name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5c23bc8d768e..47db34f7b504 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesBoolean */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesBoolean extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesBoolean name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 82d25ab6e747..5851aa2c2498 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesClass { + @JsonProperty("map_string") @Valid private Map mapString = null; @@ -81,9 +84,8 @@ public AdditionalPropertiesClass putMapStringItem(String key, String mapStringIt * Get mapString * @return mapString */ + @ApiModelProperty(value = "") - - public Map getMapString() { return mapString; } @@ -109,10 +111,8 @@ public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumb * Get mapNumber * @return mapNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMapNumber() { return mapNumber; } @@ -138,9 +138,8 @@ public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntege * Get mapInteger * @return mapInteger */ + @ApiModelProperty(value = "") - - public Map getMapInteger() { return mapInteger; } @@ -166,9 +165,8 @@ public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBoolea * Get mapBoolean * @return mapBoolean */ + @ApiModelProperty(value = "") - - public Map getMapBoolean() { return mapBoolean; } @@ -194,10 +192,8 @@ public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List> getMapArrayInteger() { return mapArrayInteger; } @@ -223,10 +219,8 @@ public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List * Get mapArrayAnytype * @return mapArrayAnytype */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -252,10 +246,8 @@ public AdditionalPropertiesClass putMapMapStringItem(String key, Map> getMapMapString() { return mapMapString; } @@ -281,10 +273,8 @@ public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map> getMapMapAnytype() { return mapMapAnytype; } @@ -302,9 +292,8 @@ public AdditionalPropertiesClass anytype1(Object anytype1) { * Get anytype1 * @return anytype1 */ + @ApiModelProperty(value = "") - - public Object getAnytype1() { return anytype1; } @@ -322,9 +311,8 @@ public AdditionalPropertiesClass anytype2(Object anytype2) { * Get anytype2 * @return anytype2 */ + @ApiModelProperty(value = "") - - public Object getAnytype2() { return anytype2; } @@ -342,9 +330,8 @@ public AdditionalPropertiesClass anytype3(Object anytype3) { * Get anytype3 * @return anytype3 */ + @ApiModelProperty(value = "") - - public Object getAnytype3() { return anytype3; } @@ -353,7 +340,6 @@ public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } - @Override public boolean equals(Object o) { if (this == o) { @@ -385,7 +371,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 802674f78205..bba3dce1a55e 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesInteger */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesInteger extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesInteger name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 787a4262026a..5f48487e05d6 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesNumber extends HashMap { + @JsonProperty("name") private String name; @@ -34,9 +37,8 @@ public AdditionalPropertiesNumber name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -45,7 +47,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 271b66cf6820..40ca1af6ab4f 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesObject extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesObject name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 08ba6bfe63ce..ddc76e27b19f 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * AdditionalPropertiesString */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class AdditionalPropertiesString extends HashMap { + @JsonProperty("name") private String name; @@ -33,9 +36,8 @@ public AdditionalPropertiesString name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -44,7 +46,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java index 7598b6f55612..fcd78770a43d 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java @@ -15,19 +15,21 @@ import java.util.*; +import javax.annotation.Generated; /** * Animal */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) - +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Animal { + @JsonProperty("className") private String className; @@ -43,10 +45,8 @@ public Animal className(String className) { * Get className * @return className */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getClassName() { return className; } @@ -64,9 +64,8 @@ public Animal color(String color) { * Get color * @return color */ + @ApiModelProperty(value = "") - - public String getColor() { return color; } @@ -75,7 +74,6 @@ public void setColor(String color) { this.color = color; } - @Override public boolean equals(Object o) { if (this == o) { @@ -98,7 +96,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index bf1b74e83fca..3859dcfdcc05 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfArrayOfNumberOnly { + @JsonProperty("ArrayArrayNumber") @Valid private List> arrayArrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * Get arrayArrayNumber * @return arrayArrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -55,7 +56,6 @@ public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f1ced8ef71a0..a90ce117c238 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayOfNumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayOfNumberOnly { + @JsonProperty("ArrayNumber") @Valid private List arrayNumber = null; @@ -43,10 +46,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * Get arrayNumber * @return arrayNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getArrayNumber() { return arrayNumber; } @@ -55,7 +56,6 @@ public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -77,7 +77,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java index 81c7ab3dd785..e8f37b16d5cb 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ArrayTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ArrayTest { + @JsonProperty("array_of_string") @Valid private List arrayOfString = null; @@ -51,9 +54,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * Get arrayOfString * @return arrayOfString */ + @ApiModelProperty(value = "") - - public List getArrayOfString() { return arrayOfString; } @@ -79,10 +81,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * Get arrayArrayOfInteger * @return arrayArrayOfInteger */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -108,10 +108,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * Get arrayArrayOfModel * @return arrayArrayOfModel */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -120,7 +118,6 @@ public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } - @Override public boolean equals(Object o) { if (this == o) { @@ -144,7 +141,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java index 1835c7bf2114..68a00f5edd47 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCat extends Cat { + /** * Gets or Sets kind */ @@ -73,9 +76,8 @@ public BigCat kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -84,7 +86,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java index 43555f5bfed0..0a8bd5228731 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * BigCatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BigCatAllOf { + /** * Gets or Sets kind */ @@ -71,9 +74,8 @@ public BigCatAllOf kind(KindEnum kind) { * Get kind * @return kind */ + @ApiModelProperty(value = "") - - public KindEnum getKind() { return kind; } @@ -82,7 +84,6 @@ public void setKind(KindEnum kind) { this.kind = kind; } - @Override public boolean equals(Object o) { if (this == o) { @@ -104,7 +105,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java index 2ccf1e812e5a..37c928a79482 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Capitalization */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Capitalization { + @JsonProperty("smallCamel") private String smallCamel; @@ -46,9 +49,8 @@ public Capitalization smallCamel(String smallCamel) { * Get smallCamel * @return smallCamel */ + @ApiModelProperty(value = "") - - public String getSmallCamel() { return smallCamel; } @@ -66,9 +68,8 @@ public Capitalization capitalCamel(String capitalCamel) { * Get capitalCamel * @return capitalCamel */ + @ApiModelProperty(value = "") - - public String getCapitalCamel() { return capitalCamel; } @@ -86,9 +87,8 @@ public Capitalization smallSnake(String smallSnake) { * Get smallSnake * @return smallSnake */ + @ApiModelProperty(value = "") - - public String getSmallSnake() { return smallSnake; } @@ -106,9 +106,8 @@ public Capitalization capitalSnake(String capitalSnake) { * Get capitalSnake * @return capitalSnake */ + @ApiModelProperty(value = "") - - public String getCapitalSnake() { return capitalSnake; } @@ -126,9 +125,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * Get scAETHFlowPoints * @return scAETHFlowPoints */ + @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -146,9 +144,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * Name of the pet * @return ATT_NAME */ + @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { return ATT_NAME; } @@ -157,7 +154,6 @@ public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } - @Override public boolean equals(Object o) { if (this == o) { @@ -184,7 +180,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java index 0876d9f30a0b..9fb7bfef1800 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Cat */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Cat extends Animal { + @JsonProperty("declawed") private Boolean declawed; @@ -33,9 +36,8 @@ public Cat declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -44,7 +46,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatAllOf.java index d59a3783d0af..c4acf4858c3b 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * CatAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class CatAllOf { + @JsonProperty("declawed") private Boolean declawed; @@ -31,9 +34,8 @@ public CatAllOf declawed(Boolean declawed) { * Get declawed * @return declawed */ + @ApiModelProperty(value = "") - - public Boolean getDeclawed() { return declawed; } @@ -42,7 +44,6 @@ public void setDeclawed(Boolean declawed) { this.declawed = declawed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java index ef9a938298b9..8adf35c2fa00 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Category */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Category { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Category id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,10 +56,8 @@ public Category name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -66,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java index af4c74423128..72e9288b53af 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ + @ApiModel(description = "Model for testing model with \"_class\" property") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ClassModel { + @JsonProperty("_class") private String propertyClass; @@ -32,9 +35,8 @@ public ClassModel propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -43,7 +45,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java index 298c69c03b17..9891fe7dafce 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Client { + @JsonProperty("client") private String client; @@ -31,9 +34,8 @@ public Client client(String client) { * Get client * @return client */ + @ApiModelProperty(value = "") - - public String getClient() { return client; } @@ -42,7 +44,6 @@ public void setClient(String client) { this.client = client; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java index 09938cd0f5fc..3ee8ac596893 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Dog */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Dog extends Animal { + @JsonProperty("breed") private String breed; @@ -33,9 +36,8 @@ public Dog breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -44,7 +46,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogAllOf.java index d95ac4a329d9..d6ff0e0564fc 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogAllOf.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * DogAllOf */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class DogAllOf { + @JsonProperty("breed") private String breed; @@ -31,9 +34,8 @@ public DogAllOf breed(String breed) { * Get breed * @return breed */ + @ApiModelProperty(value = "") - - public String getBreed() { return breed; } @@ -42,7 +44,6 @@ public void setBreed(String breed) { this.breed = breed; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java index beeff77d9e56..b85ad3e155ec 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumArrays */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumArrays { + /** * Gets or Sets justSymbol */ @@ -108,9 +111,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * Get justSymbol * @return justSymbol */ + @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -136,9 +138,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * Get arrayEnum * @return arrayEnum */ + @ApiModelProperty(value = "") - - public List getArrayEnum() { return arrayEnum; } @@ -147,7 +148,6 @@ public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -170,7 +170,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java index 8f82b2f78436..c2abaaed4305 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets EnumClass */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum EnumClass { _ABC("_abc"), diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java index 0ce7ab0f2fa6..5e0e3b8a65e6 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java @@ -15,12 +15,15 @@ import java.util.*; +import javax.annotation.Generated; /** * EnumTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class EnumTest { + /** * Gets or Sets enumString */ @@ -189,9 +192,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * Get enumString * @return enumString */ + @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { return enumString; } @@ -209,10 +211,8 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { * Get enumStringRequired * @return enumStringRequired */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -230,9 +230,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * Get enumInteger * @return enumInteger */ + @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -250,9 +249,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * Get enumNumber * @return enumNumber */ + @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -270,10 +268,8 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * Get outerEnum * @return outerEnum */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { return outerEnum; } @@ -282,7 +278,6 @@ public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } - @Override public boolean equals(Object o) { if (this == o) { @@ -308,7 +303,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/File.java index 2bcc6d7db847..685394664974 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/File.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/File.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Must be named `File` for test. */ + @ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class File { + @JsonProperty("sourceURI") private String sourceURI; @@ -32,9 +35,8 @@ public File sourceURI(String sourceURI) { * Test capitalization * @return sourceURI */ + @ApiModelProperty(value = "Test capitalization") - - public String getSourceURI() { return sourceURI; } @@ -43,7 +45,6 @@ public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 5df5cbac52a3..01149ce8f6ae 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FileSchemaTestClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FileSchemaTestClass { + @JsonProperty("file") private File file; @@ -38,10 +41,8 @@ public FileSchemaTestClass file(File file) { * Get file * @return file */ + @Valid @ApiModelProperty(value = "") - - @Valid - public File getFile() { return file; } @@ -67,10 +68,8 @@ public FileSchemaTestClass addFilesItem(File filesItem) { * Get files * @return files */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getFiles() { return files; } @@ -79,7 +78,6 @@ public void setFiles(List files) { this.files = files; } - @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +100,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java index 352d758ce6e5..91d370eeb058 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java @@ -11,6 +11,8 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import org.springframework.core.io.Resource; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -18,12 +20,15 @@ import java.util.*; +import javax.annotation.Generated; /** * FormatTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class FormatTest { + @JsonProperty("integer") private Integer integer; @@ -49,14 +54,14 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.core.io.Resource binary; + private Resource binary; @JsonProperty("date") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") @@ -79,9 +84,8 @@ public FormatTest integer(Integer integer) { * maximum: 100 * @return integer */ + @Min(10) @Max(100) @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -101,9 +105,8 @@ public FormatTest int32(Integer int32) { * maximum: 200 * @return int32 */ + @Min(20) @Max(200) @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -121,9 +124,8 @@ public FormatTest int64(Long int64) { * Get int64 * @return int64 */ + @ApiModelProperty(value = "") - - public Long getInt64() { return int64; } @@ -143,11 +145,8 @@ public FormatTest number(BigDecimal number) { * maximum: 543.2 * @return number */ + @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid -@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -167,9 +166,8 @@ public FormatTest _float(Float _float) { * maximum: 987.6 * @return _float */ + @DecimalMin("54.3") @DecimalMax("987.6") @ApiModelProperty(value = "") - -@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -189,9 +187,8 @@ public FormatTest _double(Double _double) { * maximum: 123.4 * @return _double */ + @DecimalMin("67.8") @DecimalMax("123.4") @ApiModelProperty(value = "") - -@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -209,9 +206,8 @@ public FormatTest string(String string) { * Get string * @return string */ + @Pattern(regexp = "/[a-z]/i") @ApiModelProperty(value = "") - -@Pattern(regexp = "/[a-z]/i") public String getString() { return string; } @@ -229,10 +225,8 @@ public FormatTest _byte(byte[] _byte) { * Get _byte * @return _byte */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public byte[] getByte() { return _byte; } @@ -241,7 +235,7 @@ public void setByte(byte[] _byte) { this._byte = _byte; } - public FormatTest binary(org.springframework.core.io.Resource binary) { + public FormatTest binary(Resource binary) { this.binary = binary; return this; } @@ -250,15 +244,13 @@ public FormatTest binary(org.springframework.core.io.Resource binary) { * Get binary * @return binary */ + @Valid @ApiModelProperty(value = "") - - @Valid - - public org.springframework.core.io.Resource getBinary() { + public Resource getBinary() { return binary; } - public void setBinary(org.springframework.core.io.Resource binary) { + public void setBinary(Resource binary) { this.binary = binary; } @@ -271,11 +263,8 @@ public FormatTest date(LocalDate date) { * Get date * @return date */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public LocalDate getDate() { return date; } @@ -293,10 +282,8 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -314,10 +301,8 @@ public FormatTest uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -335,10 +320,8 @@ public FormatTest password(String password) { * Get password * @return password */ + @NotNull @Size(min = 10, max = 64) @ApiModelProperty(required = true, value = "") - @NotNull - -@Size(min = 10, max = 64) public String getPassword() { return password; } @@ -356,10 +339,8 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { * Get bigDecimal * @return bigDecimal */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getBigDecimal() { return bigDecimal; } @@ -368,7 +349,6 @@ public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } - @Override public boolean equals(Object o) { if (this == o) { @@ -403,7 +383,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 10e514bb1726..2b64dcf5f9d5 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * HasOnlyReadOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class HasOnlyReadOnly { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public HasOnlyReadOnly bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public HasOnlyReadOnly foo(String foo) { * Get foo * @return foo */ + @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { return foo; } @@ -65,7 +66,6 @@ public void setFoo(String foo) { this.foo = foo; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java index 36754fec8c9e..27e3cea8e6ed 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java @@ -17,12 +17,15 @@ import java.util.*; +import javax.annotation.Generated; /** * MapTest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MapTest { + @JsonProperty("map_map_of_string") @Valid private Map> mapMapOfString = null; @@ -91,10 +94,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * Get mapMapOfString * @return mapMapOfString */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map> getMapMapOfString() { return mapMapOfString; } @@ -120,9 +121,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * Get mapOfEnumString * @return mapOfEnumString */ + @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { return mapOfEnumString; } @@ -148,9 +148,8 @@ public MapTest putDirectMapItem(String key, Boolean directMapItem) { * Get directMap * @return directMap */ + @ApiModelProperty(value = "") - - public Map getDirectMap() { return directMap; } @@ -176,9 +175,8 @@ public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { * Get indirectMap * @return indirectMap */ + @ApiModelProperty(value = "") - - public Map getIndirectMap() { return indirectMap; } @@ -187,7 +185,6 @@ public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } - @Override public boolean equals(Object o) { if (this == o) { @@ -212,7 +209,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 8238e3227a6b..e490e2a61ef7 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -12,6 +12,7 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -19,17 +20,20 @@ import java.util.*; +import javax.annotation.Generated; /** * MixedPropertiesAndAdditionalPropertiesClass */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class MixedPropertiesAndAdditionalPropertiesClass { + @JsonProperty("uuid") private UUID uuid; @JsonProperty("dateTime") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") @@ -45,10 +49,8 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * Get uuid * @return uuid */ + @Valid @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { return uuid; } @@ -66,10 +68,8 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * Get dateTime * @return dateTime */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { return dateTime; } @@ -95,10 +95,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * Get map * @return map */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Map getMap() { return map; } @@ -107,7 +105,6 @@ public void setMap(Map map) { this.map = map; } - @Override public boolean equals(Object o) { if (this == o) { @@ -131,7 +128,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" map: ").append(toIndentedString(map)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java index 3f8bdc54450d..89575c6bad31 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name starting with number */ + @ApiModel(description = "Model for testing model name starting with number") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Model200Response { + @JsonProperty("name") private Integer name; @@ -35,9 +38,8 @@ public Model200Response name(Integer name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public Integer getName() { return name; } @@ -55,9 +57,8 @@ public Model200Response propertyClass(String propertyClass) { * Get propertyClass * @return propertyClass */ + @ApiModelProperty(value = "") - - public String getPropertyClass() { return propertyClass; } @@ -66,7 +67,6 @@ public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } - @Override public boolean equals(Object o) { if (this == o) { @@ -89,7 +89,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java index 99a06748ac14..98f2d63bf77f 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelApiResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelApiResponse { + @JsonProperty("code") private Integer code; @@ -37,9 +40,8 @@ public ModelApiResponse code(Integer code) { * Get code * @return code */ + @ApiModelProperty(value = "") - - public Integer getCode() { return code; } @@ -57,9 +59,8 @@ public ModelApiResponse type(String type) { * Get type * @return type */ + @ApiModelProperty(value = "") - - public String getType() { return type; } @@ -77,9 +78,8 @@ public ModelApiResponse message(String message) { * Get message * @return message */ + @ApiModelProperty(value = "") - - public String getMessage() { return message; } @@ -88,7 +88,6 @@ public void setMessage(String message) { this.message = message; } - @Override public boolean equals(Object o) { if (this == o) { @@ -112,7 +111,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelList.java index a00be9952d8a..6b5e61562ada 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelList.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ModelList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelList { + @JsonProperty("123-list") private String _123list; @@ -31,9 +34,8 @@ public ModelList _123list(String _123list) { * Get _123list * @return _123list */ + @ApiModelProperty(value = "") - - public String get123list() { return _123list; } @@ -42,7 +44,6 @@ public void set123list(String _123list) { this._123list = _123list; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java index d9cc6193aee6..84b54d38a08e 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing reserved words */ + @ApiModel(description = "Model for testing reserved words") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ModelReturn { + @JsonProperty("return") private Integer _return; @@ -32,9 +35,8 @@ public ModelReturn _return(Integer _return) { * Get _return * @return _return */ + @ApiModelProperty(value = "") - - public Integer getReturn() { return _return; } @@ -43,7 +45,6 @@ public void setReturn(Integer _return) { this._return = _return; } - @Override public boolean equals(Object o) { if (this == o) { @@ -65,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java index 880351d2843a..febe2115a665 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java @@ -13,13 +13,16 @@ import java.util.*; +import javax.annotation.Generated; /** * Model for testing model name same as property name */ + @ApiModel(description = "Model for testing model name same as property name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Name { + @JsonProperty("name") private Integer name; @@ -41,10 +44,8 @@ public Name name(Integer name) { * Get name * @return name */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getName() { return name; } @@ -62,9 +63,8 @@ public Name snakeCase(Integer snakeCase) { * Get snakeCase * @return snakeCase */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { return snakeCase; } @@ -82,9 +82,8 @@ public Name property(String property) { * Get property * @return property */ + @ApiModelProperty(value = "") - - public String getProperty() { return property; } @@ -102,9 +101,8 @@ public Name _123number(Integer _123number) { * Get _123number * @return _123number */ + @ApiModelProperty(readOnly = true, value = "") - - public Integer get123number() { return _123number; } @@ -113,7 +111,6 @@ public void set123number(Integer _123number) { this._123number = _123number; } - @Override public boolean equals(Object o) { if (this == o) { @@ -138,7 +135,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); sb.append(" property: ").append(toIndentedString(property)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java index 4af42224ae53..dcf5c5e801a6 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * NumberOnly */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class NumberOnly { + @JsonProperty("JustNumber") private BigDecimal justNumber; @@ -32,10 +35,8 @@ public NumberOnly justNumber(BigDecimal justNumber) { * Get justNumber * @return justNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { return justNumber; } @@ -44,7 +45,6 @@ public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } - @Override public boolean equals(Object o) { if (this == o) { @@ -66,7 +66,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java index ba0b3b2e3131..6bd55e5a1548 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -15,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Order */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Order { + @JsonProperty("id") private Long id; @@ -31,7 +35,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") - @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** @@ -86,9 +90,8 @@ public Order id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -106,9 +109,8 @@ public Order petId(Long petId) { * Get petId * @return petId */ + @ApiModelProperty(value = "") - - public Long getPetId() { return petId; } @@ -126,9 +128,8 @@ public Order quantity(Integer quantity) { * Get quantity * @return quantity */ + @ApiModelProperty(value = "") - - public Integer getQuantity() { return quantity; } @@ -146,10 +147,8 @@ public Order shipDate(OffsetDateTime shipDate) { * Get shipDate * @return shipDate */ + @Valid @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { return shipDate; } @@ -167,9 +166,8 @@ public Order status(StatusEnum status) { * Order Status * @return status */ + @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { return status; } @@ -187,9 +185,8 @@ public Order complete(Boolean complete) { * Get complete * @return complete */ + @ApiModelProperty(value = "") - - public Boolean getComplete() { return complete; } @@ -198,7 +195,6 @@ public void setComplete(Boolean complete) { this.complete = complete; } - @Override public boolean equals(Object o) { if (this == o) { @@ -225,7 +221,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java index cdac99f37e41..eca5e7cd4fa5 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,12 +14,15 @@ import java.util.*; +import javax.annotation.Generated; /** * OuterComposite */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OuterComposite { + @JsonProperty("my_number") private BigDecimal myNumber; @@ -38,10 +41,8 @@ public OuterComposite myNumber(BigDecimal myNumber) { * Get myNumber * @return myNumber */ + @Valid @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { return myNumber; } @@ -59,9 +60,8 @@ public OuterComposite myString(String myString) { * Get myString * @return myString */ + @ApiModelProperty(value = "") - - public String getMyString() { return myString; } @@ -79,9 +79,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * Get myBoolean * @return myBoolean */ + @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { return myBoolean; } @@ -90,7 +89,6 @@ public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } - @Override public boolean equals(Object o) { if (this == o) { @@ -114,7 +112,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java index d74006b9d33e..1f09d0a5d17a 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java @@ -10,6 +10,7 @@ import java.util.*; +import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -17,6 +18,8 @@ /** * Gets or Sets OuterEnum */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public enum OuterEnum { PLACED("placed"), diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java index 9aa5cb53c513..9f17ad305dae 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java @@ -21,12 +21,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Pet */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Pet { + @JsonProperty("id") private Long id; @@ -93,9 +96,8 @@ public Pet id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -113,10 +115,8 @@ public Pet category(Category category) { * Get category * @return category */ + @Valid @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { return category; } @@ -134,10 +134,8 @@ public Pet name(String name) { * Get name * @return name */ + @NotNull @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull - - public String getName() { return name; } @@ -160,10 +158,8 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * Get photoUrls * @return photoUrls */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Set getPhotoUrls() { return photoUrls; } @@ -190,10 +186,8 @@ public Pet addTagsItem(Tag tagsItem) { * Get tags * @return tags */ + @Valid @ApiModelProperty(value = "") - - @Valid - public List getTags() { return tags; } @@ -211,9 +205,8 @@ public Pet status(StatusEnum status) { * pet status in the store * @return status */ + @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { return status; } @@ -222,7 +215,6 @@ public void setStatus(StatusEnum status) { this.status = status; } - @Override public boolean equals(Object o) { if (this == o) { @@ -249,7 +241,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java index f872289b8da3..e2ddfcdfcb17 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * ReadOnlyFirst */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class ReadOnlyFirst { + @JsonProperty("bar") private String bar; @@ -34,9 +37,8 @@ public ReadOnlyFirst bar(String bar) { * Get bar * @return bar */ + @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { return bar; } @@ -54,9 +56,8 @@ public ReadOnlyFirst baz(String baz) { * Get baz * @return baz */ + @ApiModelProperty(value = "") - - public String getBaz() { return baz; } @@ -65,7 +66,6 @@ public void setBaz(String baz) { this.baz = baz; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java index 31cc434cd51b..effca9c97da4 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * SpecialModelName */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class SpecialModelName { + @JsonProperty("$special[property.name]") private Long $specialPropertyName; @@ -31,9 +34,8 @@ public class SpecialModelName { * Get $specialPropertyName * @return $specialPropertyName */ + @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { return $specialPropertyName; } @@ -42,7 +44,6 @@ public class SpecialModelName { this.$specialPropertyName = $specialPropertyName; } - @Override public boolean equals(Object o) { if (this == o) { @@ -64,7 +65,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java index 2d1ac94412f7..03b4ffcdadca 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * Tag */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Tag { + @JsonProperty("id") private Long id; @@ -34,9 +37,8 @@ public Tag id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -54,9 +56,8 @@ public Tag name(String name) { * Get name * @return name */ + @ApiModelProperty(value = "") - - public String getName() { return name; } @@ -65,7 +66,6 @@ public void setName(String name) { this.name = name; } - @Override public boolean equals(Object o) { if (this == o) { @@ -88,7 +88,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefault.java index fb29f038fc6b..01e5d5f3fccd 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderDefault */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderDefault { + @JsonProperty("string_item") private String stringItem = "what"; @@ -47,10 +50,8 @@ public TypeHolderDefault stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -68,11 +69,8 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -90,10 +88,8 @@ public TypeHolderDefault integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -111,10 +107,8 @@ public TypeHolderDefault boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -137,10 +131,8 @@ public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -149,7 +141,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -175,7 +166,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExample.java index 096b4ada0991..e907ad9c28e7 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * TypeHolderExample */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class TypeHolderExample { + @JsonProperty("string_item") private String stringItem; @@ -50,10 +53,8 @@ public TypeHolderExample stringItem(String stringItem) { * Get stringItem * @return stringItem */ + @NotNull @ApiModelProperty(example = "what", required = true, value = "") - @NotNull - - public String getStringItem() { return stringItem; } @@ -71,11 +72,8 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { * Get numberItem * @return numberItem */ + @NotNull @Valid @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - @Valid - public BigDecimal getNumberItem() { return numberItem; } @@ -93,10 +91,8 @@ public TypeHolderExample floatItem(Float floatItem) { * Get floatItem * @return floatItem */ + @NotNull @ApiModelProperty(example = "1.234", required = true, value = "") - @NotNull - - public Float getFloatItem() { return floatItem; } @@ -114,10 +110,8 @@ public TypeHolderExample integerItem(Integer integerItem) { * Get integerItem * @return integerItem */ + @NotNull @ApiModelProperty(example = "-2", required = true, value = "") - @NotNull - - public Integer getIntegerItem() { return integerItem; } @@ -135,10 +129,8 @@ public TypeHolderExample boolItem(Boolean boolItem) { * Get boolItem * @return boolItem */ + @NotNull @ApiModelProperty(example = "true", required = true, value = "") - @NotNull - - public Boolean getBoolItem() { return boolItem; } @@ -161,10 +153,8 @@ public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { * Get arrayItem * @return arrayItem */ + @NotNull @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @NotNull - - public List getArrayItem() { return arrayItem; } @@ -173,7 +163,6 @@ public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } - @Override public boolean equals(Object o) { if (this == o) { @@ -200,7 +189,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java index 3cadd5d4ec50..cff62427bf1a 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java @@ -13,12 +13,15 @@ import java.util.*; +import javax.annotation.Generated; /** * User */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class User { + @JsonProperty("id") private Long id; @@ -52,9 +55,8 @@ public User id(Long id) { * Get id * @return id */ + @ApiModelProperty(value = "") - - public Long getId() { return id; } @@ -72,9 +74,8 @@ public User username(String username) { * Get username * @return username */ + @ApiModelProperty(value = "") - - public String getUsername() { return username; } @@ -92,9 +93,8 @@ public User firstName(String firstName) { * Get firstName * @return firstName */ + @ApiModelProperty(value = "") - - public String getFirstName() { return firstName; } @@ -112,9 +112,8 @@ public User lastName(String lastName) { * Get lastName * @return lastName */ + @ApiModelProperty(value = "") - - public String getLastName() { return lastName; } @@ -132,9 +131,8 @@ public User email(String email) { * Get email * @return email */ + @ApiModelProperty(value = "") - - public String getEmail() { return email; } @@ -152,9 +150,8 @@ public User password(String password) { * Get password * @return password */ + @ApiModelProperty(value = "") - - public String getPassword() { return password; } @@ -172,9 +169,8 @@ public User phone(String phone) { * Get phone * @return phone */ + @ApiModelProperty(value = "") - - public String getPhone() { return phone; } @@ -192,9 +188,8 @@ public User userStatus(Integer userStatus) { * User Status * @return userStatus */ + @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { return userStatus; } @@ -203,7 +198,6 @@ public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } - @Override public boolean equals(Object o) { if (this == o) { @@ -232,7 +226,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItem.java index 62cfbcc6b285..930edebcef74 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItem.java @@ -16,12 +16,15 @@ import java.util.*; +import javax.annotation.Generated; /** * XmlItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class XmlItem { + @JsonProperty("attribute_string") private String attributeString; @@ -127,9 +130,8 @@ public XmlItem attributeString(String attributeString) { * Get attributeString * @return attributeString */ + @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { return attributeString; } @@ -147,10 +149,8 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { * Get attributeNumber * @return attributeNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -168,9 +168,8 @@ public XmlItem attributeInteger(Integer attributeInteger) { * Get attributeInteger * @return attributeInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { return attributeInteger; } @@ -188,9 +187,8 @@ public XmlItem attributeBoolean(Boolean attributeBoolean) { * Get attributeBoolean * @return attributeBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { return attributeBoolean; } @@ -216,9 +214,8 @@ public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { * Get wrappedArray * @return wrappedArray */ + @ApiModelProperty(value = "") - - public List getWrappedArray() { return wrappedArray; } @@ -236,9 +233,8 @@ public XmlItem nameString(String nameString) { * Get nameString * @return nameString */ + @ApiModelProperty(example = "string", value = "") - - public String getNameString() { return nameString; } @@ -256,10 +252,8 @@ public XmlItem nameNumber(BigDecimal nameNumber) { * Get nameNumber * @return nameNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNameNumber() { return nameNumber; } @@ -277,9 +271,8 @@ public XmlItem nameInteger(Integer nameInteger) { * Get nameInteger * @return nameInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { return nameInteger; } @@ -297,9 +290,8 @@ public XmlItem nameBoolean(Boolean nameBoolean) { * Get nameBoolean * @return nameBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { return nameBoolean; } @@ -325,9 +317,8 @@ public XmlItem addNameArrayItem(Integer nameArrayItem) { * Get nameArray * @return nameArray */ + @ApiModelProperty(value = "") - - public List getNameArray() { return nameArray; } @@ -353,9 +344,8 @@ public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { * Get nameWrappedArray * @return nameWrappedArray */ + @ApiModelProperty(value = "") - - public List getNameWrappedArray() { return nameWrappedArray; } @@ -373,9 +363,8 @@ public XmlItem prefixString(String prefixString) { * Get prefixString * @return prefixString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { return prefixString; } @@ -393,10 +382,8 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { * Get prefixNumber * @return prefixNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -414,9 +401,8 @@ public XmlItem prefixInteger(Integer prefixInteger) { * Get prefixInteger * @return prefixInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { return prefixInteger; } @@ -434,9 +420,8 @@ public XmlItem prefixBoolean(Boolean prefixBoolean) { * Get prefixBoolean * @return prefixBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { return prefixBoolean; } @@ -462,9 +447,8 @@ public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { * Get prefixArray * @return prefixArray */ + @ApiModelProperty(value = "") - - public List getPrefixArray() { return prefixArray; } @@ -490,9 +474,8 @@ public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { * Get prefixWrappedArray * @return prefixWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { return prefixWrappedArray; } @@ -510,9 +493,8 @@ public XmlItem namespaceString(String namespaceString) { * Get namespaceString * @return namespaceString */ + @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { return namespaceString; } @@ -530,10 +512,8 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { * Get namespaceNumber * @return namespaceNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -551,9 +531,8 @@ public XmlItem namespaceInteger(Integer namespaceInteger) { * Get namespaceInteger * @return namespaceInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { return namespaceInteger; } @@ -571,9 +550,8 @@ public XmlItem namespaceBoolean(Boolean namespaceBoolean) { * Get namespaceBoolean * @return namespaceBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { return namespaceBoolean; } @@ -599,9 +577,8 @@ public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { * Get namespaceArray * @return namespaceArray */ + @ApiModelProperty(value = "") - - public List getNamespaceArray() { return namespaceArray; } @@ -627,9 +604,8 @@ public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { * Get namespaceWrappedArray * @return namespaceWrappedArray */ + @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { return namespaceWrappedArray; } @@ -647,9 +623,8 @@ public XmlItem prefixNsString(String prefixNsString) { * Get prefixNsString * @return prefixNsString */ + @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { return prefixNsString; } @@ -667,10 +642,8 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { * Get prefixNsNumber * @return prefixNsNumber */ + @Valid @ApiModelProperty(example = "1.234", value = "") - - @Valid - public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } @@ -688,9 +661,8 @@ public XmlItem prefixNsInteger(Integer prefixNsInteger) { * Get prefixNsInteger * @return prefixNsInteger */ + @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { return prefixNsInteger; } @@ -708,9 +680,8 @@ public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { * Get prefixNsBoolean * @return prefixNsBoolean */ + @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { return prefixNsBoolean; } @@ -736,9 +707,8 @@ public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { * Get prefixNsArray * @return prefixNsArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsArray() { return prefixNsArray; } @@ -764,9 +734,8 @@ public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { * Get prefixNsWrappedArray * @return prefixNsWrappedArray */ + @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { return prefixNsWrappedArray; } @@ -775,7 +744,6 @@ public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } - @Override public boolean equals(Object o) { if (this == o) { @@ -825,7 +793,6 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n");