[Java Spring OAS3] Minor fixes and general improvements (#11229)

* * Use Relative Imports for org.springframework.core.io.Resource
* api.mustache: Add operationId to atOperation annotation
* Overhaul atSchema annotation in model
* Add spring-stubs-oas3.yaml test config
* Optimize mustache templates
* Use Relative Imports for DateTimeFormat, Pageable and ApiIgnore

* Add spring-stubs-oas3.yaml test config

* Generate all samples

* Explain fromOperation override to support more logic-less templates.

* Support RootUriTemplateHandler from spring-boot

* Revert "Support RootUriTemplateHandler from spring-boot"

This reverts commit 1915f8b19e.

* Evaluate additional property useSpringfox as Boolean

* Generate all samples after merge (java-camel)

* Fix typo

* Move java-camel test deom samples.circleci.spring to samples.circleci profile.

* re-generate all samples after merge

* Generate samples and docs after merge

* Generate samples after merge conflicts resolved
This commit is contained in:
cachescrubber
2022-01-17 08:25:50 +01:00
committed by GitHub
parent e477538273
commit 0f6b620817
1609 changed files with 14268 additions and 14523 deletions

View File

@@ -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"

View File

@@ -20,7 +20,6 @@ package org.openapitools.codegen.languages;
import static org.apache.commons.lang3.StringUtils.isNotEmpty; import static org.apache.commons.lang3.StringUtils.isNotEmpty;
import static org.openapitools.codegen.utils.StringUtils.camelize; import static org.openapitools.codegen.utils.StringUtils.camelize;
import io.swagger.v3.oas.models.media.Schema;
import java.io.File; import java.io.File;
import java.net.URL; import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
@@ -33,6 +32,12 @@ import java.util.Map;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.stream.Collectors; 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.apache.commons.lang3.tuple.Pair;
import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CliOption;
import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenConstants;
@@ -59,12 +64,6 @@ import org.openapitools.codegen.utils.URLPathUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; 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 public class SpringCodegen extends AbstractJavaCodegen
implements BeanValidationFeatures, PerformBeanValidationFeatures, OptionalFeatures { implements BeanValidationFeatures, PerformBeanValidationFeatures, OptionalFeatures {
private final Logger LOGGER = LoggerFactory.getLogger(SpringCodegen.class); private final Logger LOGGER = LoggerFactory.getLogger(SpringCodegen.class);
@@ -390,8 +389,11 @@ public class SpringCodegen extends AbstractJavaCodegen
} }
additionalProperties.put(UNHANDLED_EXCEPTION_HANDLING, this.isUnhandledException()); additionalProperties.put(UNHANDLED_EXCEPTION_HANDLING, this.isUnhandledException());
typeMapping.put("file", "org.springframework.core.io.Resource"); typeMapping.put("file", "Resource");
importMapping.put("org.springframework.core.io.Resource", "org.springframework.core.io.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) { if (useOptional) {
writePropertyBack(USE_OPTIONAL, useOptional); writePropertyBack(USE_OPTIONAL, useOptional);
@@ -899,6 +901,11 @@ public class SpringCodegen extends AbstractJavaCodegen
public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { public void postProcessModelProperty(CodegenModel model, CodegenProperty property) {
super.postProcessModelProperty(model, 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)) { if ("null".equals(property.example)) {
property.example = null; property.example = null;
} }
@@ -938,6 +945,29 @@ public class SpringCodegen extends AbstractJavaCodegen
return codegenModel; 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<Server> 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 @Override
public Map<String, Object> postProcessModelsEnum(Map<String, Object> objs) { public Map<String, Object> postProcessModelsEnum(Map<String, Object> objs) {
objs = super.postProcessModelsEnum(objs); objs = super.postProcessModelsEnum(objs);

View File

@@ -1,2 +1,3 @@
{{#additionalEnumTypeAnnotations}}{{{.}}} {{#additionalEnumTypeAnnotations}}
{{{.}}}
{{/additionalEnumTypeAnnotations}} {{/additionalEnumTypeAnnotations}}

View File

@@ -1,2 +1,3 @@
{{#additionalModelTypeAnnotations}}{{{.}}} {{#additionalModelTypeAnnotations}}
{{{.}}}
{{/additionalModelTypeAnnotations}} {{/additionalModelTypeAnnotations}}

View File

@@ -37,9 +37,9 @@ import org.springframework.stereotype.Controller;
{{/useSpringController}} {{/useSpringController}}
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
{{#jdk8-no-delegate}} {{#jdk8-no-delegate}}
{{^reactive}} {{^reactive}}
import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.NativeWebRequest;
{{/reactive}} {{/reactive}}
{{/jdk8-no-delegate}} {{/jdk8-no-delegate}}
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
{{#reactive}} {{#reactive}}
@@ -59,13 +59,15 @@ import java.util.Map;
import java.util.Optional; import java.util.Optional;
{{/jdk8-no-delegate}} {{/jdk8-no-delegate}}
{{^jdk8-no-delegate}} {{^jdk8-no-delegate}}
{{#useOptional}} {{#useOptional}}
import java.util.Optional; import java.util.Optional;
{{/useOptional}} {{/useOptional}}
{{/jdk8-no-delegate}} {{/jdk8-no-delegate}}
{{#async}} {{#async}}
import java.util.concurrent.{{^jdk8}}Callable{{/jdk8}}{{#jdk8}}CompletableFuture{{/jdk8}}; import java.util.concurrent.{{^jdk8}}Callable{{/jdk8}}{{#jdk8}}CompletableFuture{{/jdk8}};
{{/async}} {{/async}}
import javax.annotation.Generated;
{{>generatedAnnotation}} {{>generatedAnnotation}}
{{#useBeanValidation}} {{#useBeanValidation}}
@Validated @Validated
@@ -73,7 +75,12 @@ import java.util.concurrent.{{^jdk8}}Callable{{/jdk8}}{{#jdk8}}CompletableFuture
{{#useSpringController}} {{#useSpringController}}
@Controller @Controller
{{/useSpringController}} {{/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}} {{#operations}}
{{#virtualService}} {{#virtualService}}
@VirtualService @VirtualService
@@ -121,8 +128,13 @@ public interface {{classname}} {
{{/virtualService}} {{/virtualService}}
{{#oas3}} {{#oas3}}
@Operation( @Operation(
summary = "{{{summary}}}", operationId = "{{{operationId}}}",
{{#summary}}
summary = "{{{.}}}",
{{/summary}}
{{#vendorExtensions.x-tags}}
tags = { {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }, tags = { {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} },
{{/vendorExtensions.x-tags}}
responses = { responses = {
{{#responses}} {{#responses}}
@ApiResponse(responseCode = "{{{code}}}", description = "{{{message}}}"{{#baseType}}, content = @Content(mediaType = "application/json", schema = @Schema(implementation = {{{baseType}}}.class)){{/baseType}}){{^-last}},{{/-last}} @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}}( {{#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}}, {{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}},
{{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/-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}}{{#oas3}}@Parameter(hidden = true){{/oas3}}{{#useSpringfox}}@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}}{{#useSpringfox}}@ApiIgnore {{/useSpringfox}}final Pageable pageable{{/vendorExtensions.x-spring-paginated}}
){{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}}{{#unhandledException}} throws Exception{{/unhandledException}} { ){{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}}{{#unhandledException}} throws Exception{{/unhandledException}} {
{{#delegate-method}} {{#delegate-method}}
return {{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, pageable{{/vendorExtensions.x-spring-paginated}}); return {{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, pageable{{/vendorExtensions.x-spring-paginated}});
} }
// Override this method // 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<Part>{{/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<Part>{{/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}} {{/delegate-method}}
{{^isDelegate}} {{^isDelegate}}
{{>methodBody}} {{>methodBody}}

View File

@@ -31,35 +31,35 @@ import org.springframework.web.bind.annotation.CookieValue;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RequestPart;
{{/jdk8}} {{/jdk8}}
import org.springframework.beans.factory.annotation.Autowired;
{{^isDelegate}} {{^isDelegate}}
import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.NativeWebRequest;
{{/isDelegate}} {{/isDelegate}}
{{^jdk8}} {{^jdk8}}
import org.springframework.web.multipart.MultipartFile; 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.constraints.*;
import javax.validation.Valid; import javax.validation.Valid;
{{/useBeanValidation}} {{/useBeanValidation}}
{{/jdk8}} {{/jdk8}}
{{#jdk8}} {{#jdk8}}
import java.util.Optional; import java.util.Optional;
{{/jdk8}} {{/jdk8}}
{{^jdk8}} {{^jdk8}}
{{#useOptional}} {{#useOptional}}
import java.util.Optional; import java.util.Optional;
{{/useOptional}} {{/useOptional}}
{{/jdk8}} {{/jdk8}}
{{^jdk8}} {{^jdk8}}
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
{{#async}} {{#async}}
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
{{/async}} {{/async}}
{{/jdk8}} {{/jdk8}}
import javax.annotation.Generated;
{{>generatedAnnotation}} {{>generatedAnnotation}}
@Controller @Controller
{{=<% %>=}} {{=<% %>=}}
@@ -71,7 +71,7 @@ public class {{classname}}Controller implements {{classname}} {
private final {{classname}}Delegate delegate; 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}} {{#jdk8}}
this.delegate = Optional.ofNullable(delegate).orElse(new {{classname}}Delegate() {}); this.delegate = Optional.ofNullable(delegate).orElse(new {{classname}}Delegate() {});
} }
@@ -93,7 +93,7 @@ public class {{classname}}Controller implements {{classname}} {
{{/jdk8}} {{/jdk8}}
private final NativeWebRequest request; private final NativeWebRequest request;
@org.springframework.beans.factory.annotation.Autowired @Autowired
public {{classname}}Controller(NativeWebRequest request) { public {{classname}}Controller(NativeWebRequest request) {
this.request = request; this.request = request;
} }
@@ -132,7 +132,7 @@ public class {{classname}}Controller implements {{classname}} {
public {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}( public {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}(
{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}}, {{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}},
{{/-last}}{{/allParams}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}}, {{/-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}} {{^isDelegate}}
{{^async}} {{^async}}

View File

@@ -2,9 +2,6 @@ package {{package}};
{{#imports}}import {{import}}; {{#imports}}import {{import}};
{{/imports}} {{/imports}}
{{#vendorExtensions.x-spring-paginated}}
import org.springframework.data.domain.Pageable;
{{/vendorExtensions.x-spring-paginated}}
{{#jdk8}} {{#jdk8}}
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
@@ -34,6 +31,7 @@ import java.util.Optional;
{{#async}} {{#async}}
import java.util.concurrent.{{^jdk8}}Callable{{/jdk8}}{{#jdk8}}CompletableFuture{{/jdk8}}; import java.util.concurrent.{{^jdk8}}Callable{{/jdk8}}{{#jdk8}}CompletableFuture{{/jdk8}};
{{/async}} {{/async}}
import javax.annotation.Generated;
{{#operations}} {{#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<Part>{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}}{{/isFile}} {{paramName}}{{^-last}}, {{#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<Part>{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}}{{/isFile}} {{paramName}}{{^-last}},
{{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/-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}} {{>methodBody}}
}{{/jdk8-default-interface}} }{{/jdk8-default-interface}}

View File

@@ -1,5 +1,7 @@
package {{apiPackage}}; package {{apiPackage}};
import javax.annotation.Generated;
/** /**
* The exception that can be used to store the HTTP status code returned by an API response. * The exception that can be used to store the HTTP status code returned by an API response.
*/ */

View File

@@ -2,6 +2,7 @@ package {{apiPackage}};
import java.io.IOException; import java.io.IOException;
import javax.annotation.Generated;
import javax.servlet.*; import javax.servlet.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;

View File

@@ -1,5 +1,6 @@
package {{apiPackage}}; package {{apiPackage}};
import javax.annotation.Generated;
import javax.xml.bind.annotation.XmlTransient; import javax.xml.bind.annotation.XmlTransient;
{{>generatedAnnotation}} {{>generatedAnnotation}}

View File

@@ -1,6 +1 @@
{{#required}} {{#required}}@NotNull {{/required}}{{#isContainer}}{{^isPrimitiveType}}{{^isEnum}}@Valid {{/isEnum}}{{/isPrimitiveType}}{{/isContainer}}{{^isContainer}}{{^isPrimitiveType}}@Valid {{/isPrimitiveType}}{{/isContainer}}{{>beanValidationCore}}
@NotNull
{{/required}}{{#isContainer}}{{^isPrimitiveType}}{{^isEnum}}
@Valid{{/isEnum}}{{/isPrimitiveType}}{{/isContainer}}{{^isContainer}}{{^isPrimitiveType}}
@Valid{{/isPrimitiveType}}{{/isContainer}}
{{>beanValidationCore}}

View File

@@ -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}} {{#isDate}} @DateTimeFormat(iso = DateTimeFormat.ISO.DATE){{/isDate}}{{#isDateTime}} @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME){{/isDateTime}}

View File

@@ -6,7 +6,9 @@ import com.fasterxml.jackson.annotation.JsonValue;
/** /**
* {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}} * {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}}
*/ */
{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{>additionalEnumTypeAnnotations}}
{{>generatedAnnotation}}
public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} {
{{#gson}} {{#gson}}
{{#allowableValues}}{{#enumVars}} {{#allowableValues}}{{#enumVars}}
@SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) @SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}})

View File

@@ -1 +1 @@
@javax.annotation.Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}}) @Generated(value = "{{generatorClass}}"{{^hideGenerationTimestamp}}, date = "{{generatedDate}}"{{/hideGenerationTimestamp}})

View File

@@ -32,6 +32,7 @@ import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.data.web.PageableHandlerMethodArgumentResolver; import org.springframework.data.web.PageableHandlerMethodArgumentResolver;
import java.util.List; import java.util.List;
import javax.annotation.Generated;
{{>generatedAnnotation}} {{>generatedAnnotation}}
@Configuration @Configuration

View File

@@ -1,6 +1,7 @@
package {{configPackage}}; package {{configPackage}};
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
import javax.annotation.Generated;
{{>generatedAnnotation}} {{>generatedAnnotation}}
public class WebApplication extends AbstractAnnotationConfigDispatcherServletInitializer { public class WebApplication extends AbstractAnnotationConfigDispatcherServletInitializer {

View File

@@ -2,6 +2,7 @@ package {{configPackage}};
import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import javax.annotation.Generated;
{{>generatedAnnotation}} {{>generatedAnnotation}}
public class WebMvcConfiguration extends WebMvcConfigurationSupport { public class WebMvcConfiguration extends WebMvcConfigurationSupport {

View File

@@ -40,6 +40,7 @@ import org.springframework.hateoas.RepresentationModel;
{{/parent}} {{/parent}}
import java.util.*; import java.util.*;
import javax.annotation.Generated;
{{#models}} {{#models}}
{{#model}} {{#model}}

View File

@@ -1,5 +1,7 @@
package {{apiPackage}}; package {{apiPackage}};
import javax.annotation.Generated;
{{>generatedAnnotation}} {{>generatedAnnotation}}
public class NotFoundException extends ApiException { public class NotFoundException extends ApiException {
private int code; private int code;
@@ -7,4 +9,4 @@ public class NotFoundException extends ApiException {
super(code, msg); super(code, msg);
this.code = code; this.code = code;
} }
} }

View File

@@ -18,6 +18,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
{{#useOptional}} {{#useOptional}}
import java.util.Optional; import java.util.Optional;
{{/useOptional}} {{/useOptional}}
import javax.annotation.Generated;
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
{{>generatedAnnotation}} {{>generatedAnnotation}}

View File

@@ -1,14 +1,24 @@
/** /**
* {{description}}{{^description}}{{classname}}{{/description}} * {{description}}{{^description}}{{classname}}{{/description}}
*/{{#description}} */
{{#oas3}}@Schema({{#name}}name = "{{name}}",{{/name}}{{/oas3}}{{^oas3}}@ApiModel({{/oas3}}description = "{{{.}}}"){{/description}} {{>additionalModelTypeAnnotations}}
{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}}{{>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}} { public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#hateoas}}extends RepresentationModel<{{classname}}> {{/hateoas}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
{{#serializableModel}} {{#serializableModel}}
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
{{/serializableModel}} {{/serializableModel}}
{{#vars}} {{#vars}}
{{#isEnum}} {{#isEnum}}
{{^isContainer}} {{^isContainer}}
{{>enumClass}} {{>enumClass}}
@@ -20,8 +30,10 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#ha
{{/isContainer}} {{/isContainer}}
{{/isEnum}} {{/isEnum}}
{{#jackson}} {{#jackson}}
@JsonProperty("{{baseName}}"){{#withXml}} @JsonProperty("{{baseName}}")
@JacksonXmlProperty({{#isXmlAttribute}}isAttribute = true, {{/isXmlAttribute}}{{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"){{/withXml}} {{#withXml}}
@JacksonXmlProperty({{#isXmlAttribute}}isAttribute = true, {{/isXmlAttribute}}{{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}")
{{/withXml}}
{{/jackson}} {{/jackson}}
{{#gson}} {{#gson}}
@SerializedName("{{baseName}}") @SerializedName("{{baseName}}")
@@ -37,10 +49,10 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#ha
{{/isContainer}} {{/isContainer}}
{{^isContainer}} {{^isContainer}}
{{#isDate}} {{#isDate}}
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
{{/isDate}} {{/isDate}}
{{#isDateTime}} {{#isDateTime}}
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
{{/isDateTime}} {{/isDateTime}}
{{#openApiNullable}} {{#openApiNullable}}
private {{>nullableDataType}} {{name}}{{#isNullable}} = JsonNullable.undefined(){{/isNullable}}{{^isNullable}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/isNullable}}; 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}}; private {{>nullableDataType}} {{name}}{{#isNullable}} = null{{/isNullable}}{{^isNullable}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/isNullable}};
{{/openApiNullable}} {{/openApiNullable}}
{{/isContainer}} {{/isContainer}}
{{/vars}} {{/vars}}
{{#vars}} {{#vars}}
{{! begin feature: fluent setter methods }}
public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) {
{{#openApiNullable}} {{#openApiNullable}}
this.{{name}} = {{#isNullable}}JsonNullable.of({{name}}){{/isNullable}}{{^isNullable}}{{name}}{{/isNullable}}; this.{{name}} = {{#isNullable}}JsonNullable.of({{name}}){{/isNullable}}{{^isNullable}}{{name}}{{/isNullable}};
@@ -93,6 +106,8 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#ha
return this; return this;
} }
{{/isMap}} {{/isMap}}
{{! end feature: fluent setter methods }}
{{! begin feature: getter and setter }}
/** /**
{{#description}} {{#description}}
@@ -109,19 +124,29 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#ha
{{/maximum}} {{/maximum}}
* @return {{name}} * @return {{name}}
*/ */
{{#vendorExtensions.x-extra-annotation}} {{#vendorExtensions.x-extra-annotation}}
{{{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}}
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{>nullableDataType}} {{getter}}() { {{>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}}; return {{name}};
} }
{{#vendorExtensions.x-setter-extra-annotation}}{{{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}}
public void {{setter}}({{>nullableDataType}} {{name}}) {
this.{{name}} = {{name}}; this.{{name}} = {{name}};
} }
{{! end feature: getter and setter }}
{{/vars}} {{/vars}}
@Override @Override
@@ -159,7 +184,9 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#ha
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class {{classname}} {\n"); 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(" {{name}}: ").append(toIndentedString({{name}})).append("\n");
{{/vars}}sb.append("}"); {{/vars}}sb.append("}");
return sb.toString(); return sb.toString();

View File

@@ -1,8 +1,7 @@
{{#jackson}} {{#jackson}}
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true)
@JsonSubTypes({ @JsonSubTypes({
{{#discriminator.mappedModels}} {{#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}}"), @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}} {{/discriminator.mappedModels}}
}){{/jackson}} }){{/jackson}}

View File

@@ -3,4 +3,5 @@
@JacksonXmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") @JacksonXmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}")
{{/jackson}} {{/jackson}}
@XmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") @XmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}")
@XmlAccessorType(XmlAccessType.FIELD){{/withXml}} @XmlAccessorType(XmlAccessType.FIELD)
{{/withXml}}

View File

@@ -81,14 +81,17 @@ public class SpringCodegenTest {
generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false"); generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false");
generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "true"); generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "true");
generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "false"); generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "false");
generator.opts(input).generate(); generator.opts(input).generate();
assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/api/ZebrasApi.java"), 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"), 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)", "@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)", "@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)");
"@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME)");
assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/AnimalParams.java"),
"import org.springframework.format.annotation.DateTimeFormat;"
);
} }
@Test @Test
@@ -207,7 +210,6 @@ public class SpringCodegenTest {
input.config(codegen); input.config(codegen);
DefaultGenerator generator = new DefaultGenerator(); DefaultGenerator generator = new DefaultGenerator();
generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "false"); generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "false");
generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_TESTS, "false"); generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_TESTS, "false");
generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false"); generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false");
@@ -217,11 +219,19 @@ public class SpringCodegenTest {
assertFileContains( assertFileContains(
Paths.get(outputPath + "/src/main/java/org/openapitools/api/ElephantsApi.java"), 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( assertFileContains(
Paths.get(outputPath + "/src/main/java/org/openapitools/api/ZebrasApi.java"), 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)" "import org.springframework.format.annotation.DateTimeFormat;"
);
assertFileContains(
Paths.get(outputPath + "/src/main/java/org/openapitools/api/ZebrasApi.java"),
"@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)"
); );
} }
@@ -774,4 +784,22 @@ public class SpringCodegenTest {
fail("OpenAPIDocumentationConfig.java not generated"); 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");
}
} }

View File

@@ -1179,6 +1179,7 @@
<module>samples/server/petstore/spring-mvc-j8-async</module> <module>samples/server/petstore/spring-mvc-j8-async</module>
<module>samples/server/petstore/spring-mvc-j8-localdatetime</module> <module>samples/server/petstore/spring-mvc-j8-localdatetime</module>
<!-- servers --> <!-- servers -->
<module>samples/server/petstore/java-camel</module>
<module>samples/server/petstore/jaxrs-jersey</module> <module>samples/server/petstore/jaxrs-jersey</module>
<module>samples/server/petstore/jaxrs-spec</module> <module>samples/server/petstore/jaxrs-spec</module>
<module>samples/server/petstore/jaxrs-spec-interface</module> <module>samples/server/petstore/jaxrs-spec-interface</module>
@@ -1246,12 +1247,14 @@
</property> </property>
</activation> </activation>
<modules> <modules>
<!-- clients -->
<module>samples/client/petstore/spring-cloud</module> <module>samples/client/petstore/spring-cloud</module>
<module>samples/openapi3/client/petstore/spring-cloud</module> <module>samples/openapi3/client/petstore/spring-cloud</module>
<module>samples/client/petstore/spring-cloud-date-time</module> <module>samples/client/petstore/spring-cloud-date-time</module>
<module>samples/openapi3/client/petstore/spring-cloud-date-time</module> <module>samples/openapi3/client/petstore/spring-cloud-date-time</module>
<module>samples/client/petstore/spring-stubs</module>
<module>samples/openapi3/client/petstore/spring-stubs</module>
<!-- servers --> <!-- servers -->
<module>samples/server/petstore/java-camel</module>
<module>samples/server/petstore/spring-mvc</module> <module>samples/server/petstore/spring-mvc</module>
<module>samples/server/petstore/spring-mvc-default-value</module> <module>samples/server/petstore/spring-mvc-default-value</module>
<module>samples/server/petstore/spring-mvc-j8-async</module> <module>samples/server/petstore/spring-mvc-j8-async</module>

View File

@@ -7,6 +7,7 @@ package org.openapitools.api;
import org.openapitools.model.ModelApiResponse; import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.Pet; import org.openapitools.model.Pet;
import org.springframework.core.io.Resource;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
@@ -22,7 +23,9 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; import java.util.Optional;
import java.util.concurrent.CompletableFuture; 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 @Validated
@Api(value = "Pet", description = "the Pet API") @Api(value = "Pet", description = "the Pet API")
public interface PetApi { public interface PetApi {

View File

@@ -22,7 +22,9 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; import java.util.Optional;
import java.util.concurrent.CompletableFuture; 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 @Validated
@Api(value = "Store", description = "the Store API") @Api(value = "Store", description = "the Store API")
public interface StoreApi { public interface StoreApi {

View File

@@ -23,7 +23,9 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; import java.util.Optional;
import java.util.concurrent.CompletableFuture; 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 @Validated
@Api(value = "User", description = "the User API") @Api(value = "User", description = "the User API")
public interface UserApi { public interface UserApi {

View File

@@ -13,13 +13,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* A category for a pet * A category for a pet
*/ */
@ApiModel(description = "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 { public class Category {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -35,9 +38,8 @@ public class Category {
* Get id * Get id
* @return id * @return id
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -55,9 +57,8 @@ public class Category {
* Get name * Get name
* @return name * @return name
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getName() { public String getName() {
return name; return name;
} }
@@ -66,7 +67,6 @@ public class Category {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -89,7 +89,6 @@ public class Category {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Category {\n"); sb.append("class Category {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}"); sb.append("}");

View File

@@ -13,13 +13,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* Describes the result of uploading an image resource * Describes the result of uploading an image resource
*/ */
@ApiModel(description = "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 { public class ModelApiResponse {
@JsonProperty("code") @JsonProperty("code")
private Integer code; private Integer code;
@@ -38,9 +41,8 @@ public class ModelApiResponse {
* Get code * Get code
* @return code * @return code
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Integer getCode() { public Integer getCode() {
return code; return code;
} }
@@ -58,9 +60,8 @@ public class ModelApiResponse {
* Get type * Get type
* @return type * @return type
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getType() { public String getType() {
return type; return type;
} }
@@ -78,9 +79,8 @@ public class ModelApiResponse {
* Get message * Get message
* @return message * @return message
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getMessage() { public String getMessage() {
return message; return message;
} }
@@ -89,7 +89,6 @@ public class ModelApiResponse {
this.message = message; this.message = message;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -113,7 +112,6 @@ public class ModelApiResponse {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class ModelApiResponse {\n"); sb.append("class ModelApiResponse {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n");

View File

@@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import org.openapitools.jackson.nullable.JsonNullable; import org.openapitools.jackson.nullable.JsonNullable;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
import javax.validation.Valid; import javax.validation.Valid;
@@ -15,13 +16,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* An order for a pets from the pet store * An order for a pets from the pet store
*/ */
@ApiModel(description = "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 { public class Order {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -32,7 +36,7 @@ public class Order {
private Integer quantity; private Integer quantity;
@JsonProperty("shipDate") @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; private OffsetDateTime shipDate;
/** /**
@@ -87,9 +91,8 @@ public class Order {
* Get id * Get id
* @return id * @return id
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -107,9 +110,8 @@ public class Order {
* Get petId * Get petId
* @return petId * @return petId
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getPetId() { public Long getPetId() {
return petId; return petId;
} }
@@ -127,9 +129,8 @@ public class Order {
* Get quantity * Get quantity
* @return quantity * @return quantity
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Integer getQuantity() { public Integer getQuantity() {
return quantity; return quantity;
} }
@@ -147,10 +148,8 @@ public class Order {
* Get shipDate * Get shipDate
* @return shipDate * @return shipDate
*/ */
@Valid
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@Valid
public OffsetDateTime getShipDate() { public OffsetDateTime getShipDate() {
return shipDate; return shipDate;
} }
@@ -168,9 +167,8 @@ public class Order {
* Order Status * Order Status
* @return status * @return status
*/ */
@ApiModelProperty(value = "Order Status") @ApiModelProperty(value = "Order Status")
public StatusEnum getStatus() { public StatusEnum getStatus() {
return status; return status;
} }
@@ -188,9 +186,8 @@ public class Order {
* Get complete * Get complete
* @return complete * @return complete
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Boolean getComplete() { public Boolean getComplete() {
return complete; return complete;
} }
@@ -199,7 +196,6 @@ public class Order {
this.complete = complete; this.complete = complete;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -226,7 +222,6 @@ public class Order {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Order {\n"); sb.append("class Order {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n");
sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");

View File

@@ -18,13 +18,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* A pet for sale in the pet store * A pet for sale in the pet store
*/ */
@ApiModel(description = "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 { public class Pet {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -91,9 +94,8 @@ public class Pet {
* Get id * Get id
* @return id * @return id
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -111,10 +113,8 @@ public class Pet {
* Get category * Get category
* @return category * @return category
*/ */
@Valid
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@Valid
public Category getCategory() { public Category getCategory() {
return category; return category;
} }
@@ -132,10 +132,8 @@ public class Pet {
* Get name * Get name
* @return name * @return name
*/ */
@NotNull
@ApiModelProperty(example = "doggie", required = true, value = "") @ApiModelProperty(example = "doggie", required = true, value = "")
@NotNull
public String getName() { public String getName() {
return name; return name;
} }
@@ -158,10 +156,8 @@ public class Pet {
* Get photoUrls * Get photoUrls
* @return photoUrls * @return photoUrls
*/ */
@NotNull
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@NotNull
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
return photoUrls; return photoUrls;
} }
@@ -187,10 +183,8 @@ public class Pet {
* Get tags * Get tags
* @return tags * @return tags
*/ */
@Valid
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@Valid
public List<Tag> getTags() { public List<Tag> getTags() {
return tags; return tags;
} }
@@ -208,9 +202,8 @@ public class Pet {
* pet status in the store * pet status in the store
* @return status * @return status
*/ */
@ApiModelProperty(value = "pet status in the store") @ApiModelProperty(value = "pet status in the store")
public StatusEnum getStatus() { public StatusEnum getStatus() {
return status; return status;
} }
@@ -219,7 +212,6 @@ public class Pet {
this.status = status; this.status = status;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -246,7 +238,6 @@ public class Pet {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Pet {\n"); sb.append("class Pet {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n");

View File

@@ -13,13 +13,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* A tag for a pet * A tag for a pet
*/ */
@ApiModel(description = "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 { public class Tag {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -35,9 +38,8 @@ public class Tag {
* Get id * Get id
* @return id * @return id
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -55,9 +57,8 @@ public class Tag {
* Get name * Get name
* @return name * @return name
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getName() { public String getName() {
return name; return name;
} }
@@ -66,7 +67,6 @@ public class Tag {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -89,7 +89,6 @@ public class Tag {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Tag {\n"); sb.append("class Tag {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}"); sb.append("}");

View File

@@ -13,13 +13,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* A User who is purchasing from the pet store * A User who is purchasing from the pet store
*/ */
@ApiModel(description = "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 { public class User {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -53,9 +56,8 @@ public class User {
* Get id * Get id
* @return id * @return id
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -73,9 +75,8 @@ public class User {
* Get username * Get username
* @return username * @return username
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getUsername() { public String getUsername() {
return username; return username;
} }
@@ -93,9 +94,8 @@ public class User {
* Get firstName * Get firstName
* @return firstName * @return firstName
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getFirstName() { public String getFirstName() {
return firstName; return firstName;
} }
@@ -113,9 +113,8 @@ public class User {
* Get lastName * Get lastName
* @return lastName * @return lastName
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getLastName() { public String getLastName() {
return lastName; return lastName;
} }
@@ -133,9 +132,8 @@ public class User {
* Get email * Get email
* @return email * @return email
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getEmail() { public String getEmail() {
return email; return email;
} }
@@ -153,9 +151,8 @@ public class User {
* Get password * Get password
* @return password * @return password
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getPassword() { public String getPassword() {
return password; return password;
} }
@@ -173,9 +170,8 @@ public class User {
* Get phone * Get phone
* @return phone * @return phone
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getPhone() { public String getPhone() {
return phone; return phone;
} }
@@ -193,9 +189,8 @@ public class User {
* User Status * User Status
* @return userStatus * @return userStatus
*/ */
@ApiModelProperty(value = "User Status") @ApiModelProperty(value = "User Status")
public Integer getUserStatus() { public Integer getUserStatus() {
return userStatus; return userStatus;
} }
@@ -204,7 +199,6 @@ public class User {
this.userStatus = userStatus; this.userStatus = userStatus;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -233,7 +227,6 @@ public class User {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class User {\n"); sb.append("class User {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n");
sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n");

View File

@@ -5,6 +5,7 @@
*/ */
package org.openapitools.api; package org.openapitools.api;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
import io.swagger.annotations.*; import io.swagger.annotations.*;
@@ -21,7 +22,9 @@ import javax.validation.constraints.*;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; 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 @Validated
@Api(value = "Default", description = "the Default API") @Api(value = "Default", description = "the Default API")
public interface DefaultApi { public interface DefaultApi {
@@ -49,10 +52,10 @@ public interface DefaultApi {
value = "/thingy/{date}" value = "/thingy/{date}"
) )
ResponseEntity<Void> get( ResponseEntity<Void> 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, @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) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @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) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate xOrderDate, @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") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate loginDate @ApiParam(value = "A date cookie parameter") @CookieValue("loginDate") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate loginDate
); );
@@ -79,8 +82,8 @@ public interface DefaultApi {
consumes = "application/x-www-form-urlencoded" consumes = "application/x-www-form-urlencoded"
) )
ResponseEntity<Void> updatePetWithForm( ResponseEntity<Void> 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 = "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) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate @ApiParam(value = "Updated last vist timestamp") @RequestParam(value="visitDate", required=false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate
); );
} }

View File

@@ -5,8 +5,11 @@
*/ */
package org.openapitools.api; package org.openapitools.api;
import springfox.documentation.annotations.ApiIgnore;
import org.openapitools.model.ModelApiResponse; import org.openapitools.model.ModelApiResponse;
import org.springframework.data.domain.Pageable;
import org.openapitools.model.Pet; import org.openapitools.model.Pet;
import org.springframework.core.io.Resource;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
@@ -21,7 +24,9 @@ import javax.validation.constraints.*;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; 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 @Validated
@Api(value = "Pet", description = "the Pet API") @Api(value = "Pet", description = "the Pet API")
public interface PetApi { public interface PetApi {
@@ -122,7 +127,7 @@ public interface PetApi {
) )
ResponseEntity<List<Pet>> findPetsByStatus( ResponseEntity<List<Pet>> 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<String> status, @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<String> status,
@springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable @ApiIgnore final Pageable pageable
); );
@@ -160,7 +165,7 @@ public interface PetApi {
) )
ResponseEntity<List<Pet>> findPetsByTags( ResponseEntity<List<Pet>> findPetsByTags(
@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags, @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags,
@springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable @ApiIgnore final Pageable pageable
); );

View File

@@ -21,7 +21,9 @@ import javax.validation.constraints.*;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; 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 @Validated
@Api(value = "Store", description = "the Store API") @Api(value = "Store", description = "the Store API")
public interface StoreApi { public interface StoreApi {

View File

@@ -22,7 +22,9 @@ import javax.validation.constraints.*;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; 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 @Validated
@Api(value = "User", description = "the User API") @Api(value = "User", description = "the User API")
public interface UserApi { public interface UserApi {

View File

@@ -13,13 +13,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* A category for a pet * A category for a pet
*/ */
@ApiModel(description = "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 { public class Category {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -35,9 +38,8 @@ public class Category {
* Get id * Get id
* @return id * @return id
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -55,9 +57,8 @@ public class Category {
* Get name * Get name
* @return name * @return name
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getName() { public String getName() {
return name; return name;
} }
@@ -66,7 +67,6 @@ public class Category {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -89,7 +89,6 @@ public class Category {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Category {\n"); sb.append("class Category {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}"); sb.append("}");

View File

@@ -13,13 +13,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* Describes the result of uploading an image resource * Describes the result of uploading an image resource
*/ */
@ApiModel(description = "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 { public class ModelApiResponse {
@JsonProperty("code") @JsonProperty("code")
private Integer code; private Integer code;
@@ -38,9 +41,8 @@ public class ModelApiResponse {
* Get code * Get code
* @return code * @return code
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Integer getCode() { public Integer getCode() {
return code; return code;
} }
@@ -58,9 +60,8 @@ public class ModelApiResponse {
* Get type * Get type
* @return type * @return type
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getType() { public String getType() {
return type; return type;
} }
@@ -78,9 +79,8 @@ public class ModelApiResponse {
* Get message * Get message
* @return message * @return message
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getMessage() { public String getMessage() {
return message; return message;
} }
@@ -89,7 +89,6 @@ public class ModelApiResponse {
this.message = message; this.message = message;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -113,7 +112,6 @@ public class ModelApiResponse {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class ModelApiResponse {\n"); sb.append("class ModelApiResponse {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n");

View File

@@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import org.openapitools.jackson.nullable.JsonNullable; import org.openapitools.jackson.nullable.JsonNullable;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
import javax.validation.Valid; import javax.validation.Valid;
@@ -15,13 +16,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* An order for a pets from the pet store * An order for a pets from the pet store
*/ */
@ApiModel(description = "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 { public class Order {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -32,7 +36,7 @@ public class Order {
private Integer quantity; private Integer quantity;
@JsonProperty("shipDate") @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; private OffsetDateTime shipDate;
/** /**
@@ -87,9 +91,8 @@ public class Order {
* Get id * Get id
* @return id * @return id
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -107,9 +110,8 @@ public class Order {
* Get petId * Get petId
* @return petId * @return petId
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getPetId() { public Long getPetId() {
return petId; return petId;
} }
@@ -127,9 +129,8 @@ public class Order {
* Get quantity * Get quantity
* @return quantity * @return quantity
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Integer getQuantity() { public Integer getQuantity() {
return quantity; return quantity;
} }
@@ -147,10 +148,8 @@ public class Order {
* Get shipDate * Get shipDate
* @return shipDate * @return shipDate
*/ */
@Valid
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@Valid
public OffsetDateTime getShipDate() { public OffsetDateTime getShipDate() {
return shipDate; return shipDate;
} }
@@ -168,9 +167,8 @@ public class Order {
* Order Status * Order Status
* @return status * @return status
*/ */
@ApiModelProperty(value = "Order Status") @ApiModelProperty(value = "Order Status")
public StatusEnum getStatus() { public StatusEnum getStatus() {
return status; return status;
} }
@@ -188,9 +186,8 @@ public class Order {
* Get complete * Get complete
* @return complete * @return complete
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Boolean getComplete() { public Boolean getComplete() {
return complete; return complete;
} }
@@ -199,7 +196,6 @@ public class Order {
this.complete = complete; this.complete = complete;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -226,7 +222,6 @@ public class Order {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Order {\n"); sb.append("class Order {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n");
sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");

View File

@@ -18,13 +18,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* A pet for sale in the pet store * A pet for sale in the pet store
*/ */
@ApiModel(description = "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 { public class Pet {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -91,9 +94,8 @@ public class Pet {
* Get id * Get id
* @return id * @return id
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -111,10 +113,8 @@ public class Pet {
* Get category * Get category
* @return category * @return category
*/ */
@Valid
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@Valid
public Category getCategory() { public Category getCategory() {
return category; return category;
} }
@@ -132,10 +132,8 @@ public class Pet {
* Get name * Get name
* @return name * @return name
*/ */
@NotNull
@ApiModelProperty(example = "doggie", required = true, value = "") @ApiModelProperty(example = "doggie", required = true, value = "")
@NotNull
public String getName() { public String getName() {
return name; return name;
} }
@@ -158,10 +156,8 @@ public class Pet {
* Get photoUrls * Get photoUrls
* @return photoUrls * @return photoUrls
*/ */
@NotNull
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@NotNull
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
return photoUrls; return photoUrls;
} }
@@ -187,10 +183,8 @@ public class Pet {
* Get tags * Get tags
* @return tags * @return tags
*/ */
@Valid
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@Valid
public List<Tag> getTags() { public List<Tag> getTags() {
return tags; return tags;
} }
@@ -208,9 +202,8 @@ public class Pet {
* pet status in the store * pet status in the store
* @return status * @return status
*/ */
@ApiModelProperty(value = "pet status in the store") @ApiModelProperty(value = "pet status in the store")
public StatusEnum getStatus() { public StatusEnum getStatus() {
return status; return status;
} }
@@ -219,7 +212,6 @@ public class Pet {
this.status = status; this.status = status;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -246,7 +238,6 @@ public class Pet {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Pet {\n"); sb.append("class Pet {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n");

View File

@@ -13,13 +13,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* A tag for a pet * A tag for a pet
*/ */
@ApiModel(description = "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 { public class Tag {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -35,9 +38,8 @@ public class Tag {
* Get id * Get id
* @return id * @return id
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -55,9 +57,8 @@ public class Tag {
* Get name * Get name
* @return name * @return name
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getName() { public String getName() {
return name; return name;
} }
@@ -66,7 +67,6 @@ public class Tag {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -89,7 +89,6 @@ public class Tag {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Tag {\n"); sb.append("class Tag {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}"); sb.append("}");

View File

@@ -13,13 +13,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* A User who is purchasing from the pet store * A User who is purchasing from the pet store
*/ */
@ApiModel(description = "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 { public class User {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -53,9 +56,8 @@ public class User {
* Get id * Get id
* @return id * @return id
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -73,9 +75,8 @@ public class User {
* Get username * Get username
* @return username * @return username
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getUsername() { public String getUsername() {
return username; return username;
} }
@@ -93,9 +94,8 @@ public class User {
* Get firstName * Get firstName
* @return firstName * @return firstName
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getFirstName() { public String getFirstName() {
return firstName; return firstName;
} }
@@ -113,9 +113,8 @@ public class User {
* Get lastName * Get lastName
* @return lastName * @return lastName
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getLastName() { public String getLastName() {
return lastName; return lastName;
} }
@@ -133,9 +132,8 @@ public class User {
* Get email * Get email
* @return email * @return email
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getEmail() { public String getEmail() {
return email; return email;
} }
@@ -153,9 +151,8 @@ public class User {
* Get password * Get password
* @return password * @return password
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getPassword() { public String getPassword() {
return password; return password;
} }
@@ -173,9 +170,8 @@ public class User {
* Get phone * Get phone
* @return phone * @return phone
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getPhone() { public String getPhone() {
return phone; return phone;
} }
@@ -193,9 +189,8 @@ public class User {
* User Status * User Status
* @return userStatus * @return userStatus
*/ */
@ApiModelProperty(value = "User Status") @ApiModelProperty(value = "User Status")
public Integer getUserStatus() { public Integer getUserStatus() {
return userStatus; return userStatus;
} }
@@ -204,7 +199,6 @@ public class User {
this.userStatus = userStatus; this.userStatus = userStatus;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -233,7 +227,6 @@ public class User {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class User {\n"); sb.append("class User {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n");
sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n");

View File

@@ -7,6 +7,7 @@ package org.openapitools.api;
import org.openapitools.model.ModelApiResponse; import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.Pet; import org.openapitools.model.Pet;
import org.springframework.core.io.Resource;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
@@ -21,7 +22,9 @@ import javax.validation.constraints.*;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; 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 @Validated
@Api(value = "Pet", description = "the Pet API") @Api(value = "Pet", description = "the Pet API")
public interface PetApi { public interface PetApi {

View File

@@ -21,7 +21,9 @@ import javax.validation.constraints.*;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; 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 @Validated
@Api(value = "Store", description = "the Store API") @Api(value = "Store", description = "the Store API")
public interface StoreApi { public interface StoreApi {

View File

@@ -22,7 +22,9 @@ import javax.validation.constraints.*;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; 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 @Validated
@Api(value = "User", description = "the User API") @Api(value = "User", description = "the User API")
public interface UserApi { public interface UserApi {

View File

@@ -13,13 +13,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* A category for a pet * A category for a pet
*/ */
@ApiModel(description = "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 { public class Category {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -35,9 +38,8 @@ public class Category {
* Get id * Get id
* @return id * @return id
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -55,9 +57,8 @@ public class Category {
* Get name * Get name
* @return name * @return name
*/ */
@Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")
public String getName() { public String getName() {
return name; return name;
} }
@@ -66,7 +67,6 @@ public class Category {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -89,7 +89,6 @@ public class Category {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Category {\n"); sb.append("class Category {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}"); sb.append("}");

View File

@@ -13,13 +13,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* Describes the result of uploading an image resource * Describes the result of uploading an image resource
*/ */
@ApiModel(description = "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 { public class ModelApiResponse {
@JsonProperty("code") @JsonProperty("code")
private Integer code; private Integer code;
@@ -38,9 +41,8 @@ public class ModelApiResponse {
* Get code * Get code
* @return code * @return code
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Integer getCode() { public Integer getCode() {
return code; return code;
} }
@@ -58,9 +60,8 @@ public class ModelApiResponse {
* Get type * Get type
* @return type * @return type
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getType() { public String getType() {
return type; return type;
} }
@@ -78,9 +79,8 @@ public class ModelApiResponse {
* Get message * Get message
* @return message * @return message
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getMessage() { public String getMessage() {
return message; return message;
} }
@@ -89,7 +89,6 @@ public class ModelApiResponse {
this.message = message; this.message = message;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -113,7 +112,6 @@ public class ModelApiResponse {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class ModelApiResponse {\n"); sb.append("class ModelApiResponse {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n");

View File

@@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import org.openapitools.jackson.nullable.JsonNullable; import org.openapitools.jackson.nullable.JsonNullable;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
import javax.validation.Valid; import javax.validation.Valid;
@@ -15,13 +16,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* An order for a pets from the pet store * An order for a pets from the pet store
*/ */
@ApiModel(description = "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 { public class Order {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -32,7 +36,7 @@ public class Order {
private Integer quantity; private Integer quantity;
@JsonProperty("shipDate") @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; private OffsetDateTime shipDate;
/** /**
@@ -87,9 +91,8 @@ public class Order {
* Get id * Get id
* @return id * @return id
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -107,9 +110,8 @@ public class Order {
* Get petId * Get petId
* @return petId * @return petId
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getPetId() { public Long getPetId() {
return petId; return petId;
} }
@@ -127,9 +129,8 @@ public class Order {
* Get quantity * Get quantity
* @return quantity * @return quantity
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Integer getQuantity() { public Integer getQuantity() {
return quantity; return quantity;
} }
@@ -147,10 +148,8 @@ public class Order {
* Get shipDate * Get shipDate
* @return shipDate * @return shipDate
*/ */
@Valid
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@Valid
public OffsetDateTime getShipDate() { public OffsetDateTime getShipDate() {
return shipDate; return shipDate;
} }
@@ -168,9 +167,8 @@ public class Order {
* Order Status * Order Status
* @return status * @return status
*/ */
@ApiModelProperty(value = "Order Status") @ApiModelProperty(value = "Order Status")
public StatusEnum getStatus() { public StatusEnum getStatus() {
return status; return status;
} }
@@ -188,9 +186,8 @@ public class Order {
* Get complete * Get complete
* @return complete * @return complete
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Boolean getComplete() { public Boolean getComplete() {
return complete; return complete;
} }
@@ -199,7 +196,6 @@ public class Order {
this.complete = complete; this.complete = complete;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -226,7 +222,6 @@ public class Order {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Order {\n"); sb.append("class Order {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n");
sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");

View File

@@ -18,13 +18,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* A pet for sale in the pet store * A pet for sale in the pet store
*/ */
@ApiModel(description = "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 { public class Pet {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -91,9 +94,8 @@ public class Pet {
* Get id * Get id
* @return id * @return id
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -111,10 +113,8 @@ public class Pet {
* Get category * Get category
* @return category * @return category
*/ */
@Valid
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@Valid
public Category getCategory() { public Category getCategory() {
return category; return category;
} }
@@ -132,10 +132,8 @@ public class Pet {
* Get name * Get name
* @return name * @return name
*/ */
@NotNull
@ApiModelProperty(example = "doggie", required = true, value = "") @ApiModelProperty(example = "doggie", required = true, value = "")
@NotNull
public String getName() { public String getName() {
return name; return name;
} }
@@ -158,10 +156,8 @@ public class Pet {
* Get photoUrls * Get photoUrls
* @return photoUrls * @return photoUrls
*/ */
@NotNull
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@NotNull
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
return photoUrls; return photoUrls;
} }
@@ -187,10 +183,8 @@ public class Pet {
* Get tags * Get tags
* @return tags * @return tags
*/ */
@Valid
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@Valid
public List<Tag> getTags() { public List<Tag> getTags() {
return tags; return tags;
} }
@@ -208,9 +202,8 @@ public class Pet {
* pet status in the store * pet status in the store
* @return status * @return status
*/ */
@ApiModelProperty(value = "pet status in the store") @ApiModelProperty(value = "pet status in the store")
public StatusEnum getStatus() { public StatusEnum getStatus() {
return status; return status;
} }
@@ -219,7 +212,6 @@ public class Pet {
this.status = status; this.status = status;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -246,7 +238,6 @@ public class Pet {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Pet {\n"); sb.append("class Pet {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n");

View File

@@ -13,13 +13,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* A tag for a pet * A tag for a pet
*/ */
@ApiModel(description = "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 { public class Tag {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -35,9 +38,8 @@ public class Tag {
* Get id * Get id
* @return id * @return id
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -55,9 +57,8 @@ public class Tag {
* Get name * Get name
* @return name * @return name
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getName() { public String getName() {
return name; return name;
} }
@@ -66,7 +67,6 @@ public class Tag {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -89,7 +89,6 @@ public class Tag {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Tag {\n"); sb.append("class Tag {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}"); sb.append("}");

View File

@@ -13,13 +13,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* A User who is purchasing from the pet store * A User who is purchasing from the pet store
*/ */
@ApiModel(description = "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 { public class User {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -53,9 +56,8 @@ public class User {
* Get id * Get id
* @return id * @return id
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -73,9 +75,8 @@ public class User {
* Get username * Get username
* @return username * @return username
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getUsername() { public String getUsername() {
return username; return username;
} }
@@ -93,9 +94,8 @@ public class User {
* Get firstName * Get firstName
* @return firstName * @return firstName
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getFirstName() { public String getFirstName() {
return firstName; return firstName;
} }
@@ -113,9 +113,8 @@ public class User {
* Get lastName * Get lastName
* @return lastName * @return lastName
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getLastName() { public String getLastName() {
return lastName; return lastName;
} }
@@ -133,9 +132,8 @@ public class User {
* Get email * Get email
* @return email * @return email
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getEmail() { public String getEmail() {
return email; return email;
} }
@@ -153,9 +151,8 @@ public class User {
* Get password * Get password
* @return password * @return password
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getPassword() { public String getPassword() {
return password; return password;
} }
@@ -173,9 +170,8 @@ public class User {
* Get phone * Get phone
* @return phone * @return phone
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getPhone() { public String getPhone() {
return phone; return phone;
} }
@@ -193,9 +189,8 @@ public class User {
* User Status * User Status
* @return userStatus * @return userStatus
*/ */
@ApiModelProperty(value = "User Status") @ApiModelProperty(value = "User Status")
public Integer getUserStatus() { public Integer getUserStatus() {
return userStatus; return userStatus;
} }
@@ -204,7 +199,6 @@ public class User {
this.userStatus = userStatus; this.userStatus = userStatus;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -233,7 +227,6 @@ public class User {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class User {\n"); sb.append("class User {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n");
sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n");

View File

@@ -7,6 +7,7 @@ package org.openapitools.api;
import org.openapitools.model.ModelApiResponse; import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.Pet; import org.openapitools.model.Pet;
import org.springframework.core.io.Resource;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
@@ -21,7 +22,9 @@ import javax.validation.constraints.*;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; 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 @Validated
@Api(value = "pet", description = "the pet API") @Api(value = "pet", description = "the pet API")
public interface PetApi { public interface PetApi {

View File

@@ -21,7 +21,9 @@ import javax.validation.constraints.*;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; 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 @Validated
@Api(value = "store", description = "the store API") @Api(value = "store", description = "the store API")
public interface StoreApi { public interface StoreApi {

View File

@@ -22,7 +22,9 @@ import javax.validation.constraints.*;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; 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 @Validated
@Api(value = "user", description = "the user API") @Api(value = "user", description = "the user API")
public interface UserApi { public interface UserApi {

View File

@@ -13,13 +13,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* A category for a pet * A category for a pet
*/ */
@ApiModel(description = "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 { public class Category {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -35,9 +38,8 @@ public class Category {
* Get id * Get id
* @return id * @return id
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -55,9 +57,8 @@ public class Category {
* Get name * Get name
* @return name * @return name
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getName() { public String getName() {
return name; return name;
} }
@@ -66,7 +67,6 @@ public class Category {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -89,7 +89,6 @@ public class Category {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Category {\n"); sb.append("class Category {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}"); sb.append("}");

View File

@@ -13,13 +13,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* Describes the result of uploading an image resource * Describes the result of uploading an image resource
*/ */
@ApiModel(description = "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 { public class ModelApiResponse {
@JsonProperty("code") @JsonProperty("code")
private Integer code; private Integer code;
@@ -38,9 +41,8 @@ public class ModelApiResponse {
* Get code * Get code
* @return code * @return code
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Integer getCode() { public Integer getCode() {
return code; return code;
} }
@@ -58,9 +60,8 @@ public class ModelApiResponse {
* Get type * Get type
* @return type * @return type
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getType() { public String getType() {
return type; return type;
} }
@@ -78,9 +79,8 @@ public class ModelApiResponse {
* Get message * Get message
* @return message * @return message
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getMessage() { public String getMessage() {
return message; return message;
} }
@@ -89,7 +89,6 @@ public class ModelApiResponse {
this.message = message; this.message = message;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -113,7 +112,6 @@ public class ModelApiResponse {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class ModelApiResponse {\n"); sb.append("class ModelApiResponse {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n");

View File

@@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import org.openapitools.jackson.nullable.JsonNullable; import org.openapitools.jackson.nullable.JsonNullable;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
import javax.validation.Valid; import javax.validation.Valid;
@@ -15,13 +16,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* An order for a pets from the pet store * An order for a pets from the pet store
*/ */
@ApiModel(description = "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 { public class Order {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -32,7 +36,7 @@ public class Order {
private Integer quantity; private Integer quantity;
@JsonProperty("shipDate") @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; private OffsetDateTime shipDate;
/** /**
@@ -87,9 +91,8 @@ public class Order {
* Get id * Get id
* @return id * @return id
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -107,9 +110,8 @@ public class Order {
* Get petId * Get petId
* @return petId * @return petId
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getPetId() { public Long getPetId() {
return petId; return petId;
} }
@@ -127,9 +129,8 @@ public class Order {
* Get quantity * Get quantity
* @return quantity * @return quantity
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Integer getQuantity() { public Integer getQuantity() {
return quantity; return quantity;
} }
@@ -147,10 +148,8 @@ public class Order {
* Get shipDate * Get shipDate
* @return shipDate * @return shipDate
*/ */
@Valid
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@Valid
public OffsetDateTime getShipDate() { public OffsetDateTime getShipDate() {
return shipDate; return shipDate;
} }
@@ -168,9 +167,8 @@ public class Order {
* Order Status * Order Status
* @return status * @return status
*/ */
@ApiModelProperty(value = "Order Status") @ApiModelProperty(value = "Order Status")
public StatusEnum getStatus() { public StatusEnum getStatus() {
return status; return status;
} }
@@ -188,9 +186,8 @@ public class Order {
* Get complete * Get complete
* @return complete * @return complete
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Boolean getComplete() { public Boolean getComplete() {
return complete; return complete;
} }
@@ -199,7 +196,6 @@ public class Order {
this.complete = complete; this.complete = complete;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -226,7 +222,6 @@ public class Order {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Order {\n"); sb.append("class Order {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n");
sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");

View File

@@ -18,13 +18,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* A pet for sale in the pet store * A pet for sale in the pet store
*/ */
@ApiModel(description = "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 { public class Pet {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -91,9 +94,8 @@ public class Pet {
* Get id * Get id
* @return id * @return id
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -111,10 +113,8 @@ public class Pet {
* Get category * Get category
* @return category * @return category
*/ */
@Valid
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@Valid
public Category getCategory() { public Category getCategory() {
return category; return category;
} }
@@ -132,10 +132,8 @@ public class Pet {
* Get name * Get name
* @return name * @return name
*/ */
@NotNull
@ApiModelProperty(example = "doggie", required = true, value = "") @ApiModelProperty(example = "doggie", required = true, value = "")
@NotNull
public String getName() { public String getName() {
return name; return name;
} }
@@ -158,10 +156,8 @@ public class Pet {
* Get photoUrls * Get photoUrls
* @return photoUrls * @return photoUrls
*/ */
@NotNull
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@NotNull
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
return photoUrls; return photoUrls;
} }
@@ -187,10 +183,8 @@ public class Pet {
* Get tags * Get tags
* @return tags * @return tags
*/ */
@Valid
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@Valid
public List<Tag> getTags() { public List<Tag> getTags() {
return tags; return tags;
} }
@@ -208,9 +202,8 @@ public class Pet {
* pet status in the store * pet status in the store
* @return status * @return status
*/ */
@ApiModelProperty(value = "pet status in the store") @ApiModelProperty(value = "pet status in the store")
public StatusEnum getStatus() { public StatusEnum getStatus() {
return status; return status;
} }
@@ -219,7 +212,6 @@ public class Pet {
this.status = status; this.status = status;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -246,7 +238,6 @@ public class Pet {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Pet {\n"); sb.append("class Pet {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n");

View File

@@ -13,13 +13,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* A tag for a pet * A tag for a pet
*/ */
@ApiModel(description = "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 { public class Tag {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -35,9 +38,8 @@ public class Tag {
* Get id * Get id
* @return id * @return id
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -55,9 +57,8 @@ public class Tag {
* Get name * Get name
* @return name * @return name
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getName() { public String getName() {
return name; return name;
} }
@@ -66,7 +67,6 @@ public class Tag {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -89,7 +89,6 @@ public class Tag {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Tag {\n"); sb.append("class Tag {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}"); sb.append("}");

View File

@@ -13,13 +13,16 @@ import javax.validation.constraints.*;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* A User who is purchasing from the pet store * A User who is purchasing from the pet store
*/ */
@ApiModel(description = "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 { public class User {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -53,9 +56,8 @@ public class User {
* Get id * Get id
* @return id * @return id
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -73,9 +75,8 @@ public class User {
* Get username * Get username
* @return username * @return username
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getUsername() { public String getUsername() {
return username; return username;
} }
@@ -93,9 +94,8 @@ public class User {
* Get firstName * Get firstName
* @return firstName * @return firstName
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getFirstName() { public String getFirstName() {
return firstName; return firstName;
} }
@@ -113,9 +113,8 @@ public class User {
* Get lastName * Get lastName
* @return lastName * @return lastName
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getLastName() { public String getLastName() {
return lastName; return lastName;
} }
@@ -133,9 +132,8 @@ public class User {
* Get email * Get email
* @return email * @return email
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getEmail() { public String getEmail() {
return email; return email;
} }
@@ -153,9 +151,8 @@ public class User {
* Get password * Get password
* @return password * @return password
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getPassword() { public String getPassword() {
return password; return password;
} }
@@ -173,9 +170,8 @@ public class User {
* Get phone * Get phone
* @return phone * @return phone
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getPhone() { public String getPhone() {
return phone; return phone;
} }
@@ -193,9 +189,8 @@ public class User {
* User Status * User Status
* @return userStatus * @return userStatus
*/ */
@ApiModelProperty(value = "User Status") @ApiModelProperty(value = "User Status")
public Integer getUserStatus() { public Integer getUserStatus() {
return userStatus; return userStatus;
} }
@@ -204,7 +199,6 @@ public class User {
this.userStatus = userStatus; this.userStatus = userStatus;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -233,7 +227,6 @@ public class User {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class User {\n"); sb.append("class User {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n");
sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n");

View File

@@ -7,6 +7,7 @@ package org.openapitools.api;
import org.openapitools.model.ModelApiResponse; import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.Pet; import org.openapitools.model.Pet;
import org.springframework.core.io.Resource;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters; import io.swagger.v3.oas.annotations.Parameters;
@@ -29,7 +30,9 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; import java.util.Optional;
import java.util.concurrent.CompletableFuture; 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 @Validated
@Tag(name = "Pet", description = "the Pet API") @Tag(name = "Pet", description = "the Pet API")
public interface PetApi { public interface PetApi {
@@ -41,6 +44,7 @@ public interface PetApi {
* @return Invalid input (status code 405) * @return Invalid input (status code 405)
*/ */
@Operation( @Operation(
operationId = "addPet",
summary = "Add a new pet to the store", summary = "Add a new pet to the store",
tags = { "pet" }, tags = { "pet" },
responses = { responses = {
@@ -68,6 +72,7 @@ public interface PetApi {
* @return Invalid pet value (status code 400) * @return Invalid pet value (status code 400)
*/ */
@Operation( @Operation(
operationId = "deletePet",
summary = "Deletes a pet", summary = "Deletes a pet",
tags = { "pet" }, tags = { "pet" },
responses = { responses = {
@@ -96,6 +101,7 @@ public interface PetApi {
* or Invalid status value (status code 400) * or Invalid status value (status code 400)
*/ */
@Operation( @Operation(
operationId = "findPetsByStatus",
summary = "Finds Pets by status", summary = "Finds Pets by status",
tags = { "pet" }, tags = { "pet" },
responses = { responses = {
@@ -126,6 +132,7 @@ public interface PetApi {
* @deprecated * @deprecated
*/ */
@Operation( @Operation(
operationId = "findPetsByTags",
summary = "Finds Pets by tags", summary = "Finds Pets by tags",
tags = { "pet" }, tags = { "pet" },
responses = { responses = {
@@ -156,6 +163,7 @@ public interface PetApi {
* or Pet not found (status code 404) * or Pet not found (status code 404)
*/ */
@Operation( @Operation(
operationId = "getPetById",
summary = "Find pet by ID", summary = "Find pet by ID",
tags = { "pet" }, tags = { "pet" },
responses = { responses = {
@@ -186,6 +194,7 @@ public interface PetApi {
* or Validation exception (status code 405) * or Validation exception (status code 405)
*/ */
@Operation( @Operation(
operationId = "updatePet",
summary = "Update an existing pet", summary = "Update an existing pet",
tags = { "pet" }, tags = { "pet" },
responses = { responses = {
@@ -216,6 +225,7 @@ public interface PetApi {
* @return Invalid input (status code 405) * @return Invalid input (status code 405)
*/ */
@Operation( @Operation(
operationId = "updatePetWithForm",
summary = "Updates a pet in the store with form data", summary = "Updates a pet in the store with form data",
tags = { "pet" }, tags = { "pet" },
responses = { responses = {
@@ -246,6 +256,7 @@ public interface PetApi {
* @return successful operation (status code 200) * @return successful operation (status code 200)
*/ */
@Operation( @Operation(
operationId = "uploadFile",
summary = "uploads an image", summary = "uploads an image",
tags = { "pet" }, tags = { "pet" },
responses = { responses = {

View File

@@ -29,7 +29,9 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; import java.util.Optional;
import java.util.concurrent.CompletableFuture; 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 @Validated
@Tag(name = "Store", description = "the Store API") @Tag(name = "Store", description = "the Store API")
public interface StoreApi { public interface StoreApi {
@@ -43,6 +45,7 @@ public interface StoreApi {
* or Order not found (status code 404) * or Order not found (status code 404)
*/ */
@Operation( @Operation(
operationId = "deleteOrder",
summary = "Delete purchase order by ID", summary = "Delete purchase order by ID",
tags = { "store" }, tags = { "store" },
responses = { responses = {
@@ -66,6 +69,7 @@ public interface StoreApi {
* @return successful operation (status code 200) * @return successful operation (status code 200)
*/ */
@Operation( @Operation(
operationId = "getInventory",
summary = "Returns pet inventories by status", summary = "Returns pet inventories by status",
tags = { "store" }, tags = { "store" },
responses = { responses = {
@@ -95,6 +99,7 @@ public interface StoreApi {
* or Order not found (status code 404) * or Order not found (status code 404)
*/ */
@Operation( @Operation(
operationId = "getOrderById",
summary = "Find purchase order by ID", summary = "Find purchase order by ID",
tags = { "store" }, tags = { "store" },
responses = { responses = {
@@ -121,6 +126,7 @@ public interface StoreApi {
* or Invalid Order (status code 400) * or Invalid Order (status code 400)
*/ */
@Operation( @Operation(
operationId = "placeOrder",
summary = "Place an order for a pet", summary = "Place an order for a pet",
tags = { "store" }, tags = { "store" },
responses = { responses = {

View File

@@ -30,7 +30,9 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; import java.util.Optional;
import java.util.concurrent.CompletableFuture; 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 @Validated
@Tag(name = "User", description = "the User API") @Tag(name = "User", description = "the User API")
public interface UserApi { public interface UserApi {
@@ -43,6 +45,7 @@ public interface UserApi {
* @return successful operation (status code 200) * @return successful operation (status code 200)
*/ */
@Operation( @Operation(
operationId = "createUser",
summary = "Create user", summary = "Create user",
tags = { "user" }, tags = { "user" },
responses = { responses = {
@@ -65,6 +68,7 @@ public interface UserApi {
* @return successful operation (status code 200) * @return successful operation (status code 200)
*/ */
@Operation( @Operation(
operationId = "createUsersWithArrayInput",
summary = "Creates list of users with given input array", summary = "Creates list of users with given input array",
tags = { "user" }, tags = { "user" },
responses = { responses = {
@@ -87,6 +91,7 @@ public interface UserApi {
* @return successful operation (status code 200) * @return successful operation (status code 200)
*/ */
@Operation( @Operation(
operationId = "createUsersWithListInput",
summary = "Creates list of users with given input array", summary = "Creates list of users with given input array",
tags = { "user" }, tags = { "user" },
responses = { responses = {
@@ -111,6 +116,7 @@ public interface UserApi {
* or User not found (status code 404) * or User not found (status code 404)
*/ */
@Operation( @Operation(
operationId = "deleteUser",
summary = "Delete user", summary = "Delete user",
tags = { "user" }, tags = { "user" },
responses = { responses = {
@@ -136,6 +142,7 @@ public interface UserApi {
* or User not found (status code 404) * or User not found (status code 404)
*/ */
@Operation( @Operation(
operationId = "getUserByName",
summary = "Get user by user name", summary = "Get user by user name",
tags = { "user" }, tags = { "user" },
responses = { responses = {
@@ -163,6 +170,7 @@ public interface UserApi {
* or Invalid username/password supplied (status code 400) * or Invalid username/password supplied (status code 400)
*/ */
@Operation( @Operation(
operationId = "loginUser",
summary = "Logs user into the system", summary = "Logs user into the system",
tags = { "user" }, tags = { "user" },
responses = { responses = {
@@ -187,6 +195,7 @@ public interface UserApi {
* @return successful operation (status code 200) * @return successful operation (status code 200)
*/ */
@Operation( @Operation(
operationId = "logoutUser",
summary = "Logs out current logged in user session", summary = "Logs out current logged in user session",
tags = { "user" }, tags = { "user" },
responses = { responses = {
@@ -212,6 +221,7 @@ public interface UserApi {
* or User not found (status code 404) * or User not found (status code 404)
*/ */
@Operation( @Operation(
operationId = "updateUser",
summary = "Updated user", summary = "Updated user",
tags = { "user" }, tags = { "user" },
responses = { responses = {

View File

@@ -12,13 +12,16 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* A category for a pet * 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 { public class Category {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -34,9 +37,8 @@ public class Category {
* Get id * Get id
* @return id * @return id
*/ */
@Schema(name = "id", defaultValue = "")
@Schema(name = "id", required = false)
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -54,9 +56,8 @@ public class Category {
* Get name * Get name
* @return name * @return name
*/ */
@Schema(name = "name", defaultValue = "")
@Schema(name = "name", required = false)
public String getName() { public String getName() {
return name; return name;
} }
@@ -65,7 +66,6 @@ public class Category {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -88,7 +88,6 @@ public class Category {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Category {\n"); sb.append("class Category {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}"); sb.append("}");

View File

@@ -12,13 +12,16 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* Describes the result of uploading an image resource * 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 { public class ModelApiResponse {
@JsonProperty("code") @JsonProperty("code")
private Integer code; private Integer code;
@@ -37,9 +40,8 @@ public class ModelApiResponse {
* Get code * Get code
* @return code * @return code
*/ */
@Schema(name = "code", defaultValue = "")
@Schema(name = "code", required = false)
public Integer getCode() { public Integer getCode() {
return code; return code;
} }
@@ -57,9 +59,8 @@ public class ModelApiResponse {
* Get type * Get type
* @return type * @return type
*/ */
@Schema(name = "type", defaultValue = "")
@Schema(name = "type", required = false)
public String getType() { public String getType() {
return type; return type;
} }
@@ -77,9 +78,8 @@ public class ModelApiResponse {
* Get message * Get message
* @return message * @return message
*/ */
@Schema(name = "message", defaultValue = "")
@Schema(name = "message", required = false)
public String getMessage() { public String getMessage() {
return message; return message;
} }
@@ -88,7 +88,6 @@ public class ModelApiResponse {
this.message = message; this.message = message;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -112,7 +111,6 @@ public class ModelApiResponse {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class ModelApiResponse {\n"); sb.append("class ModelApiResponse {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n");

View File

@@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.annotation.JsonValue;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import org.openapitools.jackson.nullable.JsonNullable; import org.openapitools.jackson.nullable.JsonNullable;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
import javax.validation.Valid; import javax.validation.Valid;
@@ -14,13 +15,16 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* An order for a pets from the pet store * 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 { public class Order {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -31,7 +35,7 @@ public class Order {
private Integer quantity; private Integer quantity;
@JsonProperty("shipDate") @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; private OffsetDateTime shipDate;
/** /**
@@ -86,9 +90,8 @@ public class Order {
* Get id * Get id
* @return id * @return id
*/ */
@Schema(name = "id", defaultValue = "")
@Schema(name = "id", required = false)
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -106,9 +109,8 @@ public class Order {
* Get petId * Get petId
* @return petId * @return petId
*/ */
@Schema(name = "petId", defaultValue = "")
@Schema(name = "petId", required = false)
public Long getPetId() { public Long getPetId() {
return petId; return petId;
} }
@@ -126,9 +128,8 @@ public class Order {
* Get quantity * Get quantity
* @return quantity * @return quantity
*/ */
@Schema(name = "quantity", defaultValue = "")
@Schema(name = "quantity", required = false)
public Integer getQuantity() { public Integer getQuantity() {
return quantity; return quantity;
} }
@@ -146,10 +147,8 @@ public class Order {
* Get shipDate * Get shipDate
* @return shipDate * @return shipDate
*/ */
@Schema(name = "shipDate", defaultValue = "") @Valid
@Schema(name = "shipDate", required = false)
@Valid
public OffsetDateTime getShipDate() { public OffsetDateTime getShipDate() {
return shipDate; return shipDate;
} }
@@ -167,9 +166,8 @@ public class Order {
* Order Status * Order Status
* @return status * @return status
*/ */
@Schema(name = "status", defaultValue = "Order Status")
@Schema(name = "status", description = "Order Status", required = false)
public StatusEnum getStatus() { public StatusEnum getStatus() {
return status; return status;
} }
@@ -187,9 +185,8 @@ public class Order {
* Get complete * Get complete
* @return complete * @return complete
*/ */
@Schema(name = "complete", defaultValue = "")
@Schema(name = "complete", required = false)
public Boolean getComplete() { public Boolean getComplete() {
return complete; return complete;
} }
@@ -198,7 +195,6 @@ public class Order {
this.complete = complete; this.complete = complete;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -225,7 +221,6 @@ public class Order {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Order {\n"); sb.append("class Order {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); sb.append(" petId: ").append(toIndentedString(petId)).append("\n");
sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");

View File

@@ -17,13 +17,16 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* A pet for sale in the pet store * 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 { public class Pet {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -90,9 +93,8 @@ public class Pet {
* Get id * Get id
* @return id * @return id
*/ */
@Schema(name = "id", defaultValue = "")
@Schema(name = "id", required = false)
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -110,10 +112,8 @@ public class Pet {
* Get category * Get category
* @return category * @return category
*/ */
@Schema(name = "category", defaultValue = "") @Valid
@Schema(name = "category", required = false)
@Valid
public Category getCategory() { public Category getCategory() {
return category; return category;
} }
@@ -131,10 +131,8 @@ public class Pet {
* Get name * Get name
* @return name * @return name
*/ */
@Schema(name = "name", example = "doggie", required = true, defaultValue = "") @NotNull
@NotNull @Schema(name = "name", example = "doggie", required = true)
public String getName() { public String getName() {
return name; return name;
} }
@@ -157,10 +155,8 @@ public class Pet {
* Get photoUrls * Get photoUrls
* @return photoUrls * @return photoUrls
*/ */
@Schema(name = "photoUrls", required = true, defaultValue = "") @NotNull
@NotNull @Schema(name = "photoUrls", required = true)
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
return photoUrls; return photoUrls;
} }
@@ -186,10 +182,8 @@ public class Pet {
* Get tags * Get tags
* @return tags * @return tags
*/ */
@Schema(name = "tags", defaultValue = "") @Valid
@Schema(name = "tags", required = false)
@Valid
public List<Tag> getTags() { public List<Tag> getTags() {
return tags; return tags;
} }
@@ -207,9 +201,8 @@ public class Pet {
* pet status in the store * pet status in the store
* @return status * @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() { public StatusEnum getStatus() {
return status; return status;
} }
@@ -218,7 +211,6 @@ public class Pet {
this.status = status; this.status = status;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -245,7 +237,6 @@ public class Pet {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Pet {\n"); sb.append("class Pet {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n");

View File

@@ -12,13 +12,16 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* A tag for a pet * 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 { public class Tag {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -34,9 +37,8 @@ public class Tag {
* Get id * Get id
* @return id * @return id
*/ */
@Schema(name = "id", defaultValue = "")
@Schema(name = "id", required = false)
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -54,9 +56,8 @@ public class Tag {
* Get name * Get name
* @return name * @return name
*/ */
@Schema(name = "name", defaultValue = "")
@Schema(name = "name", required = false)
public String getName() { public String getName() {
return name; return name;
} }
@@ -65,7 +66,6 @@ public class Tag {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -88,7 +88,6 @@ public class Tag {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Tag {\n"); sb.append("class Tag {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}"); sb.append("}");

View File

@@ -12,13 +12,16 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* A User who is purchasing from the pet store * 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 { public class User {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -52,9 +55,8 @@ public class User {
* Get id * Get id
* @return id * @return id
*/ */
@Schema(name = "id", defaultValue = "")
@Schema(name = "id", required = false)
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -72,9 +74,8 @@ public class User {
* Get username * Get username
* @return username * @return username
*/ */
@Schema(name = "username", defaultValue = "")
@Schema(name = "username", required = false)
public String getUsername() { public String getUsername() {
return username; return username;
} }
@@ -92,9 +93,8 @@ public class User {
* Get firstName * Get firstName
* @return firstName * @return firstName
*/ */
@Schema(name = "firstName", defaultValue = "")
@Schema(name = "firstName", required = false)
public String getFirstName() { public String getFirstName() {
return firstName; return firstName;
} }
@@ -112,9 +112,8 @@ public class User {
* Get lastName * Get lastName
* @return lastName * @return lastName
*/ */
@Schema(name = "lastName", defaultValue = "")
@Schema(name = "lastName", required = false)
public String getLastName() { public String getLastName() {
return lastName; return lastName;
} }
@@ -132,9 +131,8 @@ public class User {
* Get email * Get email
* @return email * @return email
*/ */
@Schema(name = "email", defaultValue = "")
@Schema(name = "email", required = false)
public String getEmail() { public String getEmail() {
return email; return email;
} }
@@ -152,9 +150,8 @@ public class User {
* Get password * Get password
* @return password * @return password
*/ */
@Schema(name = "password", defaultValue = "")
@Schema(name = "password", required = false)
public String getPassword() { public String getPassword() {
return password; return password;
} }
@@ -172,9 +169,8 @@ public class User {
* Get phone * Get phone
* @return phone * @return phone
*/ */
@Schema(name = "phone", defaultValue = "")
@Schema(name = "phone", required = false)
public String getPhone() { public String getPhone() {
return phone; return phone;
} }
@@ -192,9 +188,8 @@ public class User {
* User Status * User Status
* @return userStatus * @return userStatus
*/ */
@Schema(name = "userStatus", defaultValue = "User Status")
@Schema(name = "userStatus", description = "User Status", required = false)
public Integer getUserStatus() { public Integer getUserStatus() {
return userStatus; return userStatus;
} }
@@ -203,7 +198,6 @@ public class User {
this.userStatus = userStatus; this.userStatus = userStatus;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -232,7 +226,6 @@ public class User {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class User {\n"); sb.append("class User {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n");
sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n");

View File

@@ -5,6 +5,7 @@
*/ */
package org.openapitools.api; package org.openapitools.api;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
@@ -28,7 +29,9 @@ import javax.validation.constraints.*;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; 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 @Validated
@Tag(name = "Default", description = "the Default API") @Tag(name = "Default", description = "the Default API")
public interface DefaultApi { public interface DefaultApi {
@@ -43,8 +46,7 @@ public interface DefaultApi {
* @return OK (status code 200) * @return OK (status code 200)
*/ */
@Operation( @Operation(
summary = "", operationId = "get",
tags = { },
responses = { responses = {
@ApiResponse(responseCode = "200", description = "OK") @ApiResponse(responseCode = "200", description = "OK")
} }
@@ -54,10 +56,10 @@ public interface DefaultApi {
value = "/thingy/{date}" value = "/thingy/{date}"
) )
ResponseEntity<Void> get( ResponseEntity<Void> 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, @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) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @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) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate xOrderDate, @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") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) LocalDate loginDate @Parameter(name = "loginDate", description = "A date cookie parameter", schema = @Schema(description = "")) @CookieValue("loginDate") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate loginDate
); );
@@ -70,8 +72,7 @@ public interface DefaultApi {
* @return Invalid input (status code 405) * @return Invalid input (status code 405)
*/ */
@Operation( @Operation(
summary = "", operationId = "updatePetWithForm",
tags = { },
responses = { responses = {
@ApiResponse(responseCode = "405", description = "Invalid input") @ApiResponse(responseCode = "405", description = "Invalid input")
} }
@@ -82,8 +83,8 @@ public interface DefaultApi {
consumes = "application/x-www-form-urlencoded" consumes = "application/x-www-form-urlencoded"
) )
ResponseEntity<Void> updatePetWithForm( ResponseEntity<Void> 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 = "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) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate @Parameter(name = "visitDate", description = "Updated last vist timestamp", schema = @Schema(description = "")) @RequestParam(value="visitDate", required=false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate
); );
} }

View File

@@ -27,7 +27,9 @@ import javax.validation.constraints.*;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; 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 @Validated
@Tag(name = "AnotherFake", description = "the AnotherFake API") @Tag(name = "AnotherFake", description = "the AnotherFake API")
public interface AnotherFakeApi { public interface AnotherFakeApi {
@@ -40,6 +42,7 @@ public interface AnotherFakeApi {
* @return successful operation (status code 200) * @return successful operation (status code 200)
*/ */
@Operation( @Operation(
operationId = "call123testSpecialTags",
summary = "To test special tags", summary = "To test special tags",
tags = { "$another-fake?" }, tags = { "$another-fake?" },
responses = { responses = {

View File

@@ -7,11 +7,13 @@ package org.openapitools.api;
import java.math.BigDecimal; import java.math.BigDecimal;
import org.openapitools.model.Client; import org.openapitools.model.Client;
import org.springframework.format.annotation.DateTimeFormat;
import org.openapitools.model.FileSchemaTestClass; import org.openapitools.model.FileSchemaTestClass;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.Map; import java.util.Map;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
import org.openapitools.model.OuterComposite; import org.openapitools.model.OuterComposite;
import org.springframework.core.io.Resource;
import org.openapitools.model.User; import org.openapitools.model.User;
import org.openapitools.model.XmlItem; import org.openapitools.model.XmlItem;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
@@ -35,7 +37,9 @@ import javax.validation.constraints.*;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; 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 @Validated
@Tag(name = "Fake", description = "the Fake API") @Tag(name = "Fake", description = "the Fake API")
public interface FakeApi { public interface FakeApi {
@@ -48,6 +52,7 @@ public interface FakeApi {
* @return successful operation (status code 200) * @return successful operation (status code 200)
*/ */
@Operation( @Operation(
operationId = "createXmlItem",
summary = "creates an XmlItem", summary = "creates an XmlItem",
tags = { "fake" }, tags = { "fake" },
responses = { responses = {
@@ -72,7 +77,7 @@ public interface FakeApi {
* @return Output boolean (status code 200) * @return Output boolean (status code 200)
*/ */
@Operation( @Operation(
summary = "", operationId = "fakeOuterBooleanSerialize",
tags = { "fake" }, tags = { "fake" },
responses = { responses = {
@ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class))) @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class)))
@@ -96,7 +101,7 @@ public interface FakeApi {
* @return Output composite (status code 200) * @return Output composite (status code 200)
*/ */
@Operation( @Operation(
summary = "", operationId = "fakeOuterCompositeSerialize",
tags = { "fake" }, tags = { "fake" },
responses = { responses = {
@ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "application/json", schema = @Schema(implementation = OuterComposite.class))) @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "application/json", schema = @Schema(implementation = OuterComposite.class)))
@@ -120,7 +125,7 @@ public interface FakeApi {
* @return Output number (status code 200) * @return Output number (status code 200)
*/ */
@Operation( @Operation(
summary = "", operationId = "fakeOuterNumberSerialize",
tags = { "fake" }, tags = { "fake" },
responses = { responses = {
@ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BigDecimal.class))) @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BigDecimal.class)))
@@ -144,7 +149,7 @@ public interface FakeApi {
* @return Output string (status code 200) * @return Output string (status code 200)
*/ */
@Operation( @Operation(
summary = "", operationId = "fakeOuterStringSerialize",
tags = { "fake" }, tags = { "fake" },
responses = { responses = {
@ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))) @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class)))
@@ -168,7 +173,7 @@ public interface FakeApi {
* @return Success (status code 200) * @return Success (status code 200)
*/ */
@Operation( @Operation(
summary = "", operationId = "testBodyWithFileSchema",
tags = { "fake" }, tags = { "fake" },
responses = { responses = {
@ApiResponse(responseCode = "200", description = "Success") @ApiResponse(responseCode = "200", description = "Success")
@@ -192,7 +197,7 @@ public interface FakeApi {
* @return Success (status code 200) * @return Success (status code 200)
*/ */
@Operation( @Operation(
summary = "", operationId = "testBodyWithQueryParams",
tags = { "fake" }, tags = { "fake" },
responses = { responses = {
@ApiResponse(responseCode = "200", description = "Success") @ApiResponse(responseCode = "200", description = "Success")
@@ -217,6 +222,7 @@ public interface FakeApi {
* @return successful operation (status code 200) * @return successful operation (status code 200)
*/ */
@Operation( @Operation(
operationId = "testClientModel",
summary = "To test \"client\" model", summary = "To test \"client\" model",
tags = { "fake" }, tags = { "fake" },
responses = { responses = {
@@ -256,6 +262,7 @@ public interface FakeApi {
* or User not found (status code 404) * or User not found (status code 404)
*/ */
@Operation( @Operation(
operationId = "testEndpointParameters",
summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트",
tags = { "fake" }, tags = { "fake" },
responses = { responses = {
@@ -282,8 +289,8 @@ public interface FakeApi {
@Parameter(name = "float", description = "None", schema = @Schema(description = "")) @RequestParam(value="float", required=false) Float _float, @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 = "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 = "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 = "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) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @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 = "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 @Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @RequestParam(value="callback", required=false) String paramCallback
); );
@@ -305,6 +312,7 @@ public interface FakeApi {
* or Not found (status code 404) * or Not found (status code 404)
*/ */
@Operation( @Operation(
operationId = "testEnumParameters",
summary = "To test enum parameters", summary = "To test enum parameters",
tags = { "fake" }, tags = { "fake" },
responses = { responses = {
@@ -342,6 +350,7 @@ public interface FakeApi {
* @return Someting wrong (status code 400) * @return Someting wrong (status code 400)
*/ */
@Operation( @Operation(
operationId = "testGroupParameters",
summary = "Fake endpoint to test group parameters (optional)", summary = "Fake endpoint to test group parameters (optional)",
tags = { "fake" }, tags = { "fake" },
responses = { responses = {
@@ -369,6 +378,7 @@ public interface FakeApi {
* @return successful operation (status code 200) * @return successful operation (status code 200)
*/ */
@Operation( @Operation(
operationId = "testInlineAdditionalProperties",
summary = "test inline additionalProperties", summary = "test inline additionalProperties",
tags = { "fake" }, tags = { "fake" },
responses = { responses = {
@@ -393,6 +403,7 @@ public interface FakeApi {
* @return successful operation (status code 200) * @return successful operation (status code 200)
*/ */
@Operation( @Operation(
operationId = "testJsonFormData",
summary = "test json serialization of form data", summary = "test json serialization of form data",
tags = { "fake" }, tags = { "fake" },
responses = { responses = {
@@ -422,7 +433,7 @@ public interface FakeApi {
* @return Success (status code 200) * @return Success (status code 200)
*/ */
@Operation( @Operation(
summary = "", operationId = "testQueryParameterCollectionFormat",
tags = { "fake" }, tags = { "fake" },
responses = { responses = {
@ApiResponse(responseCode = "200", description = "Success") @ApiResponse(responseCode = "200", description = "Success")

View File

@@ -27,7 +27,9 @@ import javax.validation.constraints.*;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; 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 @Validated
@Tag(name = "FakeClassnameTags123", description = "the FakeClassnameTags123 API") @Tag(name = "FakeClassnameTags123", description = "the FakeClassnameTags123 API")
public interface FakeClassnameTags123Api { public interface FakeClassnameTags123Api {
@@ -40,6 +42,7 @@ public interface FakeClassnameTags123Api {
* @return successful operation (status code 200) * @return successful operation (status code 200)
*/ */
@Operation( @Operation(
operationId = "testClassname",
summary = "To test class name in snake case", summary = "To test class name in snake case",
tags = { "fake_classname_tags 123#$%^" }, tags = { "fake_classname_tags 123#$%^" },
responses = { responses = {

View File

@@ -7,6 +7,7 @@ package org.openapitools.api;
import org.openapitools.model.ModelApiResponse; import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.Pet; import org.openapitools.model.Pet;
import org.springframework.core.io.Resource;
import java.util.Set; import java.util.Set;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
@@ -29,7 +30,9 @@ import javax.validation.constraints.*;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; 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 @Validated
@Tag(name = "Pet", description = "the Pet API") @Tag(name = "Pet", description = "the Pet API")
public interface PetApi { public interface PetApi {
@@ -42,6 +45,7 @@ public interface PetApi {
* or Invalid input (status code 405) * or Invalid input (status code 405)
*/ */
@Operation( @Operation(
operationId = "addPet",
summary = "Add a new pet to the store", summary = "Add a new pet to the store",
tags = { "pet" }, tags = { "pet" },
responses = { responses = {
@@ -71,6 +75,7 @@ public interface PetApi {
* or Invalid pet value (status code 400) * or Invalid pet value (status code 400)
*/ */
@Operation( @Operation(
operationId = "deletePet",
summary = "Deletes a pet", summary = "Deletes a pet",
tags = { "pet" }, tags = { "pet" },
responses = { responses = {
@@ -100,6 +105,7 @@ public interface PetApi {
* or Invalid status value (status code 400) * or Invalid status value (status code 400)
*/ */
@Operation( @Operation(
operationId = "findPetsByStatus",
summary = "Finds Pets by status", summary = "Finds Pets by status",
tags = { "pet" }, tags = { "pet" },
responses = { responses = {
@@ -130,6 +136,7 @@ public interface PetApi {
* @deprecated * @deprecated
*/ */
@Operation( @Operation(
operationId = "findPetsByTags",
summary = "Finds Pets by tags", summary = "Finds Pets by tags",
tags = { "pet" }, tags = { "pet" },
responses = { responses = {
@@ -160,6 +167,7 @@ public interface PetApi {
* or Pet not found (status code 404) * or Pet not found (status code 404)
*/ */
@Operation( @Operation(
operationId = "getPetById",
summary = "Find pet by ID", summary = "Find pet by ID",
tags = { "pet" }, tags = { "pet" },
responses = { responses = {
@@ -191,6 +199,7 @@ public interface PetApi {
* or Validation exception (status code 405) * or Validation exception (status code 405)
*/ */
@Operation( @Operation(
operationId = "updatePet",
summary = "Update an existing pet", summary = "Update an existing pet",
tags = { "pet" }, tags = { "pet" },
responses = { responses = {
@@ -222,6 +231,7 @@ public interface PetApi {
* @return Invalid input (status code 405) * @return Invalid input (status code 405)
*/ */
@Operation( @Operation(
operationId = "updatePetWithForm",
summary = "Updates a pet in the store with form data", summary = "Updates a pet in the store with form data",
tags = { "pet" }, tags = { "pet" },
responses = { responses = {
@@ -252,6 +262,7 @@ public interface PetApi {
* @return successful operation (status code 200) * @return successful operation (status code 200)
*/ */
@Operation( @Operation(
operationId = "uploadFile",
summary = "uploads an image", summary = "uploads an image",
tags = { "pet" }, tags = { "pet" },
responses = { responses = {
@@ -283,6 +294,7 @@ public interface PetApi {
* @return successful operation (status code 200) * @return successful operation (status code 200)
*/ */
@Operation( @Operation(
operationId = "uploadFileWithRequiredFile",
summary = "uploads an image (required)", summary = "uploads an image (required)",
tags = { "pet" }, tags = { "pet" },
responses = { responses = {

View File

@@ -28,7 +28,9 @@ import javax.validation.constraints.*;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; 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 @Validated
@Tag(name = "Store", description = "the Store API") @Tag(name = "Store", description = "the Store API")
public interface StoreApi { public interface StoreApi {
@@ -42,6 +44,7 @@ public interface StoreApi {
* or Order not found (status code 404) * or Order not found (status code 404)
*/ */
@Operation( @Operation(
operationId = "deleteOrder",
summary = "Delete purchase order by ID", summary = "Delete purchase order by ID",
tags = { "store" }, tags = { "store" },
responses = { responses = {
@@ -65,6 +68,7 @@ public interface StoreApi {
* @return successful operation (status code 200) * @return successful operation (status code 200)
*/ */
@Operation( @Operation(
operationId = "getInventory",
summary = "Returns pet inventories by status", summary = "Returns pet inventories by status",
tags = { "store" }, tags = { "store" },
responses = { responses = {
@@ -94,6 +98,7 @@ public interface StoreApi {
* or Order not found (status code 404) * or Order not found (status code 404)
*/ */
@Operation( @Operation(
operationId = "getOrderById",
summary = "Find purchase order by ID", summary = "Find purchase order by ID",
tags = { "store" }, tags = { "store" },
responses = { responses = {
@@ -120,6 +125,7 @@ public interface StoreApi {
* or Invalid Order (status code 400) * or Invalid Order (status code 400)
*/ */
@Operation( @Operation(
operationId = "placeOrder",
summary = "Place an order for a pet", summary = "Place an order for a pet",
tags = { "store" }, tags = { "store" },
responses = { responses = {

View File

@@ -29,7 +29,9 @@ import javax.validation.constraints.*;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; 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 @Validated
@Tag(name = "User", description = "the User API") @Tag(name = "User", description = "the User API")
public interface UserApi { public interface UserApi {
@@ -42,6 +44,7 @@ public interface UserApi {
* @return successful operation (status code 200) * @return successful operation (status code 200)
*/ */
@Operation( @Operation(
operationId = "createUser",
summary = "Create user", summary = "Create user",
tags = { "user" }, tags = { "user" },
responses = { responses = {
@@ -64,6 +67,7 @@ public interface UserApi {
* @return successful operation (status code 200) * @return successful operation (status code 200)
*/ */
@Operation( @Operation(
operationId = "createUsersWithArrayInput",
summary = "Creates list of users with given input array", summary = "Creates list of users with given input array",
tags = { "user" }, tags = { "user" },
responses = { responses = {
@@ -86,6 +90,7 @@ public interface UserApi {
* @return successful operation (status code 200) * @return successful operation (status code 200)
*/ */
@Operation( @Operation(
operationId = "createUsersWithListInput",
summary = "Creates list of users with given input array", summary = "Creates list of users with given input array",
tags = { "user" }, tags = { "user" },
responses = { responses = {
@@ -110,6 +115,7 @@ public interface UserApi {
* or User not found (status code 404) * or User not found (status code 404)
*/ */
@Operation( @Operation(
operationId = "deleteUser",
summary = "Delete user", summary = "Delete user",
tags = { "user" }, tags = { "user" },
responses = { responses = {
@@ -135,6 +141,7 @@ public interface UserApi {
* or User not found (status code 404) * or User not found (status code 404)
*/ */
@Operation( @Operation(
operationId = "getUserByName",
summary = "Get user by user name", summary = "Get user by user name",
tags = { "user" }, tags = { "user" },
responses = { responses = {
@@ -162,6 +169,7 @@ public interface UserApi {
* or Invalid username/password supplied (status code 400) * or Invalid username/password supplied (status code 400)
*/ */
@Operation( @Operation(
operationId = "loginUser",
summary = "Logs user into the system", summary = "Logs user into the system",
tags = { "user" }, tags = { "user" },
responses = { responses = {
@@ -186,6 +194,7 @@ public interface UserApi {
* @return successful operation (status code 200) * @return successful operation (status code 200)
*/ */
@Operation( @Operation(
operationId = "logoutUser",
summary = "Logs out current logged in user session", summary = "Logs out current logged in user session",
tags = { "user" }, tags = { "user" },
responses = { responses = {
@@ -211,6 +220,7 @@ public interface UserApi {
* or User not found (status code 404) * or User not found (status code 404)
*/ */
@Operation( @Operation(
operationId = "updateUser",
summary = "Updated user", summary = "Updated user",
tags = { "user" }, tags = { "user" },
responses = { responses = {

View File

@@ -14,12 +14,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* AdditionalPropertiesAnyType * AdditionalPropertiesAnyType
*/ */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class AdditionalPropertiesAnyType extends HashMap<String, Object> { public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
@@ -32,9 +35,8 @@ public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
* Get name * Get name
* @return name * @return name
*/ */
@Schema(name = "name", defaultValue = "")
@Schema(name = "name", required = false)
public String getName() { public String getName() {
return name; return name;
} }
@@ -43,7 +45,6 @@ public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {

View File

@@ -15,12 +15,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* AdditionalPropertiesArray * AdditionalPropertiesArray
*/ */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class AdditionalPropertiesArray extends HashMap<String, List> { public class AdditionalPropertiesArray extends HashMap<String, List> {
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
@@ -33,9 +36,8 @@ public class AdditionalPropertiesArray extends HashMap<String, List> {
* Get name * Get name
* @return name * @return name
*/ */
@Schema(name = "name", defaultValue = "")
@Schema(name = "name", required = false)
public String getName() { public String getName() {
return name; return name;
} }
@@ -44,7 +46,6 @@ public class AdditionalPropertiesArray extends HashMap<String, List> {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {

View File

@@ -14,12 +14,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* AdditionalPropertiesBoolean * AdditionalPropertiesBoolean
*/ */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> { public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> {
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
@@ -32,9 +35,8 @@ public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> {
* Get name * Get name
* @return name * @return name
*/ */
@Schema(name = "name", defaultValue = "")
@Schema(name = "name", required = false)
public String getName() { public String getName() {
return name; return name;
} }
@@ -43,7 +45,6 @@ public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {

View File

@@ -16,12 +16,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* AdditionalPropertiesClass * AdditionalPropertiesClass
*/ */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class AdditionalPropertiesClass { public class AdditionalPropertiesClass {
@JsonProperty("map_string") @JsonProperty("map_string")
@Valid @Valid
private Map<String, String> mapString = null; private Map<String, String> mapString = null;
@@ -80,9 +83,8 @@ public class AdditionalPropertiesClass {
* Get mapString * Get mapString
* @return mapString * @return mapString
*/ */
@Schema(name = "mapString", defaultValue = "")
@Schema(name = "map_string", required = false)
public Map<String, String> getMapString() { public Map<String, String> getMapString() {
return mapString; return mapString;
} }
@@ -108,10 +110,8 @@ public class AdditionalPropertiesClass {
* Get mapNumber * Get mapNumber
* @return mapNumber * @return mapNumber
*/ */
@Schema(name = "mapNumber", defaultValue = "") @Valid
@Schema(name = "map_number", required = false)
@Valid
public Map<String, BigDecimal> getMapNumber() { public Map<String, BigDecimal> getMapNumber() {
return mapNumber; return mapNumber;
} }
@@ -137,9 +137,8 @@ public class AdditionalPropertiesClass {
* Get mapInteger * Get mapInteger
* @return mapInteger * @return mapInteger
*/ */
@Schema(name = "mapInteger", defaultValue = "")
@Schema(name = "map_integer", required = false)
public Map<String, Integer> getMapInteger() { public Map<String, Integer> getMapInteger() {
return mapInteger; return mapInteger;
} }
@@ -165,9 +164,8 @@ public class AdditionalPropertiesClass {
* Get mapBoolean * Get mapBoolean
* @return mapBoolean * @return mapBoolean
*/ */
@Schema(name = "mapBoolean", defaultValue = "")
@Schema(name = "map_boolean", required = false)
public Map<String, Boolean> getMapBoolean() { public Map<String, Boolean> getMapBoolean() {
return mapBoolean; return mapBoolean;
} }
@@ -193,10 +191,8 @@ public class AdditionalPropertiesClass {
* Get mapArrayInteger * Get mapArrayInteger
* @return mapArrayInteger * @return mapArrayInteger
*/ */
@Schema(name = "mapArrayInteger", defaultValue = "") @Valid
@Schema(name = "map_array_integer", required = false)
@Valid
public Map<String, List<Integer>> getMapArrayInteger() { public Map<String, List<Integer>> getMapArrayInteger() {
return mapArrayInteger; return mapArrayInteger;
} }
@@ -222,10 +218,8 @@ public class AdditionalPropertiesClass {
* Get mapArrayAnytype * Get mapArrayAnytype
* @return mapArrayAnytype * @return mapArrayAnytype
*/ */
@Schema(name = "mapArrayAnytype", defaultValue = "") @Valid
@Schema(name = "map_array_anytype", required = false)
@Valid
public Map<String, List<Object>> getMapArrayAnytype() { public Map<String, List<Object>> getMapArrayAnytype() {
return mapArrayAnytype; return mapArrayAnytype;
} }
@@ -251,10 +245,8 @@ public class AdditionalPropertiesClass {
* Get mapMapString * Get mapMapString
* @return mapMapString * @return mapMapString
*/ */
@Schema(name = "mapMapString", defaultValue = "") @Valid
@Schema(name = "map_map_string", required = false)
@Valid
public Map<String, Map<String, String>> getMapMapString() { public Map<String, Map<String, String>> getMapMapString() {
return mapMapString; return mapMapString;
} }
@@ -280,10 +272,8 @@ public class AdditionalPropertiesClass {
* Get mapMapAnytype * Get mapMapAnytype
* @return mapMapAnytype * @return mapMapAnytype
*/ */
@Schema(name = "mapMapAnytype", defaultValue = "") @Valid
@Schema(name = "map_map_anytype", required = false)
@Valid
public Map<String, Map<String, Object>> getMapMapAnytype() { public Map<String, Map<String, Object>> getMapMapAnytype() {
return mapMapAnytype; return mapMapAnytype;
} }
@@ -301,9 +291,8 @@ public class AdditionalPropertiesClass {
* Get anytype1 * Get anytype1
* @return anytype1 * @return anytype1
*/ */
@Schema(name = "anytype1", defaultValue = "")
@Schema(name = "anytype_1", required = false)
public Object getAnytype1() { public Object getAnytype1() {
return anytype1; return anytype1;
} }
@@ -321,9 +310,8 @@ public class AdditionalPropertiesClass {
* Get anytype2 * Get anytype2
* @return anytype2 * @return anytype2
*/ */
@Schema(name = "anytype2", defaultValue = "")
@Schema(name = "anytype_2", required = false)
public Object getAnytype2() { public Object getAnytype2() {
return anytype2; return anytype2;
} }
@@ -341,9 +329,8 @@ public class AdditionalPropertiesClass {
* Get anytype3 * Get anytype3
* @return anytype3 * @return anytype3
*/ */
@Schema(name = "anytype3", defaultValue = "")
@Schema(name = "anytype_3", required = false)
public Object getAnytype3() { public Object getAnytype3() {
return anytype3; return anytype3;
} }
@@ -352,7 +339,6 @@ public class AdditionalPropertiesClass {
this.anytype3 = anytype3; this.anytype3 = anytype3;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -384,7 +370,6 @@ public class AdditionalPropertiesClass {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesClass {\n"); sb.append("class AdditionalPropertiesClass {\n");
sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n");
sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n");
sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n");

View File

@@ -14,12 +14,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* AdditionalPropertiesInteger * AdditionalPropertiesInteger
*/ */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class AdditionalPropertiesInteger extends HashMap<String, Integer> { public class AdditionalPropertiesInteger extends HashMap<String, Integer> {
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
@@ -32,9 +35,8 @@ public class AdditionalPropertiesInteger extends HashMap<String, Integer> {
* Get name * Get name
* @return name * @return name
*/ */
@Schema(name = "name", defaultValue = "")
@Schema(name = "name", required = false)
public String getName() { public String getName() {
return name; return name;
} }
@@ -43,7 +45,6 @@ public class AdditionalPropertiesInteger extends HashMap<String, Integer> {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {

View File

@@ -15,12 +15,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* AdditionalPropertiesNumber * AdditionalPropertiesNumber
*/ */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> { public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> {
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
@@ -33,9 +36,8 @@ public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> {
* Get name * Get name
* @return name * @return name
*/ */
@Schema(name = "name", defaultValue = "")
@Schema(name = "name", required = false)
public String getName() { public String getName() {
return name; return name;
} }
@@ -44,7 +46,6 @@ public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {

View File

@@ -14,12 +14,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* AdditionalPropertiesObject * AdditionalPropertiesObject
*/ */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class AdditionalPropertiesObject extends HashMap<String, Map> { public class AdditionalPropertiesObject extends HashMap<String, Map> {
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
@@ -32,9 +35,8 @@ public class AdditionalPropertiesObject extends HashMap<String, Map> {
* Get name * Get name
* @return name * @return name
*/ */
@Schema(name = "name", defaultValue = "")
@Schema(name = "name", required = false)
public String getName() { public String getName() {
return name; return name;
} }
@@ -43,7 +45,6 @@ public class AdditionalPropertiesObject extends HashMap<String, Map> {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {

View File

@@ -14,12 +14,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* AdditionalPropertiesString * AdditionalPropertiesString
*/ */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class AdditionalPropertiesString extends HashMap<String, String> { public class AdditionalPropertiesString extends HashMap<String, String> {
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
@@ -32,9 +35,8 @@ public class AdditionalPropertiesString extends HashMap<String, String> {
* Get name * Get name
* @return name * @return name
*/ */
@Schema(name = "name", defaultValue = "")
@Schema(name = "name", required = false)
public String getName() { public String getName() {
return name; return name;
} }
@@ -43,7 +45,6 @@ public class AdditionalPropertiesString extends HashMap<String, String> {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {

View File

@@ -14,19 +14,21 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* Animal * Animal
*/ */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
@JsonSubTypes({ @JsonSubTypes({
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
@JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"),
@JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"),
}) })
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class Animal { public class Animal {
@JsonProperty("className") @JsonProperty("className")
private String className; private String className;
@@ -42,10 +44,8 @@ public class Animal {
* Get className * Get className
* @return className * @return className
*/ */
@Schema(name = "className", required = true, defaultValue = "") @NotNull
@NotNull @Schema(name = "className", required = true)
public String getClassName() { public String getClassName() {
return className; return className;
} }
@@ -63,9 +63,8 @@ public class Animal {
* Get color * Get color
* @return color * @return color
*/ */
@Schema(name = "color", defaultValue = "")
@Schema(name = "color", required = false)
public String getColor() { public String getColor() {
return color; return color;
} }
@@ -74,7 +73,6 @@ public class Animal {
this.color = color; this.color = color;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -97,7 +95,6 @@ public class Animal {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Animal {\n"); sb.append("class Animal {\n");
sb.append(" className: ").append(toIndentedString(className)).append("\n"); sb.append(" className: ").append(toIndentedString(className)).append("\n");
sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n");
sb.append("}"); sb.append("}");

View File

@@ -15,12 +15,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* ArrayOfArrayOfNumberOnly * ArrayOfArrayOfNumberOnly
*/ */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class ArrayOfArrayOfNumberOnly { public class ArrayOfArrayOfNumberOnly {
@JsonProperty("ArrayArrayNumber") @JsonProperty("ArrayArrayNumber")
@Valid @Valid
private List<List<BigDecimal>> arrayArrayNumber = null; private List<List<BigDecimal>> arrayArrayNumber = null;
@@ -42,10 +45,8 @@ public class ArrayOfArrayOfNumberOnly {
* Get arrayArrayNumber * Get arrayArrayNumber
* @return arrayArrayNumber * @return arrayArrayNumber
*/ */
@Schema(name = "arrayArrayNumber", defaultValue = "") @Valid
@Schema(name = "ArrayArrayNumber", required = false)
@Valid
public List<List<BigDecimal>> getArrayArrayNumber() { public List<List<BigDecimal>> getArrayArrayNumber() {
return arrayArrayNumber; return arrayArrayNumber;
} }
@@ -54,7 +55,6 @@ public class ArrayOfArrayOfNumberOnly {
this.arrayArrayNumber = arrayArrayNumber; this.arrayArrayNumber = arrayArrayNumber;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -76,7 +76,6 @@ public class ArrayOfArrayOfNumberOnly {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class ArrayOfArrayOfNumberOnly {\n"); sb.append("class ArrayOfArrayOfNumberOnly {\n");
sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();

View File

@@ -15,12 +15,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* ArrayOfNumberOnly * ArrayOfNumberOnly
*/ */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class ArrayOfNumberOnly { public class ArrayOfNumberOnly {
@JsonProperty("ArrayNumber") @JsonProperty("ArrayNumber")
@Valid @Valid
private List<BigDecimal> arrayNumber = null; private List<BigDecimal> arrayNumber = null;
@@ -42,10 +45,8 @@ public class ArrayOfNumberOnly {
* Get arrayNumber * Get arrayNumber
* @return arrayNumber * @return arrayNumber
*/ */
@Schema(name = "arrayNumber", defaultValue = "") @Valid
@Schema(name = "ArrayNumber", required = false)
@Valid
public List<BigDecimal> getArrayNumber() { public List<BigDecimal> getArrayNumber() {
return arrayNumber; return arrayNumber;
} }
@@ -54,7 +55,6 @@ public class ArrayOfNumberOnly {
this.arrayNumber = arrayNumber; this.arrayNumber = arrayNumber;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -76,7 +76,6 @@ public class ArrayOfNumberOnly {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class ArrayOfNumberOnly {\n"); sb.append("class ArrayOfNumberOnly {\n");
sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();

View File

@@ -15,12 +15,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* ArrayTest * ArrayTest
*/ */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class ArrayTest { public class ArrayTest {
@JsonProperty("array_of_string") @JsonProperty("array_of_string")
@Valid @Valid
private List<String> arrayOfString = null; private List<String> arrayOfString = null;
@@ -50,9 +53,8 @@ public class ArrayTest {
* Get arrayOfString * Get arrayOfString
* @return arrayOfString * @return arrayOfString
*/ */
@Schema(name = "arrayOfString", defaultValue = "")
@Schema(name = "array_of_string", required = false)
public List<String> getArrayOfString() { public List<String> getArrayOfString() {
return arrayOfString; return arrayOfString;
} }
@@ -78,10 +80,8 @@ public class ArrayTest {
* Get arrayArrayOfInteger * Get arrayArrayOfInteger
* @return arrayArrayOfInteger * @return arrayArrayOfInteger
*/ */
@Schema(name = "arrayArrayOfInteger", defaultValue = "") @Valid
@Schema(name = "array_array_of_integer", required = false)
@Valid
public List<List<Long>> getArrayArrayOfInteger() { public List<List<Long>> getArrayArrayOfInteger() {
return arrayArrayOfInteger; return arrayArrayOfInteger;
} }
@@ -107,10 +107,8 @@ public class ArrayTest {
* Get arrayArrayOfModel * Get arrayArrayOfModel
* @return arrayArrayOfModel * @return arrayArrayOfModel
*/ */
@Schema(name = "arrayArrayOfModel", defaultValue = "") @Valid
@Schema(name = "array_array_of_model", required = false)
@Valid
public List<List<ReadOnlyFirst>> getArrayArrayOfModel() { public List<List<ReadOnlyFirst>> getArrayArrayOfModel() {
return arrayArrayOfModel; return arrayArrayOfModel;
} }
@@ -119,7 +117,6 @@ public class ArrayTest {
this.arrayArrayOfModel = arrayArrayOfModel; this.arrayArrayOfModel = arrayArrayOfModel;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -143,7 +140,6 @@ public class ArrayTest {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class ArrayTest {\n"); sb.append("class ArrayTest {\n");
sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n");
sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n");
sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n");

View File

@@ -15,12 +15,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* BigCat * BigCat
*/ */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class BigCat extends Cat { public class BigCat extends Cat {
/** /**
* Gets or Sets kind * Gets or Sets kind
*/ */
@@ -72,9 +75,8 @@ public class BigCat extends Cat {
* Get kind * Get kind
* @return kind * @return kind
*/ */
@Schema(name = "kind", defaultValue = "")
@Schema(name = "kind", required = false)
public KindEnum getKind() { public KindEnum getKind() {
return kind; return kind;
} }
@@ -83,7 +85,6 @@ public class BigCat extends Cat {
this.kind = kind; this.kind = kind;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {

View File

@@ -13,12 +13,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* BigCatAllOf * BigCatAllOf
*/ */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class BigCatAllOf { public class BigCatAllOf {
/** /**
* Gets or Sets kind * Gets or Sets kind
*/ */
@@ -70,9 +73,8 @@ public class BigCatAllOf {
* Get kind * Get kind
* @return kind * @return kind
*/ */
@Schema(name = "kind", defaultValue = "")
@Schema(name = "kind", required = false)
public KindEnum getKind() { public KindEnum getKind() {
return kind; return kind;
} }
@@ -81,7 +83,6 @@ public class BigCatAllOf {
this.kind = kind; this.kind = kind;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -103,7 +104,6 @@ public class BigCatAllOf {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class BigCatAllOf {\n"); sb.append("class BigCatAllOf {\n");
sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();

View File

@@ -12,12 +12,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* Capitalization * Capitalization
*/ */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class Capitalization { public class Capitalization {
@JsonProperty("smallCamel") @JsonProperty("smallCamel")
private String smallCamel; private String smallCamel;
@@ -45,9 +48,8 @@ public class Capitalization {
* Get smallCamel * Get smallCamel
* @return smallCamel * @return smallCamel
*/ */
@Schema(name = "smallCamel", defaultValue = "")
@Schema(name = "smallCamel", required = false)
public String getSmallCamel() { public String getSmallCamel() {
return smallCamel; return smallCamel;
} }
@@ -65,9 +67,8 @@ public class Capitalization {
* Get capitalCamel * Get capitalCamel
* @return capitalCamel * @return capitalCamel
*/ */
@Schema(name = "capitalCamel", defaultValue = "")
@Schema(name = "CapitalCamel", required = false)
public String getCapitalCamel() { public String getCapitalCamel() {
return capitalCamel; return capitalCamel;
} }
@@ -85,9 +86,8 @@ public class Capitalization {
* Get smallSnake * Get smallSnake
* @return smallSnake * @return smallSnake
*/ */
@Schema(name = "smallSnake", defaultValue = "")
@Schema(name = "small_Snake", required = false)
public String getSmallSnake() { public String getSmallSnake() {
return smallSnake; return smallSnake;
} }
@@ -105,9 +105,8 @@ public class Capitalization {
* Get capitalSnake * Get capitalSnake
* @return capitalSnake * @return capitalSnake
*/ */
@Schema(name = "capitalSnake", defaultValue = "")
@Schema(name = "Capital_Snake", required = false)
public String getCapitalSnake() { public String getCapitalSnake() {
return capitalSnake; return capitalSnake;
} }
@@ -125,9 +124,8 @@ public class Capitalization {
* Get scAETHFlowPoints * Get scAETHFlowPoints
* @return scAETHFlowPoints * @return scAETHFlowPoints
*/ */
@Schema(name = "scAETHFlowPoints", defaultValue = "")
@Schema(name = "SCA_ETH_Flow_Points", required = false)
public String getScAETHFlowPoints() { public String getScAETHFlowPoints() {
return scAETHFlowPoints; return scAETHFlowPoints;
} }
@@ -145,9 +143,8 @@ public class Capitalization {
* Name of the pet * Name of the pet
* @return ATT_NAME * @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() { public String getATTNAME() {
return ATT_NAME; return ATT_NAME;
} }
@@ -156,7 +153,6 @@ public class Capitalization {
this.ATT_NAME = ATT_NAME; this.ATT_NAME = ATT_NAME;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -183,7 +179,6 @@ public class Capitalization {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Capitalization {\n"); sb.append("class Capitalization {\n");
sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n");
sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n");
sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n");

View File

@@ -14,12 +14,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* Cat * Cat
*/ */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class Cat extends Animal { public class Cat extends Animal {
@JsonProperty("declawed") @JsonProperty("declawed")
private Boolean declawed; private Boolean declawed;
@@ -32,9 +35,8 @@ public class Cat extends Animal {
* Get declawed * Get declawed
* @return declawed * @return declawed
*/ */
@Schema(name = "declawed", defaultValue = "")
@Schema(name = "declawed", required = false)
public Boolean getDeclawed() { public Boolean getDeclawed() {
return declawed; return declawed;
} }
@@ -43,7 +45,6 @@ public class Cat extends Animal {
this.declawed = declawed; this.declawed = declawed;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {

View File

@@ -12,12 +12,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* CatAllOf * CatAllOf
*/ */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class CatAllOf { public class CatAllOf {
@JsonProperty("declawed") @JsonProperty("declawed")
private Boolean declawed; private Boolean declawed;
@@ -30,9 +33,8 @@ public class CatAllOf {
* Get declawed * Get declawed
* @return declawed * @return declawed
*/ */
@Schema(name = "declawed", defaultValue = "")
@Schema(name = "declawed", required = false)
public Boolean getDeclawed() { public Boolean getDeclawed() {
return declawed; return declawed;
} }
@@ -41,7 +43,6 @@ public class CatAllOf {
this.declawed = declawed; this.declawed = declawed;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -63,7 +64,6 @@ public class CatAllOf {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class CatAllOf {\n"); sb.append("class CatAllOf {\n");
sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();

View File

@@ -12,12 +12,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* Category * Category
*/ */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class Category { public class Category {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@@ -33,9 +36,8 @@ public class Category {
* Get id * Get id
* @return id * @return id
*/ */
@Schema(name = "id", defaultValue = "")
@Schema(name = "id", required = false)
public Long getId() { public Long getId() {
return id; return id;
} }
@@ -53,10 +55,8 @@ public class Category {
* Get name * Get name
* @return name * @return name
*/ */
@Schema(name = "name", required = true, defaultValue = "") @NotNull
@NotNull @Schema(name = "name", required = true)
public String getName() { public String getName() {
return name; return name;
} }
@@ -65,7 +65,6 @@ public class Category {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -88,7 +87,6 @@ public class Category {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Category {\n"); sb.append("class Category {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}"); sb.append("}");

View File

@@ -12,13 +12,16 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* Model for testing model with \&quot;_class\&quot; property * Model for testing model with \&quot;_class\&quot; 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 { public class ClassModel {
@JsonProperty("_class") @JsonProperty("_class")
private String propertyClass; private String propertyClass;
@@ -31,9 +34,8 @@ public class ClassModel {
* Get propertyClass * Get propertyClass
* @return propertyClass * @return propertyClass
*/ */
@Schema(name = "propertyClass", defaultValue = "")
@Schema(name = "_class", required = false)
public String getPropertyClass() { public String getPropertyClass() {
return propertyClass; return propertyClass;
} }
@@ -42,7 +44,6 @@ public class ClassModel {
this.propertyClass = propertyClass; this.propertyClass = propertyClass;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -64,7 +65,6 @@ public class ClassModel {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class ClassModel {\n"); sb.append("class ClassModel {\n");
sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();

View File

@@ -12,12 +12,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* Client * Client
*/ */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class Client { public class Client {
@JsonProperty("client") @JsonProperty("client")
private String client; private String client;
@@ -30,9 +33,8 @@ public class Client {
* Get client * Get client
* @return client * @return client
*/ */
@Schema(name = "client", defaultValue = "")
@Schema(name = "client", required = false)
public String getClient() { public String getClient() {
return client; return client;
} }
@@ -41,7 +43,6 @@ public class Client {
this.client = client; this.client = client;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -63,7 +64,6 @@ public class Client {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class Client {\n"); sb.append("class Client {\n");
sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append(" client: ").append(toIndentedString(client)).append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();

View File

@@ -14,12 +14,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* Dog * Dog
*/ */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class Dog extends Animal { public class Dog extends Animal {
@JsonProperty("breed") @JsonProperty("breed")
private String breed; private String breed;
@@ -32,9 +35,8 @@ public class Dog extends Animal {
* Get breed * Get breed
* @return breed * @return breed
*/ */
@Schema(name = "breed", defaultValue = "")
@Schema(name = "breed", required = false)
public String getBreed() { public String getBreed() {
return breed; return breed;
} }
@@ -43,7 +45,6 @@ public class Dog extends Animal {
this.breed = breed; this.breed = breed;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {

View File

@@ -12,12 +12,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*; import java.util.*;
import javax.annotation.Generated;
/** /**
* DogAllOf * DogAllOf
*/ */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class DogAllOf { public class DogAllOf {
@JsonProperty("breed") @JsonProperty("breed")
private String breed; private String breed;
@@ -30,9 +33,8 @@ public class DogAllOf {
* Get breed * Get breed
* @return breed * @return breed
*/ */
@Schema(name = "breed", defaultValue = "")
@Schema(name = "breed", required = false)
public String getBreed() { public String getBreed() {
return breed; return breed;
} }
@@ -41,7 +43,6 @@ public class DogAllOf {
this.breed = breed; this.breed = breed;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@@ -63,7 +64,6 @@ public class DogAllOf {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class DogAllOf {\n"); sb.append("class DogAllOf {\n");
sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();

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