diff --git a/docs/generators/spring.md b/docs/generators/spring.md index 5515eaae9bc5..8f834fdf27dd 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -45,6 +45,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| |modelPackage|package for generated models| |org.openapitools.model| +|oas3|Use OAS 3 Swagger annotations instead of OAS 2 annotations| |false| |openApiNullable|Enable OpenAPI Jackson Nullable library| |true| |parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| @@ -69,6 +70,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |unhandledException|Declare operation methods to throw a generic exception and allow unhandled exceptions (useful for Spring `@ControllerAdvice` directives).| |false| |useBeanValidation|Use BeanValidation API annotations| |true| |useOptional|Use Optional container for optional parameters| |false| +|useSpringController|Annotate the generated API as a Spring Controller| |false| |useTags|use tags for creating interface and controller classnames| |false| |virtualService|Generates the virtual service. For more details refer - https://github.com/virtualansoftware/virtualan/wiki| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index c0bc8e7cf429..df5de0c1c90a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -89,6 +89,8 @@ public class SpringCodegen extends AbstractJavaCodegen public static final String IMPLICIT_HEADERS = "implicitHeaders"; public static final String OPENAPI_DOCKET_CONFIG = "swaggerDocketConfig"; public static final String API_FIRST = "apiFirst"; + public static final String OAS3 = "oas3"; + public static final String SPRING_CONTROLLER = "useSpringController"; public static final String HATEOAS = "hateoas"; public static final String RETURN_SUCCESS_CODE = "returnSuccessCode"; public static final String UNHANDLED_EXCEPTION_HANDLING = "unhandledException"; @@ -119,6 +121,8 @@ public class SpringCodegen extends AbstractJavaCodegen protected boolean hateoas = false; protected boolean returnSuccessCode = false; protected boolean unhandledException = false; + protected boolean useSpringController = false; + protected boolean oas3 = false; public SpringCodegen() { super(); @@ -194,6 +198,8 @@ public class SpringCodegen extends AbstractJavaCodegen CliOption.newBoolean(HATEOAS, "Use Spring HATEOAS library to allow adding HATEOAS links", hateoas)); cliOptions .add(CliOption.newBoolean(RETURN_SUCCESS_CODE, "Generated server returns 2xx code", returnSuccessCode)); + cliOptions.add(CliOption.newBoolean(OAS3, "Use OAS 3 Swagger annotations instead of OAS 2 annotations", oas3)); + cliOptions.add(CliOption.newBoolean(SPRING_CONTROLLER, "Annotate the generated API as a Spring Controller", useSpringController)); cliOptions.add(CliOption.newBoolean(UNHANDLED_EXCEPTION_HANDLING, "Declare operation methods to throw a generic exception and allow unhandled exceptions (useful for Spring `@ControllerAdvice` directives).", unhandledException)); @@ -360,6 +366,16 @@ public class SpringCodegen extends AbstractJavaCodegen this.setHateoas(Boolean.parseBoolean(additionalProperties.get(HATEOAS).toString())); } + if (additionalProperties.containsKey(SPRING_CONTROLLER)) { + this.setUseSpringController(convertPropertyToBoolean(SPRING_CONTROLLER)); + } + writePropertyBack(SPRING_CONTROLLER, useSpringController); + + if (additionalProperties.containsKey(OAS3)) { + this.setOas3(convertPropertyToBoolean(OAS3)); + } + writePropertyBack(OAS3, oas3); + if (additionalProperties.containsKey(RETURN_SUCCESS_CODE)) { this.setReturnSuccessCode(Boolean.parseBoolean(additionalProperties.get(RETURN_SUCCESS_CODE).toString())); } @@ -496,9 +512,14 @@ public class SpringCodegen extends AbstractJavaCodegen additionalProperties.put(RESPONSE_WRAPPER, "Callable"); } - if (!apiFirst && !reactive) { + // Springfox cannot be used with oas3 or apiFirst or reactive. So, write the property back after determining + // whether it should be enabled or not. + boolean useSpringFox = false; + if (!apiFirst && !reactive && !oas3) { + useSpringFox = true; additionalProperties.put("useSpringfox", true); } + writePropertyBack("useSpringfox", useSpringFox); // Some well-known Spring or Spring-Cloud response wrappers if (isNotEmpty(responseWrapper)) { @@ -854,6 +875,14 @@ public class SpringCodegen extends AbstractJavaCodegen this.hateoas = hateoas; } + public void setUseSpringController(boolean useSpringController) { + this.useSpringController = useSpringController; + } + + public void setOas3(boolean oas3) { + this.oas3 = oas3; + } + public void setReturnSuccessCode(boolean returnSuccessCode) { this.returnSuccessCode = returnSuccessCode; } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache index 63cbcb0dd31f..6647b5f084e5 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache @@ -7,7 +7,19 @@ package {{package}}; {{#imports}}import {{import}}; {{/imports}} +{{#oas3}} +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.parameters.RequestBody; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +{{/oas3}} +{{^oas3}} import io.swagger.annotations.*; +{{/oas3}} {{#jdk8-no-delegate}} {{#virtualService}} import io.virtualan.annotation.ApiVirtual; @@ -20,6 +32,9 @@ import org.springframework.http.ResponseEntity; {{#useBeanValidation}} import org.springframework.validation.annotation.Validated; {{/useBeanValidation}} +{{#useSpringController}} +import org.springframework.stereotype.Controller; +{{/useSpringController}} import org.springframework.web.bind.annotation.*; {{#jdk8-no-delegate}} {{^reactive}} @@ -55,7 +70,10 @@ import java.util.concurrent.{{^jdk8}}Callable{{/jdk8}}{{#jdk8}}CompletableFuture {{#useBeanValidation}} @Validated {{/useBeanValidation}} -@Api(value = "{{{baseName}}}", description = "the {{{baseName}}} API") +{{#useSpringController}} +@Controller +{{/useSpringController}} +{{#oas3}}@Tag(name = "{{{baseName}}}", description = "the {{{baseName}}} API"){{/oas3}}{{^oas3}}@Api(value = "{{{baseName}}}", description = "the {{{baseName}}} API"){{/oas3}} {{#operations}} {{#virtualService}} @VirtualService @@ -101,6 +119,10 @@ public interface {{classname}} { {{#virtualService}} @ApiVirtual {{/virtualService}} + {{#oas3}} + @Operation(summary = "{{{summary}}}", tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} }, responses = { {{#responses}} @ApiResponse(responseCode = "{{{code}}}", description = "{{{message}}}"{{#baseType}}, content = @Content(mediaType = "application/json", schema = @Schema(implementation = {{{baseType}}}.class)){{/baseType}}){{^-last}},{{/-last}}{{/responses}} }{{#hasAuthMethods}},security = { + {{#authMethods}}@SecurityRequirement(name = "{{name}}"{{#isOAuth}}, scopes={ {{#scopes}}"{{scope}}"{{^-last}}, {{/-last}}{{/scopes}} }{{/isOAuth}}){{^-last}},{{/-last}}{{/authMethods}} } {{/hasAuthMethods}}) + {{/oas3}}{{^oas3}} @ApiOperation(value = "{{{summary}}}", nickname = "{{{operationId}}}", notes = "{{{notes}}}"{{#returnBaseType}}, response = {{{.}}}.class{{/returnBaseType}}{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { {{#authMethods}}{{#isOAuth}}@Authorization(value = "{{name}}", scopes = { {{#scopes}}@AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}}, @@ -108,9 +130,16 @@ public interface {{classname}} { {{^isOAuth}}@Authorization(value = "{{name}}"){{^-last}},{{/-last}} {{/isOAuth}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} }) @ApiResponses(value = { {{#responses}} + @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{.}}}.class{{/baseType}}{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} }) + {{/oas3}} {{#implicitHeaders}} + {{#oas3}} + @Parameters({ + {{/oas3}} + {{^oas3}} @ApiImplicitParams({ + {{/oas3}} {{#headerParams}} {{>implicitHeader}} {{/headerParams}} @@ -124,13 +153,13 @@ public interface {{classname}} { produces = { {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }{{/hasProduces}}{{#hasConsumes}}, consumes = { {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }{{/hasConsumes}}{{/singleContentTypes}} ) - {{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{#delegate-method}}_{{/delegate-method}}{{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}},{{/-last}}{{#-last}}{{#reactive}}, {{/reactive}}{{/-last}}{{/allParams}}{{#reactive}}@springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}}{{#unhandledException}} throws Exception{{/unhandledException}} { + {{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{#delegate-method}}_{{/delegate-method}}{{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}},{{/-last}}{{#-last}}{{#reactive}}, {{/reactive}}{{/-last}}{{/allParams}}{{#reactive}}{{#oas3}}@Hidden{{/oas3}}{{^oas3}}@springfox.documentation.annotations.ApiIgnore{{/oas3}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, {{#oas3}}@Hidden{{/oas3}}{{^oas3}}@springfox.documentation.annotations.ApiIgnore{{/oas3}} final org.springframework.data.domain.Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}}{{#unhandledException}} throws Exception{{/unhandledException}} { {{#delegate-method}} return {{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, pageable{{/vendorExtensions.x-spring-paginated}}); } // Override this method - {{#jdk8-default-interface}}default {{/jdk8-default-interface}} {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}@springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}} { + {{#jdk8-default-interface}}default {{/jdk8-default-interface}} {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}{{#oas3}}@Hidden{{/oas3}}{{^oas3}}@springfox.documentation.annotations.ApiIgnore{{/oas3}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, {{#oas3}}@Hidden{{/oas3}}{{^oas3}}@springfox.documentation.annotations.ApiIgnore{{/oas3}} final org.springframework.data.domain.Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}} { {{/delegate-method}} {{^isDelegate}} {{>methodBody}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/bodyParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/bodyParams.mustache index 985dee6fd2d9..7500b53a1bd1 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/bodyParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/bodyParams.mustache @@ -1 +1 @@ -{{#isBodyParam}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{^isContainer}}{{#allowableValues}}, allowableValues = "{{{.}}}"{{/allowableValues}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}){{#useBeanValidation}} @Valid{{/useBeanValidation}} @RequestBody{{^required}}(required = false){{/required}} {{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}} {{paramName}}{{/isBodyParam}} \ No newline at end of file +{{#isBodyParam}}{{#oas3}}@Parameter(name ={{/oas3}}{{^oas3}}@ApiParam(value ={{/oas3}} "{{{description}}}"{{#required}}, required = true{{/required}} {{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}{{#allowableValues}}, {{#oas3}}schema = @Schema({{/oas3}}allowableValues = "{{{.}}}"{{#oas3}}){{/oas3}}{{/allowableValues}}) {{#useBeanValidation}} @Valid{{/useBeanValidation}} @RequestBody{{^required}}(required = false){{/required}} {{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}} {{paramName}}{{/isBodyParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/cookieParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/cookieParams.mustache index 18dde87c9883..d6bded4b731a 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/cookieParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/cookieParams.mustache @@ -1 +1 @@ -{{#isCookieParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#enumVars}}{{#lambdaEscapeDoubleQuote}}{{{value}}}{{/lambdaEscapeDoubleQuote}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/enumVars}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}) @CookieValue("{{baseName}}") {{>optionalDataType}} {{paramName}}{{/isCookieParam}} \ No newline at end of file +{{#isCookieParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{#oas3}}@Parameter(name = "{{{baseName}}}", description = {{/oas3}}{{^oas3}}@ApiParam(value = {{/oas3}}"{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#enumVars}}{{#lambdaEscapeDoubleQuote}}{{{value}}}{{/lambdaEscapeDoubleQuote}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/enumVars}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}) @CookieValue("{{baseName}}") {{>optionalDataType}} {{paramName}}{{/isCookieParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache index 387e4c30c860..3e5fd7ae4094 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache @@ -1,5 +1,6 @@ {{#jackson}} import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; {{/jackson}} /** diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/formParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/formParams.mustache index 57bd6b555f5e..78df4981339e 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/formParams.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}@ApiParam(value = "{{{description}}}") {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{#isArray}}List<{{/isArray}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{baseName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isFile}}{{#oas3}}@Parameter(name = "{{{baseName}}}", description = {{/oas3}}{{^oas3}}@ApiParam(value = {{/oas3}}"{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}{{#oas3}}@Parameter(name = "{{{baseName}}}", description = {{/oas3}}{{^oas3}}@ApiParam(value = {{/oas3}}"{{{description}}}") {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{#isArray}}List<{{/isArray}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{baseName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/headerParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/headerParams.mustache index bfee41347652..4b10916d66d4 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/headerParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/headerParams.mustache @@ -1 +1 @@ -{{#isHeaderParam}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}) @RequestHeader(value = "{{baseName}}", required = {{#required}}true{{/required}}{{^required}}false{{/required}}) {{>optionalDataType}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}{{#oas3}}@Parameter(description ={{/oas3}}{{^oas3}}@ApiParam(value ={{/oas3}} "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}) @RequestHeader(value = "{{baseName}}", required = {{#required}}true{{/required}}{{^required}}false{{/required}}) {{>optionalDataType}} {{paramName}}{{/isHeaderParam}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache index 58b6e67d34cf..2f75d1c0f63b 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache @@ -114,11 +114,20 @@ swagger-ui 3.14.2 + {{#oas3}} + + io.swagger.core.v3 + swagger-annotations + 2.1.2 + + {{/oas3}} + {{^oas3}} io.swagger swagger-annotations 1.5.14 + {{/oas3}} com.google.code.findbugs diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/formParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/formParams.mustache index 1be37a65d96b..ac337fecf6a8 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/formParams.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}} {{#allowableValues}}, allowableValues="{{{.}}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}{{/isContainer}}) @RequestParam(value="{{baseName}}"{{#required}}, required=true{{/required}}{{^required}}, required=false{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}@ApiParam(value = "{{{description}}}") @RequestParam("{{baseName}}") {{#isArray}}List<{{/isArray}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{paramName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isFile}}{{#oas3}}@Parameter(name = "{{{baseName}}}", description = {{/oas3}}{{^oas3}}@ApiParam(value = {{/oas3}}"{{{description}}}"{{#required}}, required=true{{/required}} {{#allowableValues}}, allowableValues="{{{.}}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}{{/isContainer}}) @RequestParam(value="{{baseName}}"{{#required}}, required=true{{/required}}{{^required}}, required=false{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}{{#oas3}}@Parameter(name = "{{{baseName}}}", description = {{/oas3}}{{^oas3}}@ApiParam(value = {{/oas3}}"{{{description}}}") @RequestParam("{{baseName}}") {{#isArray}}List<{{/isArray}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{paramName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache index 80453821f545..1636e5918366 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache @@ -44,6 +44,14 @@ {{/parentOverridden}} + {{#oas3}} + + io.swagger.core.v3 + swagger-annotations + 2.1.2 + + {{/oas3}} + {{^oas3}} io.swagger swagger-annotations @@ -51,6 +59,7 @@ ${swagger-core-version} {{/parentOverridden}} + {{/oas3}} com.google.code.findbugs diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache index 7179f1abe40c..909113d70139 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache @@ -183,11 +183,20 @@ swagger-ui 3.14.2 + {{#oas3}} + + io.swagger.core.v3 + swagger-annotations + 2.1.2 + + {{/oas3}} + {{^oas3}} io.swagger swagger-annotations 1.5.14 + {{/oas3}} com.google.code.findbugs diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache index 78c3c9ae19d4..05eb15e10545 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache @@ -1,5 +1,6 @@ package {{package}}; +import java.net.URI; import java.util.Objects; {{#imports}}import {{import}}; {{/imports}} @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; {{#serializableModel}} import java.io.Serializable; {{/serializableModel}} +{{#jdk8}} +import java.time.OffsetDateTime; +{{/jdk8}} {{#useBeanValidation}} import javax.validation.Valid; import javax.validation.constraints.*; @@ -22,6 +26,10 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; {{/withXml}} {{/jackson}} +{{#oas3}} +import io.swagger.v3.oas.annotations.media.Schema; +{{/oas3}} + {{#withXml}} import javax.xml.bind.annotation.*; {{/withXml}} @@ -31,6 +39,8 @@ import org.springframework.hateoas.RepresentationModel; {{/hateoas}} {{/parent}} +import java.util.*; + {{#models}} {{#model}} {{#isEnum}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pathParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pathParams.mustache index 2596e9df3990..cf75bb92edec 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/pathParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/pathParams.mustache @@ -1 +1 @@ -{{#isPathParam}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#enumVars}}{{#lambdaRemoveDoubleQuote}}{{{value}}}{{/lambdaRemoveDoubleQuote}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/enumVars}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}) @PathVariable("{{baseName}}") {{>optionalDataType}} {{paramName}}{{/isPathParam}} \ No newline at end of file +{{#isPathParam}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}{{#oas3}}@Parameter(name = "{{baseName}}", description ={{/oas3}}{{^oas3}}@ApiParam(value ={{/oas3}} "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#enumVars}}{{#lambdaRemoveDoubleQuote}}{{{value}}}{{/lambdaRemoveDoubleQuote}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/enumVars}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}) @PathVariable("{{baseName}}") {{>optionalDataType}} {{paramName}}{{/isPathParam}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache index 4226edb1170c..a3ebca96ae48 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache @@ -1,7 +1,7 @@ /** * {{description}}{{^description}}{{classname}}{{/description}} */{{#description}} -@ApiModel(description = "{{{.}}}"){{/description}} +{{#oas3}}@Schema({{#name}}name = "{{name}}",{{/name}}{{/oas3}}{{^oas3}}@ApiModel({{/oas3}}description = "{{{.}}}"){{/description}} {{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}}{{>additionalModelTypeAnnotations}} public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#hateoas}}extends RepresentationModel<{{classname}}> {{/hateoas}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { {{#serializableModel}} @@ -112,7 +112,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#ha {{#vendorExtensions.x-extra-annotation}} {{{vendorExtensions.x-extra-annotation}}} {{/vendorExtensions.x-extra-annotation}} - @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}") + {{#oas3}}@Schema({{#name}}name = "{{{name}}}", {{/name}}{{/oas3}}{{^oas3}}@ApiModelProperty({{/oas3}}{{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}{{#oas3}}defaultValue = {{/oas3}}{{^oas3}}value = {{/oas3}}"{{{description}}}") {{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{>nullableDataType}} {{getter}}() { return {{name}}; } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/queryParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/queryParams.mustache index 050d819d635f..557b3ca837a8 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}){{#useBeanValidation}} @Valid{{/useBeanValidation}}{{^isModel}} @RequestParam(value = {{#isMap}}""{{/isMap}}{{^isMap}}"{{baseName}}"{{/isMap}}{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}){{/isModel}}{{#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}} {{>optionalDataType}} {{paramName}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{#oas3}}@Parameter(name = "{{{baseName}}}", description = {{/oas3}}{{^oas3}}@ApiParam(value = {{/oas3}}"{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, {{#oas3}}schema = @Schema({{/oas3}}allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{#oas3}}){{/oas3}}{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}){{#useBeanValidation}} @Valid{{/useBeanValidation}}{{^isModel}} @RequestParam(value = {{#isMap}}""{{/isMap}}{{^isMap}}"{{baseName}}"{{/isMap}}{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}){{/isModel}}{{#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}} {{>optionalDataType}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index 201390db01a1..60fe14bc55c0 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -33,19 +33,23 @@ public interface PetApi { * @param body Pet object that needs to be added to the store (required) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = "application/json" ) - CompletableFuture> addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body); + CompletableFuture> addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); /** @@ -55,18 +59,24 @@ public interface PetApi { * @param apiKey (optional) * @return Invalid pet value (status code 400) */ + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - CompletableFuture> deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey); + CompletableFuture> deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +); /** @@ -77,20 +87,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid status value (status code 400) */ + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = "application/json" ) - CompletableFuture>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status); + CompletableFuture>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +); /** @@ -102,20 +117,25 @@ public interface PetApi { * or Invalid tag value (status code 400) * @deprecated */ + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = "application/json" ) - CompletableFuture>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags); + CompletableFuture>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + +); /** @@ -127,20 +147,26 @@ public interface PetApi { * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = "application/json" ) - CompletableFuture> getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId); + CompletableFuture> getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +); /** @@ -151,21 +177,27 @@ public interface PetApi { * or Pet not found (status code 404) * or Validation exception (status code 405) */ + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = "application/json" ) - CompletableFuture> updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body); + CompletableFuture> updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); /** @@ -176,19 +208,27 @@ public interface PetApi { * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded" ) - CompletableFuture> updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet" ) @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet" ) @RequestParam(value="status", required=false) String status); + CompletableFuture> updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet" ) @RequestParam(value="name", required=false) String name, + +@ApiParam(value = "Updated status of the pet" ) @RequestParam(value="status", required=false) String status); /** @@ -199,12 +239,14 @@ public interface PetApi { * @param file file to upload (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -212,6 +254,12 @@ public interface PetApi { produces = "application/json", consumes = "multipart/form-data" ) - CompletableFuture> uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server" ) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @RequestParam("file") MultipartFile file); + CompletableFuture> uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server" ) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata, + +@ApiParam(value = "file to upload") @RequestParam("file") MultipartFile file); } diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java index 4884db415ac5..0fb9fb455de2 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java @@ -35,15 +35,20 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) - CompletableFuture> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId); + CompletableFuture> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId + +); /** @@ -52,11 +57,13 @@ public interface StoreApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @RequestMapping( method = RequestMethod.GET, @@ -75,17 +82,23 @@ public interface StoreApi { * or Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", produces = "application/json" ) - CompletableFuture> getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId); + CompletableFuture> getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId + +); /** @@ -95,15 +108,20 @@ public interface StoreApi { * @return successful operation (status code 200) * or Invalid Order (status code 400) */ + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = "application/json" ) - CompletableFuture> placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body); + CompletableFuture> placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body); } diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index 32bba7195eec..0f9c95ed0401 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -34,14 +34,18 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) - CompletableFuture> createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body); + CompletableFuture> createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body); /** @@ -50,14 +54,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) - CompletableFuture> createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body); + CompletableFuture> createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); /** @@ -66,14 +74,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) - CompletableFuture> createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body); + CompletableFuture> createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); /** @@ -84,15 +96,20 @@ public interface UserApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - CompletableFuture> deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username); + CompletableFuture> deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +); /** @@ -103,17 +120,23 @@ public interface UserApi { * or Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = "application/json" ) - CompletableFuture> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username); + CompletableFuture> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +); /** @@ -124,16 +147,23 @@ public interface UserApi { * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = "application/json" ) - CompletableFuture> loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password); + CompletableFuture> loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +); /** @@ -141,8 +171,10 @@ public interface UserApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, @@ -160,14 +192,21 @@ public interface UserApi { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - CompletableFuture> updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body); + CompletableFuture> updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body); } diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java index 1114316e27f5..f21d835af4da 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Category.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * A category for a pet */ diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java index 523a64f1874d..ec1b1b81d6a4 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Describes the result of uploading an image resource */ diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java index 12230edbc050..2f24cd46851d 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * An order for a pets from the pet store */ diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java index 1e1b76c7d117..a1f702f1a72f 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.util.List; import org.openapitools.model.Category; import org.openapitools.model.Tag; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * A pet for sale in the pet store */ diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java index 1476aa7d343a..8e3f67322335 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Tag.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * A tag for a pet */ diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java index 8bfae36516d1..73fcf01b5375 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/User.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * A User who is purchasing from the pet store */ diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java new file mode 100644 index 000000000000..471ca645a491 --- /dev/null +++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -0,0 +1,238 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; +import io.swagger.annotations.*; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Api(value = "Pet", description = "the Pet API") +public interface PetApi { + + /** + * POST /pet : Add a new pet to the store + * + * @param body Pet object that needs to be added to the store (required) + * @return Invalid input (status code 405) + */ + + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") }) + }, tags={ "pet", }) + @ApiResponses(value = { + + @ApiResponse(code = 405, message = "Invalid input") }) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet", + consumes = "application/json" + ) + com.netflix.hystrix.HystrixCommand> addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); + + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return Invalid pet value (status code 400) + */ + + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") }) + }, tags={ "pet", }) + @ApiResponses(value = { + + @ApiResponse(code = 400, message = "Invalid pet value") }) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/pet/{petId}" + ) + com.netflix.hystrix.HystrixCommand> deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey); + + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + */ + + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") }) + }, tags={ "pet", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + + @ApiResponse(code = 400, message = "Invalid status value") }) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByStatus", + produces = "application/json" + ) + com.netflix.hystrix.HystrixCommand>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status); + + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + */ + + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") }) + }, tags={ "pet", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + + @ApiResponse(code = 400, message = "Invalid tag value") }) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByTags", + produces = "application/json" + ) + com.netflix.hystrix.HystrixCommand>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags); + + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + */ + + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { + + @Authorization(value = "api_key") + }, tags={ "pet", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + + @ApiResponse(code = 400, message = "Invalid ID supplied"), + + @ApiResponse(code = 404, message = "Pet not found") }) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/{petId}", + produces = "application/json" + ) + com.netflix.hystrix.HystrixCommand> getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId); + + + /** + * PUT /pet : Update an existing pet + * + * @param body Pet object that needs to be added to the store (required) + * @return Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * or Validation exception (status code 405) + */ + + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") }) + }, tags={ "pet", }) + @ApiResponses(value = { + + @ApiResponse(code = 400, message = "Invalid ID supplied"), + + @ApiResponse(code = 404, message = "Pet not found"), + + @ApiResponse(code = 405, message = "Validation exception") }) + @RequestMapping( + method = RequestMethod.PUT, + value = "/pet", + consumes = "application/json" + ) + com.netflix.hystrix.HystrixCommand> updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); + + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + */ + + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") }) + }, tags={ "pet", }) + @ApiResponses(value = { + + @ApiResponse(code = 405, message = "Invalid input") }) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}", + consumes = "application/x-www-form-urlencoded" + ) + com.netflix.hystrix.HystrixCommand> updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet" ) @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet" ) @RequestParam(value="status", required=false) String status); + + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + */ + + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") }) + }, tags={ "pet", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}/uploadImage", + produces = "application/json", + consumes = "multipart/form-data" + ) + com.netflix.hystrix.HystrixCommand> uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server" ) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @RequestParam("file") MultipartFile file); + +} diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/StoreApi.java new file mode 100644 index 000000000000..e03a4fbf787b --- /dev/null +++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,120 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import io.swagger.annotations.*; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Api(value = "Store", description = "the Store API") +public interface StoreApi { + + /** + * DELETE /store/order/{orderId} : Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) + @ApiResponses(value = { + + @ApiResponse(code = 400, message = "Invalid ID supplied"), + + @ApiResponse(code = 404, message = "Order not found") }) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/store/order/{orderId}" + ) + com.netflix.hystrix.HystrixCommand> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId); + + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + */ + + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { + + @Authorization(value = "api_key") + }, tags={ "store", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/inventory", + produces = "application/json" + ) + com.netflix.hystrix.HystrixCommand>> getInventory(); + + + /** + * GET /store/order/{orderId} : Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + + @ApiResponse(code = 400, message = "Invalid ID supplied"), + + @ApiResponse(code = 404, message = "Order not found") }) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/order/{orderId}", + produces = "application/json" + ) + com.netflix.hystrix.HystrixCommand> getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId); + + + /** + * POST /store/order : Place an order for a pet + * + * @param body order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + */ + + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + + @ApiResponse(code = 400, message = "Invalid Order") }) + @RequestMapping( + method = RequestMethod.POST, + value = "/store/order", + produces = "application/json" + ) + com.netflix.hystrix.HystrixCommand> placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body); + +} diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java new file mode 100644 index 000000000000..e928628d6933 --- /dev/null +++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,193 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import java.util.List; +import org.openapitools.model.User; +import io.swagger.annotations.*; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Api(value = "User", description = "the User API") +public interface UserApi { + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param body Created user object (required) + * @return successful operation (status code 200) + */ + + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "successful operation") }) + @RequestMapping( + method = RequestMethod.POST, + value = "/user" + ) + com.netflix.hystrix.HystrixCommand> createUser(@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body); + + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "successful operation") }) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithArray" + ) + com.netflix.hystrix.HystrixCommand> createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); + + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * @param body List of user object (required) + * @return successful operation (status code 200) + */ + + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "successful operation") }) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithList" + ) + com.netflix.hystrix.HystrixCommand> createUsersWithListInput(@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); + + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) + @ApiResponses(value = { + + @ApiResponse(code = 400, message = "Invalid username supplied"), + + @ApiResponse(code = 404, message = "User not found") }) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/user/{username}" + ) + com.netflix.hystrix.HystrixCommand> deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username); + + + /** + * GET /user/{username} : Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "successful operation", response = User.class), + + @ApiResponse(code = 400, message = "Invalid username supplied"), + + @ApiResponse(code = 404, message = "User not found") }) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/{username}", + produces = "application/json" + ) + com.netflix.hystrix.HystrixCommand> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username); + + + /** + * GET /user/login : Logs user into the system + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + */ + + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "successful operation", response = String.class), + + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/login", + produces = "application/json" + ) + com.netflix.hystrix.HystrixCommand> loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password); + + + /** + * GET /user/logout : Logs out current logged in user session + * + * @return successful operation (status code 200) + */ + + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "successful operation") }) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/logout" + ) + com.netflix.hystrix.HystrixCommand> logoutUser(); + + + /** + * PUT /user/{username} : Updated user + * This can only be done by the logged in user. + * + * @param username name that need to be deleted (required) + * @param body Updated user object (required) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + */ + + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) + @ApiResponses(value = { + + @ApiResponse(code = 400, message = "Invalid user supplied"), + + @ApiResponse(code = 404, message = "User not found") }) + @RequestMapping( + method = RequestMethod.PUT, + value = "/user/{username}" + ) + com.netflix.hystrix.HystrixCommand> updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body); + +} diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/model/Category.java new file mode 100644 index 000000000000..e2eb32453384 --- /dev/null +++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/model/Category.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.Valid; +import javax.validation.constraints.*; + + +import java.util.*; + +/** + * A category for a pet + */ +@ApiModel(description = "A category for a pet") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Category { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @ApiModelProperty(value = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Category name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @ApiModelProperty(value = "") + + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Category category = (Category) o; + return Objects.equals(this.id, category.id) && + Objects.equals(this.name, category.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Category {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java new file mode 100644 index 000000000000..2b85999b0175 --- /dev/null +++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -0,0 +1,133 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.Valid; +import javax.validation.constraints.*; + + +import java.util.*; + +/** + * 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") +public class ModelApiResponse { + @JsonProperty("code") + private Integer code; + + @JsonProperty("type") + private String type; + + @JsonProperty("message") + private String message; + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @ApiModelProperty(value = "") + + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @ApiModelProperty(value = "") + + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @ApiModelProperty(value = "") + + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/model/Order.java new file mode 100644 index 000000000000..fe670efa69ec --- /dev/null +++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/model/Order.java @@ -0,0 +1,249 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; + + +import java.util.*; + +/** + * 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") +public class Order { + @JsonProperty("id") + private Long id; + + @JsonProperty("petId") + private Long petId; + + @JsonProperty("quantity") + private Integer quantity; + + @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + @JsonProperty("complete") + private Boolean complete = false; + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @ApiModelProperty(value = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + */ + @ApiModelProperty(value = "") + + + public Long getPetId() { + return petId; + } + + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + @ApiModelProperty(value = "") + + + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + */ + @ApiModelProperty(value = "") + + @Valid + + public OffsetDateTime getShipDate() { + return shipDate; + } + + public void setShipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + */ + @ApiModelProperty(value = "Order Status") + + + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + */ + @ApiModelProperty(value = "") + + + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/model/Pet.java new file mode 100644 index 000000000000..0513ffeb0f36 --- /dev/null +++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/model/Pet.java @@ -0,0 +1,272 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.model.Category; +import org.openapitools.model.Tag; +import javax.validation.Valid; +import javax.validation.constraints.*; + + +import java.util.*; + +/** + * 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") +public class Pet { + @JsonProperty("id") + private Long id; + + @JsonProperty("category") + private Category category; + + @JsonProperty("name") + private String name; + + @JsonProperty("photoUrls") + @Valid + private List photoUrls = new ArrayList<>(); + + @JsonProperty("tags") + @Valid + private List tags = null; + + /** + * pet status in the store + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status; + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @ApiModelProperty(value = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + @ApiModelProperty(value = "") + + @Valid + + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @ApiModelProperty(example = "doggie", required = true, value = "") + @NotNull + + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Pet photoUrls(List photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + if (this.photoUrls == null) { + this.photoUrls = new ArrayList<>(); + } + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + */ + @ApiModelProperty(required = true, value = "") + @NotNull + + + public List getPhotoUrls() { + return photoUrls; + } + + public void setPhotoUrls(List photoUrls) { + this.photoUrls = photoUrls; + } + + public Pet tags(List tags) { + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @ApiModelProperty(value = "") + + @Valid + + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public Pet status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * pet status in the store + * @return status + */ + @ApiModelProperty(value = "pet status in the store") + + + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Pet pet = (Pet) o; + return Objects.equals(this.id, pet.id) && + Objects.equals(this.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/model/Tag.java new file mode 100644 index 000000000000..e067ae023271 --- /dev/null +++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/model/Tag.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.Valid; +import javax.validation.constraints.*; + + +import java.util.*; + +/** + * A tag for a pet + */ +@ApiModel(description = "A tag for a pet") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Tag { + @JsonProperty("id") + private Long id; + + @JsonProperty("name") + private String name; + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @ApiModelProperty(value = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Tag name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @ApiModelProperty(value = "") + + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.id, tag.id) && + Objects.equals(this.name, tag.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/model/User.java new file mode 100644 index 000000000000..062860067243 --- /dev/null +++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,258 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.Valid; +import javax.validation.constraints.*; + + +import java.util.*; + +/** + * 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") +public class User { + @JsonProperty("id") + private Long id; + + @JsonProperty("username") + private String username; + + @JsonProperty("firstName") + private String firstName; + + @JsonProperty("lastName") + private String lastName; + + @JsonProperty("email") + private String email; + + @JsonProperty("password") + private String password; + + @JsonProperty("phone") + private String phone; + + @JsonProperty("userStatus") + private Integer userStatus; + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @ApiModelProperty(value = "") + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + @ApiModelProperty(value = "") + + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + */ + @ApiModelProperty(value = "") + + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + */ + @ApiModelProperty(value = "") + + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @ApiModelProperty(value = "") + + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + @ApiModelProperty(value = "") + + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + */ + @ApiModelProperty(value = "") + + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + */ + @ApiModelProperty(value = "User Status") + + + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index ef3a506138c7..909fe7073e9a 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -32,19 +32,23 @@ public interface PetApi { * @param body Pet object that needs to be added to the store (required) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = "application/json" ) - ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body); + ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); /** @@ -54,18 +58,24 @@ public interface PetApi { * @param apiKey (optional) * @return Invalid pet value (status code 400) */ + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey); + ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +); /** @@ -76,20 +86,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid status value (status code 400) */ + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = "application/json" ) - ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable); + ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable); /** @@ -101,20 +116,25 @@ public interface PetApi { * or Invalid tag value (status code 400) * @deprecated */ + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = "application/json" ) - ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable); + ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + +, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable); /** @@ -126,20 +146,26 @@ public interface PetApi { * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = "application/json" ) - ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId); + ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +); /** @@ -150,21 +176,27 @@ public interface PetApi { * or Pet not found (status code 404) * or Validation exception (status code 405) */ + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = "application/json" ) - ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body); + ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); /** @@ -175,19 +207,27 @@ public interface PetApi { * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded" ) - ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet" ) @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet" ) @RequestParam(value="status", required=false) String status); + ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet" ) @RequestParam(value="name", required=false) String name, + +@ApiParam(value = "Updated status of the pet" ) @RequestParam(value="status", required=false) String status); /** @@ -198,12 +238,14 @@ public interface PetApi { * @param file file to upload (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -211,6 +253,12 @@ public interface PetApi { produces = "application/json", consumes = "multipart/form-data" ) - ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server" ) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @RequestParam("file") MultipartFile file); + ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server" ) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata, + +@ApiParam(value = "file to upload") @RequestParam("file") MultipartFile file); } diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 3c23ac563a3f..6a61280117f1 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -34,15 +34,20 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) - ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId); + ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId + +); /** @@ -51,11 +56,13 @@ public interface StoreApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @RequestMapping( method = RequestMethod.GET, @@ -74,17 +81,23 @@ public interface StoreApi { * or Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", produces = "application/json" ) - ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId); + ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId + +); /** @@ -94,15 +107,20 @@ public interface StoreApi { * @return successful operation (status code 200) * or Invalid Order (status code 400) */ + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = "application/json" ) - ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body); + ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body); } diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index e572a2aa6987..483b0873d51e 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -33,14 +33,18 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) - ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body); + ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body); /** @@ -49,14 +53,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) - ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body); + ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); /** @@ -65,14 +73,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) - ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body); + ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); /** @@ -83,15 +95,20 @@ public interface UserApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username); + ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +); /** @@ -102,17 +119,23 @@ public interface UserApi { * or Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = "application/json" ) - ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username); + ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +); /** @@ -123,16 +146,23 @@ public interface UserApi { * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = "application/json" ) - ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password); + ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +); /** @@ -140,8 +170,10 @@ public interface UserApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, @@ -155,8 +187,10 @@ public interface UserApi { * * @return endpoint configuration response (status code 200) */ + @ApiOperation(value = "logoutUserOptions", nickname = "logoutUserOptions", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "endpoint configuration response") }) @RequestMapping( method = RequestMethod.OPTIONS, @@ -174,14 +208,21 @@ public interface UserApi { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body); + ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body); } diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java index 1114316e27f5..f21d835af4da 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Category.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * A category for a pet */ diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java index 523a64f1874d..ec1b1b81d6a4 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Describes the result of uploading an image resource */ diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java index 12230edbc050..2f24cd46851d 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * An order for a pets from the pet store */ diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java index 1e1b76c7d117..a1f702f1a72f 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.util.List; import org.openapitools.model.Category; import org.openapitools.model.Tag; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * A pet for sale in the pet store */ diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java index 1476aa7d343a..8e3f67322335 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Tag.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * A tag for a pet */ diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java index 8bfae36516d1..73fcf01b5375 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/User.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * A User who is purchasing from the pet store */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 2936b1bc0c89..d98b4e1441f9 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -33,13 +33,16 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", response = Pet.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, @@ -47,7 +50,9 @@ public interface PetApi { produces = "application/json", consumes = "application/json" ) - ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet); + ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet pet); /** @@ -57,18 +62,24 @@ public interface PetApi { * @param apiKey (optional) * @return Invalid pet value (status code 400) */ + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey); + ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +); /** @@ -79,19 +90,24 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid status value (status code 400) */ + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = "application/json" ) - ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status); + ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +); /** @@ -103,19 +119,24 @@ public interface PetApi { * or Invalid tag value (status code 400) * @deprecated */ + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = "application/json" ) - ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags); + ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + +); /** @@ -127,20 +148,26 @@ public interface PetApi { * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = "application/json" ) - ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId); + ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +); /** @@ -152,15 +179,20 @@ public interface PetApi { * or Pet not found (status code 404) * or Validation exception (status code 405) */ + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", response = Pet.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @RequestMapping( method = RequestMethod.PUT, @@ -168,7 +200,9 @@ public interface PetApi { produces = "application/json", consumes = "application/json" ) - ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet); + ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet pet); /** @@ -179,19 +213,27 @@ public interface PetApi { * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded" ) - ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet" ) @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet" ) @RequestParam(value="status", required=false) String status); + ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet" ) @RequestParam(value="name", required=false) String name, + +@ApiParam(value = "Updated status of the pet" ) @RequestParam(value="status", required=false) String status); /** @@ -202,12 +244,14 @@ public interface PetApi { * @param file file to upload (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -215,6 +259,12 @@ public interface PetApi { produces = "application/json", consumes = "multipart/form-data" ) - ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server" ) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file to upload") @RequestParam("file") MultipartFile file); + ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server" ) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata, + +@ApiParam(value = "file to upload") @RequestParam("file") MultipartFile file); } diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index cfb78b620762..a09c72d480b3 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -34,15 +34,20 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) - ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId); + ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId + +); /** @@ -51,11 +56,13 @@ public interface StoreApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @RequestMapping( method = RequestMethod.GET, @@ -74,17 +81,23 @@ public interface StoreApi { * or Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", produces = "application/json" ) - ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId); + ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId + +); /** @@ -94,9 +107,12 @@ public interface StoreApi { * @return successful operation (status code 200) * or Invalid Order (status code 400) */ + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping( method = RequestMethod.POST, @@ -104,6 +120,8 @@ public interface StoreApi { produces = "application/json", consumes = "application/json" ) - ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order); + ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order order); } diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index a96a9901fbee..4fabd81f3b34 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -33,18 +33,22 @@ public interface UserApi { * @param user Created user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", authorizations = { @Authorization(value = "api_key") }, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user", consumes = "application/json" ) - ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user); + ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User user); /** @@ -53,18 +57,22 @@ public interface UserApi { * @param user List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", authorizations = { @Authorization(value = "api_key") }, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray", consumes = "application/json" ) - ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user); + ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List user); /** @@ -73,18 +81,22 @@ public interface UserApi { * @param user List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", authorizations = { @Authorization(value = "api_key") }, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList", consumes = "application/json" ) - ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user); + ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List user); /** @@ -95,18 +107,23 @@ public interface UserApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", authorizations = { @Authorization(value = "api_key") }, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username); + ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +); /** @@ -117,17 +134,23 @@ public interface UserApi { * or Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = "application/json" ) - ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username); + ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +); /** @@ -138,16 +161,23 @@ public interface UserApi { * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = "application/json" ) - ResponseEntity loginUser(@NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password); + ResponseEntity loginUser(@NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +); /** @@ -155,11 +185,13 @@ public interface UserApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", authorizations = { @Authorization(value = "api_key") }, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, @@ -177,18 +209,25 @@ public interface UserApi { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", authorizations = { @Authorization(value = "api_key") }, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}", consumes = "application/json" ) - ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user); + ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User user); } diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java index a066fd9e30e2..26f5a6768a3d 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Category.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * A category for a pet */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java index 523a64f1874d..ec1b1b81d6a4 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Describes the result of uploading an image resource */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java index 12230edbc050..2f24cd46851d 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * An order for a pets from the pet store */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java index 1e1b76c7d117..a1f702f1a72f 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.util.List; import org.openapitools.model.Category; import org.openapitools.model.Tag; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * A pet for sale in the pet store */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java index 1476aa7d343a..8e3f67322335 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Tag.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * A tag for a pet */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java index 8bfae36516d1..73fcf01b5375 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/User.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * A User who is purchasing from the pet store */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index b3bfb2d25f6b..9da30d1e34f4 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -36,19 +36,23 @@ public interface PetApi { * @param body Pet object that needs to be added to the store (required) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = "application/json" ) - default ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -61,18 +65,24 @@ public interface PetApi { * @param apiKey (optional) * @return Invalid pet value (status code 400) */ + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey) { + default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -86,20 +96,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid status value (status code 400) */ + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = "application/json" ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status) { + default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -128,20 +143,25 @@ public interface PetApi { * or Invalid tag value (status code 400) * @deprecated */ + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = "application/json" ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags) { + default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -170,20 +190,26 @@ public interface PetApi { * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = "application/json" ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId) { + default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -211,21 +237,27 @@ public interface PetApi { * or Pet not found (status code 404) * or Validation exception (status code 405) */ + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = "application/json" ) - default ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -239,19 +271,27 @@ public interface PetApi { * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded" ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -265,12 +305,14 @@ public interface PetApi { * @param file file to upload (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -278,7 +320,13 @@ public interface PetApi { produces = "application/json", consumes = "multipart/form-data" ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index fee94a945c1a..d7a7d1303b1a 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -38,15 +38,20 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId) { + default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -58,11 +63,13 @@ public interface StoreApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @RequestMapping( method = RequestMethod.GET, @@ -84,17 +91,23 @@ public interface StoreApi { * or Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", produces = "application/json" ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId) { + default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -121,16 +134,21 @@ public interface StoreApi { * @return successful operation (status code 200) * or Invalid Order (status code 400) */ + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = "application/json" ) - default ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body) { + default ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index d178aafd1fbd..27ab4c67aab3 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -37,14 +37,18 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) - default ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -56,14 +60,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) - default ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -75,14 +83,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) - default ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -96,15 +108,20 @@ public interface UserApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username) { + default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -118,17 +135,23 @@ public interface UserApi { * or Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = "application/json" ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username) { + default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -156,16 +179,23 @@ public interface UserApi { * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = "application/json" ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password) { + default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -176,8 +206,10 @@ public interface UserApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, @@ -198,15 +230,22 @@ public interface UserApi { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java index 1114316e27f5..f21d835af4da 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Category.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * A category for a pet */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java index 523a64f1874d..ec1b1b81d6a4 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Describes the result of uploading an image resource */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java index 12230edbc050..2f24cd46851d 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * An order for a pets from the pet store */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java index 1e1b76c7d117..a1f702f1a72f 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.util.List; import org.openapitools.model.Category; import org.openapitools.model.Tag; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * A pet for sale in the pet store */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java index 1476aa7d343a..8e3f67322335 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Tag.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * A tag for a pet */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java index 8bfae36516d1..73fcf01b5375 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/User.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * A User who is purchasing from the pet store */ diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java index 9a39105da900..032377d53cc2 100644 --- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java +++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java @@ -42,15 +42,29 @@ public interface TestHeadersApi { * @param headerBoolean (optional, default to true) * @return default response (status code 200) */ + @ApiOperation(value = "test headers", nickname = "headersTest", notes = "desc", response = TestResponse.class, tags={ "verify-default-value", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "default response", response = TestResponse.class) }) @RequestMapping( method = RequestMethod.GET, value = "/test-headers", produces = { "application/json" } ) - default ResponseEntity headersTest(@ApiParam(value = "", defaultValue = "11.2") @RequestHeader(value = "headerNumber", required = false) BigDecimal headerNumber,@ApiParam(value = "", defaultValue = "qwerty") @RequestHeader(value = "headerString", required = false) String headerString,@ApiParam(value = "", defaultValue = "qwerty") @RequestHeader(value = "headerStringWrapped", required = false) String headerStringWrapped,@ApiParam(value = "", defaultValue = "qwerty\"with quotes\" test") @RequestHeader(value = "headerStringQuotes", required = false) String headerStringQuotes,@ApiParam(value = "", defaultValue = "qwerty\"with quotes\" test") @RequestHeader(value = "headerStringQuotesWrapped", required = false) String headerStringQuotesWrapped,@ApiParam(value = "", defaultValue = "true") @RequestHeader(value = "headerBoolean", required = false) Boolean headerBoolean) { + default ResponseEntity headersTest( +@ApiParam(value = "", defaultValue = "11.2") @RequestHeader(value = "headerNumber", required = false) BigDecimal headerNumber +, +@ApiParam(value = "", defaultValue = "qwerty") @RequestHeader(value = "headerString", required = false) String headerString +, +@ApiParam(value = "", defaultValue = "qwerty") @RequestHeader(value = "headerStringWrapped", required = false) String headerStringWrapped +, +@ApiParam(value = "", defaultValue = "qwerty\"with quotes\" test") @RequestHeader(value = "headerStringQuotes", required = false) String headerStringQuotes +, +@ApiParam(value = "", defaultValue = "qwerty\"with quotes\" test") @RequestHeader(value = "headerStringQuotesWrapped", required = false) String headerStringQuotesWrapped +, +@ApiParam(value = "", defaultValue = "true") @RequestHeader(value = "headerBoolean", required = false) Boolean headerBoolean +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java index 14cdb9ccb6a6..780e8818072e 100644 --- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java +++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java @@ -42,15 +42,29 @@ public interface TestQueryParamsApi { * @param queryBoolean (optional, default to true) * @return default response (status code 200) */ + @ApiOperation(value = "test query params", nickname = "queryParamsTest", notes = "desc", response = TestResponse.class, tags={ "verify-default-value", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "default response", response = TestResponse.class) }) @RequestMapping( method = RequestMethod.GET, value = "/test-query-params", produces = { "application/json" } ) - default ResponseEntity queryParamsTest(@ApiParam(value = "", defaultValue = "11.2") @Valid @RequestParam(value = "queryNumber", required = false, defaultValue = "11.2") BigDecimal queryNumber,@ApiParam(value = "", defaultValue = "qwerty") @Valid @RequestParam(value = "queryString", required = false, defaultValue = "qwerty") String queryString,@ApiParam(value = "", defaultValue = "qwerty") @Valid @RequestParam(value = "queryStringWrapped", required = false, defaultValue = "qwerty") String queryStringWrapped,@ApiParam(value = "", defaultValue = "qwerty\"with quotes\" test") @Valid @RequestParam(value = "queryStringQuotes", required = false, defaultValue = "qwerty\"with quotes\" test") String queryStringQuotes,@ApiParam(value = "", defaultValue = "qwerty\"with quotes\" test") @Valid @RequestParam(value = "queryStringQuotesWrapped", required = false, defaultValue = "qwerty\"with quotes\" test") String queryStringQuotesWrapped,@ApiParam(value = "", defaultValue = "true") @Valid @RequestParam(value = "queryBoolean", required = false, defaultValue = "true") Boolean queryBoolean) { + default ResponseEntity queryParamsTest(@ApiParam(value = "", defaultValue = "11.2") @Valid @RequestParam(value = "queryNumber", required = false, defaultValue = "11.2") BigDecimal queryNumber + +,@ApiParam(value = "", defaultValue = "qwerty") @Valid @RequestParam(value = "queryString", required = false, defaultValue = "qwerty") String queryString + +,@ApiParam(value = "", defaultValue = "qwerty") @Valid @RequestParam(value = "queryStringWrapped", required = false, defaultValue = "qwerty") String queryStringWrapped + +,@ApiParam(value = "", defaultValue = "qwerty\"with quotes\" test") @Valid @RequestParam(value = "queryStringQuotes", required = false, defaultValue = "qwerty\"with quotes\" test") String queryStringQuotes + +,@ApiParam(value = "", defaultValue = "qwerty\"with quotes\" test") @Valid @RequestParam(value = "queryStringQuotesWrapped", required = false, defaultValue = "qwerty\"with quotes\" test") String queryStringQuotesWrapped + +,@ApiParam(value = "", defaultValue = "true") @Valid @RequestParam(value = "queryBoolean", required = false, defaultValue = "true") Boolean queryBoolean + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/model/TestResponse.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/model/TestResponse.java index 765ab01a234e..e7115a5f13b9 100644 --- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/model/TestResponse.java +++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/model/TestResponse.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TestResponse */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java index 62afbd7d4b5a..204d18334cce 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -37,8 +37,10 @@ public interface AnotherFakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -46,7 +48,9 @@ public interface AnotherFakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default CompletableFuture> call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default CompletableFuture> call123testSpecialTags( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java index a8c79e245c8d..8bbb762545f3 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java @@ -46,15 +46,19 @@ public interface FakeApi { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) - default CompletableFuture> createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem) { + default CompletableFuture> createXmlItem( + +@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -67,15 +71,19 @@ public interface FakeApi { * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) - default CompletableFuture> fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body) { + default CompletableFuture> fakeOuterBooleanSerialize( + +@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -88,15 +96,19 @@ public interface FakeApi { * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) - default CompletableFuture> fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body) { + default CompletableFuture> fakeOuterCompositeSerialize( + +@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -120,15 +132,19 @@ public interface FakeApi { * @param body Input number as post body (optional) * @return Output number (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) - default CompletableFuture> fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body) { + default CompletableFuture> fakeOuterNumberSerialize( + +@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -141,15 +157,19 @@ public interface FakeApi { * @param body Input string as post body (optional) * @return Output string (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output string", response = String.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) - default CompletableFuture> fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body) { + default CompletableFuture> fakeOuterStringSerialize( + +@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -162,15 +182,19 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) - default CompletableFuture> testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body) { + default CompletableFuture> testBodyWithFileSchema( + +@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -183,15 +207,21 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default CompletableFuture> testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody User body) { + default CompletableFuture> testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query + +, + +@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -204,8 +234,10 @@ public interface FakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -213,7 +245,9 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default CompletableFuture> testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default CompletableFuture> testClientModel( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -251,19 +285,50 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default CompletableFuture> testEndpointParameters(@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float,@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary,@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date,@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime,@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + default CompletableFuture> testEndpointParameters( + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + +@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + +@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + +@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + +@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, + +@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, + +@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, + +@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + +@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -284,16 +349,35 @@ public interface FakeApi { * @return Invalid request (status code 400) * or Not found (status code 404) */ + @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid request"), + @ApiResponse(code = 404, message = "Not found") }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default CompletableFuture> testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + default CompletableFuture> testEnumParameters( +@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray +, +@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString +,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray + +,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble + +, + +@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + +@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -311,14 +395,28 @@ public interface FakeApi { * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default CompletableFuture> testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + default CompletableFuture> testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup + +, +@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup +,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group + +,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup + +, +@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + +) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -330,15 +428,19 @@ public interface FakeApi { * @param param request body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) - default CompletableFuture> testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Map param) { + default CompletableFuture> testInlineAdditionalProperties( + +@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -351,15 +453,21 @@ public interface FakeApi { * @param param2 field2 (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) - default CompletableFuture> testJsonFormData(@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + default CompletableFuture> testJsonFormData( + +@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + +@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -376,14 +484,26 @@ public interface FakeApi { * @param context (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default CompletableFuture> testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context) { + default CompletableFuture> testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + +) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -397,12 +517,14 @@ public interface FakeApi { * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -410,7 +532,13 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default CompletableFuture> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default CompletableFuture> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index bf2b4ea0a5bf..a899c1e2ac7c 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -37,11 +37,13 @@ public interface FakeClassnameTestApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { @Authorization(value = "api_key_query") }, tags={ "fake_classname_tags 123#$%^", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -49,7 +51,9 @@ public interface FakeClassnameTestApi { produces = { "application/json" }, consumes = { "application/json" } ) - default CompletableFuture> testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default CompletableFuture> testClassname( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java index 415b3f89c0ed..b4e11c47fc26 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java @@ -39,20 +39,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) - default CompletableFuture> addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default CompletableFuture> addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -66,19 +71,26 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default CompletableFuture> deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey) { + default CompletableFuture> deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -92,20 +104,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid status value (status code 400) */ + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default CompletableFuture>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status) { + default CompletableFuture>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -136,20 +153,25 @@ public interface PetApi { * or Invalid tag value (status code 400) * @deprecated */ + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default CompletableFuture>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags) { + default CompletableFuture>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + +) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -180,20 +202,26 @@ public interface PetApi { * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default CompletableFuture> getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId) { + default CompletableFuture> getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -224,22 +252,29 @@ public interface PetApi { * or Pet not found (status code 404) * or Validation exception (status code 405) */ + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) - default CompletableFuture> updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default CompletableFuture> updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -253,19 +288,27 @@ public interface PetApi { * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default CompletableFuture> updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default CompletableFuture> updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -279,12 +322,14 @@ public interface PetApi { * @param file file to upload (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -292,7 +337,13 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default CompletableFuture> uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default CompletableFuture> uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java index a34599e4b14b..6fd0038424ab 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java @@ -39,15 +39,20 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default CompletableFuture> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId) { + default CompletableFuture> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + +) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -59,11 +64,13 @@ public interface StoreApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @RequestMapping( method = RequestMethod.GET, @@ -85,17 +92,23 @@ public interface StoreApi { * or Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default CompletableFuture> getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId) { + default CompletableFuture> getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + +) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -124,16 +137,21 @@ public interface StoreApi { * @return successful operation (status code 200) * or Invalid Order (status code 400) */ + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) - default CompletableFuture> placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body) { + default CompletableFuture> placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java index 44f237700bc0..941fffd38328 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java @@ -38,14 +38,18 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) - default CompletableFuture> createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body) { + default CompletableFuture> createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -57,14 +61,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) - default CompletableFuture> createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default CompletableFuture> createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -76,14 +84,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) - default CompletableFuture> createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default CompletableFuture> createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -97,15 +109,20 @@ public interface UserApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default CompletableFuture> deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username) { + default CompletableFuture> deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -119,17 +136,23 @@ public interface UserApi { * or Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default CompletableFuture> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username) { + default CompletableFuture> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +) { return CompletableFuture.supplyAsync(()-> { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { @@ -159,16 +182,23 @@ public interface UserApi { * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default CompletableFuture> loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password) { + default CompletableFuture> loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } @@ -179,8 +209,10 @@ public interface UserApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, @@ -201,15 +233,22 @@ public interface UserApi { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default CompletableFuture> updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body) { + default CompletableFuture> updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED)); } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 8c7e00956c3a..847d9f37777c 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesAnyType */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 864299cf9b28..31b7fad0c945 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesArray */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index b445c7bb0d86..5c23bc8d768e 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesBoolean */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 76a9f4e4c256..82d25ab6e747 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesClass */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 089c1edce9d8..802674f78205 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesInteger */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index f2f8fe6949b0..787a4262026a 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesNumber */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index bcca31ee32a2..271b66cf6820 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesObject */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 829ea052d3e1..08ba6bfe63ce 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesString */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Animal.java index 1319038cccc0..7598b6f55612 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Animal.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Animal */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index aec96b23f033..bf1b74e83fca 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfArrayOfNumberOnly */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 63a657c8dddf..f1ced8ef71a0 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfNumberOnly */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayTest.java index 2a36629dfc75..81c7ab3dd785 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ArrayTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.model.ReadOnlyFirst; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayTest */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCat.java index c7912d432b77..1835c7bf2114 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.BigCatAllOf; import org.openapitools.model.Cat; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCat */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCatAllOf.java index aba5eb47270c..43555f5bfed0 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCatAllOf */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Capitalization.java index 587443bb7667..2ccf1e812e5a 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Capitalization.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Capitalization */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Cat.java index b32ade551792..0876d9f30a0b 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Cat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Cat */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/CatAllOf.java index ce9d21ae5ecb..d59a3783d0af 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/CatAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * CatAllOf */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Category.java index c79594679cf8..ef9a938298b9 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Category.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Category */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ClassModel.java index a462f09a9cb9..af4c74423128 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ClassModel.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model with \"_class\" property */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Client.java index 727896658637..298c69c03b17 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Client.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Client */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Dog.java index 229b97f2a7cb..09938cd0f5fc 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Dog.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Dog */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/DogAllOf.java index 29b736410b76..d95ac4a329d9 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/DogAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * DogAllOf */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java index ec2d4e1ce8b9..beeff77d9e56 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumArrays */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumClass.java index ef4719c757f0..8f82b2f78436 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumClass.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets EnumClass diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java index f9b00d90ed5b..0ce7ab0f2fa6 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.OuterEnum; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumTest */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 8e4f8d5d5d9d..ea5aa826feb7 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FileSchemaTestClass */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java index 091f7d97f2b5..352d758ce6e5 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FormatTest */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 2dd77785ad55..10e514bb1726 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * HasOnlyReadOnly */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java index 7b9a321ecb22..36754fec8c9e 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MapTest */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index d80573256c63..8238e3227a6b 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,9 +13,13 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Model200Response.java index 3f2d0da5f331..3f8bdc54450d 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Model200Response.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name starting with number */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ec7ccfe1417..99a06748ac14 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ModelApiResponse */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelReturn.java index 5d0c266a148b..d9cc6193aee6 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ModelReturn.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing reserved words */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Name.java index 3cc5bf64c066..880351d2843a 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Name.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name same as property name */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/NumberOnly.java index c1cafb126beb..4af42224ae53 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/NumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * NumberOnly */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java index 0c9dddf85daf..ba0b3b2e3131 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Order */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java index 7425f5c75890..cdac99f37e41 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterComposite.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * OuterComposite */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterEnum.java index 6b5abc576b07..d74006b9d33e 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterEnum.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets OuterEnum diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java index 5f44cab5669e..7f4aa1ef8b12 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -13,9 +14,13 @@ import java.util.Set; import org.openapitools.model.Category; import org.openapitools.model.Tag; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Pet */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 6f4a25b65efe..f872289b8da3 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ReadOnlyFirst */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/SpecialModelName.java index 16e690b5740f..31cc434cd51b 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/SpecialModelName.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * SpecialModelName */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Tag.java index 9306b226ea56..2d1ac94412f7 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Tag.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Tag */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderDefault.java index 80788f31612a..fb29f038fc6b 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderDefault */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderExample.java index 963c3c66b57b..096b4ada0991 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderExample */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/User.java index 4a0c635f1adb..3cadd5d4ec50 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/User.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * User */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/XmlItem.java index 465b94b6a88d..62cfbcc6b285 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/XmlItem.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * XmlItem */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java index c39c4d2227eb..ba1b869f0363 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -36,8 +36,10 @@ public interface AnotherFakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -45,7 +47,9 @@ public interface AnotherFakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity call123testSpecialTags( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java index 25b3feeb7987..4fd628eb9a27 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java @@ -45,15 +45,19 @@ public interface FakeApi { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) - default ResponseEntity createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem) { + default ResponseEntity createXmlItem( + +@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -66,15 +70,19 @@ public interface FakeApi { * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) - default ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body) { + default ResponseEntity fakeOuterBooleanSerialize( + +@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -87,15 +95,19 @@ public interface FakeApi { * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) - default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body) { + default ResponseEntity fakeOuterCompositeSerialize( + +@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { @@ -117,15 +129,19 @@ public interface FakeApi { * @param body Input number as post body (optional) * @return Output number (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) - default ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body) { + default ResponseEntity fakeOuterNumberSerialize( + +@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -138,15 +154,19 @@ public interface FakeApi { * @param body Input string as post body (optional) * @return Output string (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output string", response = String.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) - default ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body) { + default ResponseEntity fakeOuterStringSerialize( + +@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -159,15 +179,19 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) - default ResponseEntity testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body) { + default ResponseEntity testBodyWithFileSchema( + +@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -180,15 +204,21 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query + +, + +@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -201,8 +231,10 @@ public interface FakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -210,7 +242,9 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClientModel( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -246,19 +280,50 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float,@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary,@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date,@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) LocalDateTime dateTime,@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + default ResponseEntity testEndpointParameters( + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + +@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + +@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + +@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + +@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, + +@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, + +@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) LocalDateTime dateTime, + +@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + +@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -279,16 +344,35 @@ public interface FakeApi { * @return Invalid request (status code 400) * or Not found (status code 404) */ + @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid request"), + @ApiResponse(code = 404, message = "Not found") }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + default ResponseEntity testEnumParameters( +@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray +, +@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString +,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray + +,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble + +, + +@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + +@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -306,14 +390,28 @@ public interface FakeApi { * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup + +, +@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup +,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group + +,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup + +, +@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -325,15 +423,19 @@ public interface FakeApi { * @param param request body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) - default ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Map param) { + default ResponseEntity testInlineAdditionalProperties( + +@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -346,15 +448,21 @@ public interface FakeApi { * @param param2 field2 (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + default ResponseEntity testJsonFormData( + +@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + +@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -371,14 +479,26 @@ public interface FakeApi { * @param context (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context) { + default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -392,12 +512,14 @@ public interface FakeApi { * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -405,7 +527,13 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 081a205e9125..71ce0007da65 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,11 +36,13 @@ public interface FakeClassnameTestApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { @Authorization(value = "api_key_query") }, tags={ "fake_classname_tags 123#$%^", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -48,7 +50,9 @@ public interface FakeClassnameTestApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClassname( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java index b48e45b6068b..b0e4e2c2dc2e 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java @@ -38,20 +38,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -65,19 +70,26 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey) { + default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -91,20 +103,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid status value (status code 400) */ + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status) { + default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -133,20 +150,25 @@ public interface PetApi { * or Invalid tag value (status code 400) * @deprecated */ + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags) { + default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -175,20 +197,26 @@ public interface PetApi { * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId) { + default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -217,22 +245,29 @@ public interface PetApi { * or Pet not found (status code 404) * or Validation exception (status code 405) */ + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -246,19 +281,27 @@ public interface PetApi { * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -272,12 +315,14 @@ public interface PetApi { * @param file file to upload (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -285,7 +330,13 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java index 65d771ce01bb..22b5b7670284 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java @@ -38,15 +38,20 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId) { + default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -58,11 +63,13 @@ public interface StoreApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @RequestMapping( method = RequestMethod.GET, @@ -84,17 +91,23 @@ public interface StoreApi { * or Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId) { + default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -121,16 +134,21 @@ public interface StoreApi { * @return successful operation (status code 200) * or Invalid Order (status code 400) */ + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) - default ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body) { + default ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java index 69205eeeb18f..27f6a346d300 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java @@ -37,14 +37,18 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) - default ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -56,14 +60,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) - default ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -75,14 +83,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) - default ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -96,15 +108,20 @@ public interface UserApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username) { + default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -118,17 +135,23 @@ public interface UserApi { * or Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username) { + default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -156,16 +179,23 @@ public interface UserApi { * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password) { + default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -176,8 +206,10 @@ public interface UserApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, @@ -198,15 +230,22 @@ public interface UserApi { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 8c7e00956c3a..847d9f37777c 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesAnyType */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 864299cf9b28..31b7fad0c945 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesArray */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index b445c7bb0d86..5c23bc8d768e 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesBoolean */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 76a9f4e4c256..82d25ab6e747 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesClass */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 089c1edce9d8..802674f78205 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesInteger */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index f2f8fe6949b0..787a4262026a 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesNumber */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index bcca31ee32a2..271b66cf6820 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesObject */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 829ea052d3e1..08ba6bfe63ce 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesString */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Animal.java index 1319038cccc0..7598b6f55612 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Animal.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Animal */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index aec96b23f033..bf1b74e83fca 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfArrayOfNumberOnly */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 63a657c8dddf..f1ced8ef71a0 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfNumberOnly */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayTest.java index 2a36629dfc75..81c7ab3dd785 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ArrayTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.model.ReadOnlyFirst; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayTest */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCat.java index c7912d432b77..1835c7bf2114 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.BigCatAllOf; import org.openapitools.model.Cat; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCat */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCatAllOf.java index aba5eb47270c..43555f5bfed0 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCatAllOf */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Capitalization.java index 587443bb7667..2ccf1e812e5a 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Capitalization.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Capitalization */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Cat.java index b32ade551792..0876d9f30a0b 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Cat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Cat */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/CatAllOf.java index ce9d21ae5ecb..d59a3783d0af 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/CatAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * CatAllOf */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Category.java index c79594679cf8..ef9a938298b9 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Category.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Category */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ClassModel.java index a462f09a9cb9..af4c74423128 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ClassModel.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model with \"_class\" property */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Client.java index 727896658637..298c69c03b17 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Client.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Client */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Dog.java index 229b97f2a7cb..09938cd0f5fc 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Dog.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Dog */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/DogAllOf.java index 29b736410b76..d95ac4a329d9 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/DogAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * DogAllOf */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java index ec2d4e1ce8b9..beeff77d9e56 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumArrays */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumClass.java index ef4719c757f0..8f82b2f78436 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumClass.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets EnumClass diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java index f9b00d90ed5b..0ce7ab0f2fa6 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.OuterEnum; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumTest */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 8e4f8d5d5d9d..ea5aa826feb7 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FileSchemaTestClass */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java index 13d2807b5f26..1eb518cb89d3 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.time.LocalDateTime; import java.util.Arrays; import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FormatTest */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 2dd77785ad55..10e514bb1726 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * HasOnlyReadOnly */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java index 7b9a321ecb22..36754fec8c9e 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MapTest */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 54dd2472e4cf..04802633a427 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,9 +13,13 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Model200Response.java index 3f2d0da5f331..3f8bdc54450d 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Model200Response.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name starting with number */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ec7ccfe1417..99a06748ac14 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ModelApiResponse */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelReturn.java index 5d0c266a148b..d9cc6193aee6 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ModelReturn.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing reserved words */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Name.java index 3cc5bf64c066..880351d2843a 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Name.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name same as property name */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/NumberOnly.java index c1cafb126beb..4af42224ae53 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/NumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * NumberOnly */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java index 8143e0e06a0d..593ed335a0fd 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.LocalDateTime; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Order */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java index 7425f5c75890..cdac99f37e41 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterComposite.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * OuterComposite */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterEnum.java index 6b5abc576b07..d74006b9d33e 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterEnum.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets OuterEnum diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java index 5f44cab5669e..7f4aa1ef8b12 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -13,9 +14,13 @@ import java.util.Set; import org.openapitools.model.Category; import org.openapitools.model.Tag; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Pet */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 6f4a25b65efe..f872289b8da3 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ReadOnlyFirst */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/SpecialModelName.java index 16e690b5740f..31cc434cd51b 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/SpecialModelName.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * SpecialModelName */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Tag.java index 9306b226ea56..2d1ac94412f7 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Tag.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Tag */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderDefault.java index 80788f31612a..fb29f038fc6b 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderDefault */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderExample.java index 963c3c66b57b..096b4ada0991 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderExample */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/User.java index 4a0c635f1adb..3cadd5d4ec50 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/User.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * User */ diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/XmlItem.java index 465b94b6a88d..62cfbcc6b285 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/XmlItem.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * XmlItem */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index c39c4d2227eb..ba1b869f0363 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -36,8 +36,10 @@ public interface AnotherFakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -45,7 +47,9 @@ public interface AnotherFakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity call123testSpecialTags( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index 07302b4c7d8c..c22b8c03f8fe 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -45,15 +45,19 @@ public interface FakeApi { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) - default ResponseEntity createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem) { + default ResponseEntity createXmlItem( + +@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -66,15 +70,19 @@ public interface FakeApi { * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) - default ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body) { + default ResponseEntity fakeOuterBooleanSerialize( + +@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -87,15 +95,19 @@ public interface FakeApi { * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) - default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body) { + default ResponseEntity fakeOuterCompositeSerialize( + +@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { @@ -117,15 +129,19 @@ public interface FakeApi { * @param body Input number as post body (optional) * @return Output number (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) - default ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body) { + default ResponseEntity fakeOuterNumberSerialize( + +@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -138,15 +154,19 @@ public interface FakeApi { * @param body Input string as post body (optional) * @return Output string (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output string", response = String.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) - default ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body) { + default ResponseEntity fakeOuterStringSerialize( + +@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -159,15 +179,19 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) - default ResponseEntity testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body) { + default ResponseEntity testBodyWithFileSchema( + +@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -180,15 +204,21 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query + +, + +@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -201,8 +231,10 @@ public interface FakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -210,7 +242,9 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClientModel( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -246,19 +280,50 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float,@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary,@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date,@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime,@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + default ResponseEntity testEndpointParameters( + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + +@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + +@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + +@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + +@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, + +@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, + +@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, + +@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + +@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -279,16 +344,35 @@ public interface FakeApi { * @return Invalid request (status code 400) * or Not found (status code 404) */ + @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid request"), + @ApiResponse(code = 404, message = "Not found") }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + default ResponseEntity testEnumParameters( +@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray +, +@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString +,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray + +,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble + +, + +@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + +@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -306,14 +390,28 @@ public interface FakeApi { * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup + +, +@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup +,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group + +,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup + +, +@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -325,15 +423,19 @@ public interface FakeApi { * @param param request body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) - default ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Map param) { + default ResponseEntity testInlineAdditionalProperties( + +@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -346,15 +448,21 @@ public interface FakeApi { * @param param2 field2 (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + default ResponseEntity testJsonFormData( + +@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + +@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -371,14 +479,26 @@ public interface FakeApi { * @param context (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context) { + default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -392,12 +512,14 @@ public interface FakeApi { * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -405,7 +527,13 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 081a205e9125..71ce0007da65 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,11 +36,13 @@ public interface FakeClassnameTestApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { @Authorization(value = "api_key_query") }, tags={ "fake_classname_tags 123#$%^", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -48,7 +50,9 @@ public interface FakeClassnameTestApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClassname( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java index b48e45b6068b..b0e4e2c2dc2e 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -38,20 +38,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -65,19 +70,26 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey) { + default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -91,20 +103,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid status value (status code 400) */ + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status) { + default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -133,20 +150,25 @@ public interface PetApi { * or Invalid tag value (status code 400) * @deprecated */ + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags) { + default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -175,20 +197,26 @@ public interface PetApi { * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId) { + default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -217,22 +245,29 @@ public interface PetApi { * or Pet not found (status code 404) * or Validation exception (status code 405) */ + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -246,19 +281,27 @@ public interface PetApi { * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -272,12 +315,14 @@ public interface PetApi { * @param file file to upload (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -285,7 +330,13 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index 65d771ce01bb..22b5b7670284 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -38,15 +38,20 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId) { + default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -58,11 +63,13 @@ public interface StoreApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @RequestMapping( method = RequestMethod.GET, @@ -84,17 +91,23 @@ public interface StoreApi { * or Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId) { + default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -121,16 +134,21 @@ public interface StoreApi { * @return successful operation (status code 200) * or Invalid Order (status code 400) */ + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) - default ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body) { + default ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java index 69205eeeb18f..27f6a346d300 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -37,14 +37,18 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) - default ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -56,14 +60,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) - default ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -75,14 +83,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) - default ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -96,15 +108,20 @@ public interface UserApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username) { + default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -118,17 +135,23 @@ public interface UserApi { * or Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username) { + default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -156,16 +179,23 @@ public interface UserApi { * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password) { + default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -176,8 +206,10 @@ public interface UserApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, @@ -198,15 +230,22 @@ public interface UserApi { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index ca35a4dabdbe..54acb5633367 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesAnyType */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 3b70a93bfb68..af849ea35e73 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesArray */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index d0096c55cb18..e494b1b2c600 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesBoolean */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 0815c5ab76d5..00ab9b250fb4 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesClass */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 74abe89e2eba..7e78c62f6e16 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesInteger */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 824a44a55708..d01dc2c8e740 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesNumber */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index cc8a8acc0d4f..ef6da01824ae 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesObject */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index fb81a46af400..13174a324c55 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesString */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Animal.java index 6c1b4f75d082..e61b1eb77b6e 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Animal.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Animal */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 53289137ab69..96aec05a7434 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfArrayOfNumberOnly */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index f948c06157ac..d15054d62914 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfNumberOnly */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java index 809d131fca5c..d6ac2177926c 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.model.ReadOnlyFirst; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayTest */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCat.java index de0fcc89cac8..d2ece0d81f96 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.BigCatAllOf; import org.openapitools.model.Cat; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCat */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java index c828f01f4026..a280a3f6cdcf 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCatAllOf */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Capitalization.java index 9dc3270d4e24..a064557cd58a 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Capitalization.java @@ -1,13 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Capitalization */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Cat.java index 94756b3484ec..fc4ab35c4fa2 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Cat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.CatAllOf; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Cat */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java index 9d4ec215e785..9a1f6caceff6 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java @@ -1,13 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * CatAllOf */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Category.java index 7e0770622f47..250c280e8b17 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Category.java @@ -1,13 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Category */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ClassModel.java index 328bae149d12..24a57ea3f813 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ClassModel.java @@ -1,13 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model with \"_class\" property */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Client.java index 594c1b919fb5..2b17053e1e65 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Client.java @@ -1,13 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Client */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Dog.java index a252c04222c6..e1f27783a597 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Dog.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Dog */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java index 9b41745ce153..05f26186f9a2 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java @@ -1,13 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * DogAllOf */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java index 33ea41485bc9..e8101183905e 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumArrays */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumClass.java index b3c09b9f30e3..6dc082079cf5 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumClass.java @@ -1,11 +1,17 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets EnumClass diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumTest.java index 21c7724914f2..20672ddb0ff3 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/EnumTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.OuterEnum; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumTest */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 466c6f63c23c..85e4c7200171 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FileSchemaTestClass */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FormatTest.java index ca910a4259b0..0379f1c5c6e1 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FormatTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FormatTest */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 105d23165aa1..f4b869294be5 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -1,13 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * HasOnlyReadOnly */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MapTest.java index f7c770069249..feba6551cdb2 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MapTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MapTest */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index a7e614a25e2f..abbc1403bb6f 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.util.List; import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Model200Response.java index 56d627978a9b..513c6029234f 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Model200Response.java @@ -1,13 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name starting with number */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java index 9af9c13b9065..8e7128437969 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -1,13 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ModelApiResponse */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java index ec3f1fc6b937..0c8859109559 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java @@ -1,13 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing reserved words */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Name.java index 09c05ca6d10f..5551de4c5438 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Name.java @@ -1,13 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name same as property name */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java index 82239239bda6..4f9793f1e12a 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * NumberOnly */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Order.java index fdf2477970a3..89be413bc219 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Order */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java index 0657c9fbe6ab..e365d6f2f39e 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * OuterComposite */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java index 075522bdeffb..41cfb97d1e69 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java @@ -1,11 +1,17 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets OuterEnum diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Pet.java index b6fcfa069d7a..9ca0be9230b8 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,9 +13,13 @@ import java.util.List; import java.util.Set; import org.openapitools.model.Category; import org.openapitools.model.Tag; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Pet */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 05ab3a4d0c76..f31a23539b97 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -1,13 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ReadOnlyFirst */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java index b3616c034baf..36c8e903bf46 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java @@ -1,13 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * SpecialModelName */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Tag.java index 053950ec28cc..a6afe72ee647 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Tag.java @@ -1,13 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Tag */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java index ea87ce615dc1..529910bf9e05 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderDefault */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java index 5acd91077501..6f9abf43c41e 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderExample */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/User.java index 24c2f10976f7..523bd4962749 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/User.java @@ -1,13 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * User */ diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/XmlItem.java index 89c02b4307dc..2eb5145f1970 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/XmlItem.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * XmlItem */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index c39c4d2227eb..ba1b869f0363 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -36,8 +36,10 @@ public interface AnotherFakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -45,7 +47,9 @@ public interface AnotherFakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity call123testSpecialTags( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index 2a84a4ab5c69..a56d13721e16 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -45,15 +45,19 @@ public interface FakeApi { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) - default ResponseEntity createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem) { + default ResponseEntity createXmlItem( + +@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -66,15 +70,19 @@ public interface FakeApi { * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) - default ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body) { + default ResponseEntity fakeOuterBooleanSerialize( + +@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -87,15 +95,19 @@ public interface FakeApi { * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) - default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body) { + default ResponseEntity fakeOuterCompositeSerialize( + +@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { @@ -117,15 +129,19 @@ public interface FakeApi { * @param body Input number as post body (optional) * @return Output number (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) - default ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body) { + default ResponseEntity fakeOuterNumberSerialize( + +@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -138,15 +154,19 @@ public interface FakeApi { * @param body Input string as post body (optional) * @return Output string (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output string", response = String.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) - default ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body) { + default ResponseEntity fakeOuterStringSerialize( + +@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -159,15 +179,19 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) - default ResponseEntity testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body) { + default ResponseEntity testBodyWithFileSchema( + +@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -180,15 +204,21 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query + +, + +@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -201,8 +231,10 @@ public interface FakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -210,7 +242,9 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClientModel( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -246,19 +280,50 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float,@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary,@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date,@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime,@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + default ResponseEntity testEndpointParameters( + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + +@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + +@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + +@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + +@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, + +@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, + +@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, + +@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + +@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -279,16 +344,35 @@ public interface FakeApi { * @return Invalid request (status code 400) * or Not found (status code 404) */ + @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid request"), + @ApiResponse(code = 404, message = "Not found") }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + default ResponseEntity testEnumParameters( +@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray +, +@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString +,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray + +,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble + +, + +@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + +@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -306,14 +390,28 @@ public interface FakeApi { * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup + +, +@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup +,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group + +,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup + +, +@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -325,15 +423,19 @@ public interface FakeApi { * @param param request body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) - default ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Map param) { + default ResponseEntity testInlineAdditionalProperties( + +@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -346,15 +448,21 @@ public interface FakeApi { * @param param2 field2 (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + default ResponseEntity testJsonFormData( + +@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + +@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -371,14 +479,26 @@ public interface FakeApi { * @param context (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context) { + default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -392,12 +512,14 @@ public interface FakeApi { * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -405,7 +527,13 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 081a205e9125..71ce0007da65 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,11 +36,13 @@ public interface FakeClassnameTestApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { @Authorization(value = "api_key_query") }, tags={ "fake_classname_tags 123#$%^", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -48,7 +50,9 @@ public interface FakeClassnameTestApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClassname( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 62ac8b226cc6..f07fa4a7edff 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -37,20 +37,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -64,19 +69,26 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey) { + default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -90,20 +102,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid status value (status code 400) */ + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable) { + default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -132,20 +149,25 @@ public interface PetApi { * or Invalid tag value (status code 400) * @deprecated */ + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable) { + default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + +, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -174,20 +196,26 @@ public interface PetApi { * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId) { + default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -216,22 +244,29 @@ public interface PetApi { * or Pet not found (status code 404) * or Validation exception (status code 405) */ + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -245,19 +280,27 @@ public interface PetApi { * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -271,12 +314,14 @@ public interface PetApi { * @param file file to upload (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -284,7 +329,13 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 65d771ce01bb..22b5b7670284 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -38,15 +38,20 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId) { + default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -58,11 +63,13 @@ public interface StoreApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @RequestMapping( method = RequestMethod.GET, @@ -84,17 +91,23 @@ public interface StoreApi { * or Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId) { + default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -121,16 +134,21 @@ public interface StoreApi { * @return successful operation (status code 200) * or Invalid Order (status code 400) */ + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) - default ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body) { + default ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 69205eeeb18f..27f6a346d300 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -37,14 +37,18 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) - default ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -56,14 +60,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) - default ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -75,14 +83,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) - default ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -96,15 +108,20 @@ public interface UserApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username) { + default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -118,17 +135,23 @@ public interface UserApi { * or Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username) { + default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -156,16 +179,23 @@ public interface UserApi { * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password) { + default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -176,8 +206,10 @@ public interface UserApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, @@ -198,15 +230,22 @@ public interface UserApi { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 8c7e00956c3a..847d9f37777c 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesAnyType */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 864299cf9b28..31b7fad0c945 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesArray */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index b445c7bb0d86..5c23bc8d768e 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesBoolean */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 76a9f4e4c256..82d25ab6e747 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesClass */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 089c1edce9d8..802674f78205 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesInteger */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index f2f8fe6949b0..787a4262026a 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesNumber */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index bcca31ee32a2..271b66cf6820 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesObject */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 829ea052d3e1..08ba6bfe63ce 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesString */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Animal.java index 7fb6b8e2ef66..db4f29350ded 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Animal.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Animal */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index aec96b23f033..bf1b74e83fca 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfArrayOfNumberOnly */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 63a657c8dddf..f1ced8ef71a0 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfNumberOnly */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java index 2a36629dfc75..81c7ab3dd785 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.model.ReadOnlyFirst; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayTest */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java index 587443bb7667..2ccf1e812e5a 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Capitalization */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Cat.java index b32ade551792..0876d9f30a0b 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Cat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Cat */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java index ce9d21ae5ecb..d59a3783d0af 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * CatAllOf */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Category.java index c79594679cf8..ef9a938298b9 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Category.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Category */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java index a462f09a9cb9..af4c74423128 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model with \"_class\" property */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Client.java index 727896658637..298c69c03b17 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Client.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Client */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Dog.java index 229b97f2a7cb..09938cd0f5fc 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Dog.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Dog */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java index 29b736410b76..d95ac4a329d9 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * DogAllOf */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java index ec2d4e1ce8b9..beeff77d9e56 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumArrays */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java index ef4719c757f0..8f82b2f78436 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets EnumClass diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java index f9b00d90ed5b..0ce7ab0f2fa6 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.OuterEnum; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumTest */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 8e4f8d5d5d9d..ea5aa826feb7 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FileSchemaTestClass */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java index 091f7d97f2b5..352d758ce6e5 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FormatTest */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 2dd77785ad55..10e514bb1726 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * HasOnlyReadOnly */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MapTest.java index 7b9a321ecb22..36754fec8c9e 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MapTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MapTest */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index d80573256c63..8238e3227a6b 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,9 +13,13 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java index 3f2d0da5f331..3f8bdc54450d 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name starting with number */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ec7ccfe1417..99a06748ac14 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ModelApiResponse */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java index 5d0c266a148b..d9cc6193aee6 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing reserved words */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Name.java index 3cc5bf64c066..880351d2843a 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Name.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name same as property name */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java index c1cafb126beb..4af42224ae53 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * NumberOnly */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Order.java index 0c9dddf85daf..ba0b3b2e3131 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Order */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java index 7425f5c75890..cdac99f37e41 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * OuterComposite */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java index 6b5abc576b07..d74006b9d33e 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets OuterEnum diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Pet.java index 289be8925e1b..729ef7defa59 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.util.List; import org.openapitools.model.Category; import org.openapitools.model.Tag; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Pet */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 6f4a25b65efe..f872289b8da3 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ReadOnlyFirst */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java index 16e690b5740f..31cc434cd51b 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * SpecialModelName */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Tag.java index 9306b226ea56..2d1ac94412f7 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Tag.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Tag */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java index 80788f31612a..fb29f038fc6b 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderDefault */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java index 963c3c66b57b..096b4ada0991 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderExample */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/User.java index 4a0c635f1adb..3cadd5d4ec50 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/User.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * User */ diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java index 465b94b6a88d..62cfbcc6b285 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * XmlItem */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java index c39c4d2227eb..ba1b869f0363 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -36,8 +36,10 @@ public interface AnotherFakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -45,7 +47,9 @@ public interface AnotherFakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity call123testSpecialTags( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java index 07302b4c7d8c..c22b8c03f8fe 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java @@ -45,15 +45,19 @@ public interface FakeApi { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) - default ResponseEntity createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem) { + default ResponseEntity createXmlItem( + +@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -66,15 +70,19 @@ public interface FakeApi { * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) - default ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body) { + default ResponseEntity fakeOuterBooleanSerialize( + +@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -87,15 +95,19 @@ public interface FakeApi { * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) - default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body) { + default ResponseEntity fakeOuterCompositeSerialize( + +@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { @@ -117,15 +129,19 @@ public interface FakeApi { * @param body Input number as post body (optional) * @return Output number (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) - default ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body) { + default ResponseEntity fakeOuterNumberSerialize( + +@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -138,15 +154,19 @@ public interface FakeApi { * @param body Input string as post body (optional) * @return Output string (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output string", response = String.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) - default ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body) { + default ResponseEntity fakeOuterStringSerialize( + +@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -159,15 +179,19 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) - default ResponseEntity testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body) { + default ResponseEntity testBodyWithFileSchema( + +@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -180,15 +204,21 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query + +, + +@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -201,8 +231,10 @@ public interface FakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -210,7 +242,9 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClientModel( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -246,19 +280,50 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float,@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary,@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date,@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime,@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + default ResponseEntity testEndpointParameters( + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + +@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + +@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + +@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + +@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, + +@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, + +@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, + +@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + +@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -279,16 +344,35 @@ public interface FakeApi { * @return Invalid request (status code 400) * or Not found (status code 404) */ + @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid request"), + @ApiResponse(code = 404, message = "Not found") }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + default ResponseEntity testEnumParameters( +@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray +, +@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString +,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray + +,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble + +, + +@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + +@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -306,14 +390,28 @@ public interface FakeApi { * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup + +, +@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup +,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group + +,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup + +, +@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -325,15 +423,19 @@ public interface FakeApi { * @param param request body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) - default ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Map param) { + default ResponseEntity testInlineAdditionalProperties( + +@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -346,15 +448,21 @@ public interface FakeApi { * @param param2 field2 (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + default ResponseEntity testJsonFormData( + +@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + +@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -371,14 +479,26 @@ public interface FakeApi { * @param context (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context) { + default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -392,12 +512,14 @@ public interface FakeApi { * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -405,7 +527,13 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 081a205e9125..71ce0007da65 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,11 +36,13 @@ public interface FakeClassnameTestApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { @Authorization(value = "api_key_query") }, tags={ "fake_classname_tags 123#$%^", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -48,7 +50,9 @@ public interface FakeClassnameTestApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClassname( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java index b48e45b6068b..b0e4e2c2dc2e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java @@ -38,20 +38,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -65,19 +70,26 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey) { + default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -91,20 +103,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid status value (status code 400) */ + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status) { + default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -133,20 +150,25 @@ public interface PetApi { * or Invalid tag value (status code 400) * @deprecated */ + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags) { + default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -175,20 +197,26 @@ public interface PetApi { * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId) { + default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -217,22 +245,29 @@ public interface PetApi { * or Pet not found (status code 404) * or Validation exception (status code 405) */ + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -246,19 +281,27 @@ public interface PetApi { * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -272,12 +315,14 @@ public interface PetApi { * @param file file to upload (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -285,7 +330,13 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java index 65d771ce01bb..22b5b7670284 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java @@ -38,15 +38,20 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId) { + default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -58,11 +63,13 @@ public interface StoreApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @RequestMapping( method = RequestMethod.GET, @@ -84,17 +91,23 @@ public interface StoreApi { * or Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId) { + default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -121,16 +134,21 @@ public interface StoreApi { * @return successful operation (status code 200) * or Invalid Order (status code 400) */ + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) - default ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body) { + default ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java index 69205eeeb18f..27f6a346d300 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java @@ -37,14 +37,18 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) - default ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -56,14 +60,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) - default ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -75,14 +83,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) - default ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -96,15 +108,20 @@ public interface UserApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username) { + default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -118,17 +135,23 @@ public interface UserApi { * or Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username) { + default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -156,16 +179,23 @@ public interface UserApi { * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password) { + default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -176,8 +206,10 @@ public interface UserApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, @@ -198,15 +230,22 @@ public interface UserApi { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index bb049174195b..6de38b1147e6 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesAnyType */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 31e2f5d206b1..cacb0750801f 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesArray */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index aeb640876a2c..84aa067c80d0 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesBoolean */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 7b6f5ac16c76..afbcf499d332 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesClass */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 49a6b9d41579..acc58a56a368 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesInteger */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 53421c6699f6..be84ad677c57 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesNumber */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 093f44e90bfb..c9e823070d8e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesObject */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 60bb65615475..c62dc11f2ed2 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesString */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Animal.java index 21643177b365..14f743766311 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Animal.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Animal */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 9fa32d2ea9cd..61c61fc91997 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfArrayOfNumberOnly */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 7910abcc6964..3ad7d2361f7c 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfNumberOnly */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayTest.java index cb245ac0b603..4bfc2cfbb4db 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ArrayTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.model.ReadOnlyFirst; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayTest */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCat.java index b6edd21f6d93..ada0edb12a9b 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.BigCatAllOf; import org.openapitools.model.Cat; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCat */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCatAllOf.java index 8875754744fe..461ed180406a 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCatAllOf */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Capitalization.java index 0e18f88f3865..437e279449e5 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Capitalization.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Capitalization */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Cat.java index 5f0126571a8b..12ca73636c60 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Cat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Cat */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/CatAllOf.java index 6953a982a8ac..bb4667b4e2cb 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/CatAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * CatAllOf */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Category.java index 15d9b80c2372..84099ff8042b 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Category.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Category */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ClassModel.java index f1198fa1a3c4..f74c32f05c74 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ClassModel.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model with \"_class\" property */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Client.java index 516c8671745a..55fa62058c17 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Client.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Client */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Dog.java index f81bd6fa78f3..93c917674106 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Dog.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Dog */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/DogAllOf.java index cfedc80fa7e0..025e4d7759b9 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/DogAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * DogAllOf */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java index 0fb3e1449707..30fe225638ea 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumArrays */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumClass.java index 9575f4c28f32..2d83af41c8e3 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumClass.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets EnumClass diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java index b10549a94905..33ea4eacb0f7 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.OuterEnum; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumTest */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 2e1fa7540451..9e9cec096d0b 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FileSchemaTestClass */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java index 7ae4decd1d24..86d421a9d886 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FormatTest */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index e2a75a9f0e30..97d1a64a22d5 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * HasOnlyReadOnly */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java index 7e43d87491dc..726c8b5fcf0d 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MapTest */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 2cab02c3d081..b20b2dec7273 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,9 +13,13 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Model200Response.java index 90397952b59e..f74c29e604cf 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Model200Response.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name starting with number */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelApiResponse.java index 2850c513cfa8..01d035fa32d8 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ModelApiResponse */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelReturn.java index 37ab8e858d55..d17a0da84c8f 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ModelReturn.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing reserved words */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Name.java index 87bbf9823c37..c5882dc983a9 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Name.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name same as property name */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/NumberOnly.java index 96b2bda9c408..fc212048b084 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/NumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * NumberOnly */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java index a4575fdf1d85..ede10667c9d7 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Order */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java index 181c98b2b6d9..0e0d3dc1c394 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterComposite.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * OuterComposite */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterEnum.java index aa1dd337f5dd..e293d46d7b43 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterEnum.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets OuterEnum diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java index 06647f494bcb..0c6d47b33a4a 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -13,9 +14,13 @@ import java.util.Set; import org.openapitools.model.Category; import org.openapitools.model.Tag; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Pet */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ReadOnlyFirst.java index dc9812baee6d..1ddffebe8f53 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ReadOnlyFirst */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/SpecialModelName.java index cf55f23775ca..32a7f5a8851a 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/SpecialModelName.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * SpecialModelName */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Tag.java index 8bc9dc399f8a..96053497912d 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Tag.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Tag */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderDefault.java index 70f7a789f6b8..91863ff730f2 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderDefault */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderExample.java index 56092259288e..9d2b60593521 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderExample */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/User.java index 12737b21d294..3fa19e61270a 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/User.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * User */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/XmlItem.java index 75eb7b6f26db..5d477653f0c2 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/XmlItem.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * XmlItem */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index a84f97e7071b..e6d35a4c351e 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -28,8 +28,10 @@ public interface AnotherFakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -37,6 +39,8 @@ public interface AnotherFakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - ResponseEntity call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body); + ResponseEntity call123testSpecialTags( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body); } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java index e22ac97a74a4..ec32cf448bff 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -40,7 +40,9 @@ public class AnotherFakeApiController implements AnotherFakeApi { * @return successful operation (status code 200) * @see AnotherFakeApi#call123testSpecialTags */ - public ResponseEntity call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + public ResponseEntity call123testSpecialTags( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"client\" : \"client\" }"; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index c8bbc2eca2dc..8ba25d828cb5 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -37,15 +37,19 @@ public interface FakeApi { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) - ResponseEntity createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem); + ResponseEntity createXmlItem( + +@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem); /** @@ -55,15 +59,19 @@ public interface FakeApi { * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) - ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body); + ResponseEntity fakeOuterBooleanSerialize( + +@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body); /** @@ -73,15 +81,19 @@ public interface FakeApi { * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) - ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body); + ResponseEntity fakeOuterCompositeSerialize( + +@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body); /** @@ -91,15 +103,19 @@ public interface FakeApi { * @param body Input number as post body (optional) * @return Output number (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) - ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body); + ResponseEntity fakeOuterNumberSerialize( + +@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body); /** @@ -109,15 +125,19 @@ public interface FakeApi { * @param body Input string as post body (optional) * @return Output string (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output string", response = String.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) - ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body); + ResponseEntity fakeOuterStringSerialize( + +@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body); /** @@ -127,15 +147,19 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) - ResponseEntity testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body); + ResponseEntity testBodyWithFileSchema( + +@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body); /** @@ -145,15 +169,21 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody User body); + ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query + +, + +@ApiParam(value = "", required = true ) @Valid @RequestBody User body); /** @@ -163,8 +193,10 @@ public interface FakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -172,7 +204,9 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - ResponseEntity testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body); + ResponseEntity testClientModel( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body); /** @@ -196,19 +230,50 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - ResponseEntity testEndpointParameters(@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float,@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary,@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date,@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime,@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback); + ResponseEntity testEndpointParameters( + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + +@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + +@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + +@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + +@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, + +@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, + +@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, + +@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + +@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback); /** @@ -226,16 +291,35 @@ public interface FakeApi { * @return Invalid request (status code 400) * or Not found (status code 404) */ + @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid request"), + @ApiResponse(code = 404, message = "Not found") }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString); + ResponseEntity testEnumParameters( +@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray +, +@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString +,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray + +,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble + +, + +@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + +@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString); /** @@ -250,14 +334,28 @@ public interface FakeApi { * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group); + ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup + +, +@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup +,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group + +,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup + +, +@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + +); /** @@ -266,15 +364,19 @@ public interface FakeApi { * @param param request body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) - ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Map param); + ResponseEntity testInlineAdditionalProperties( + +@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param); /** @@ -284,15 +386,21 @@ public interface FakeApi { * @param param2 field2 (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) - ResponseEntity testJsonFormData(@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2); + ResponseEntity testJsonFormData( + +@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + +@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2); /** @@ -306,14 +414,26 @@ public interface FakeApi { * @param context (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context); + ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + +); /** @@ -324,12 +444,14 @@ public interface FakeApi { * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -337,6 +459,12 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata); + ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata); } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java index ab53df36903a..227840431fb3 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java @@ -49,7 +49,9 @@ public class FakeApiController implements FakeApi { * @return successful operation (status code 200) * @see FakeApi#createXmlItem */ - public ResponseEntity createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem) { + public ResponseEntity createXmlItem( + +@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -62,7 +64,9 @@ public class FakeApiController implements FakeApi { * @return Output boolean (status code 200) * @see FakeApi#fakeOuterBooleanSerialize */ - public ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body) { + public ResponseEntity fakeOuterBooleanSerialize( + +@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -75,7 +79,9 @@ public class FakeApiController implements FakeApi { * @return Output composite (status code 200) * @see FakeApi#fakeOuterCompositeSerialize */ - public ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body) { + public ResponseEntity fakeOuterCompositeSerialize( + +@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true }"; @@ -95,7 +101,9 @@ public class FakeApiController implements FakeApi { * @return Output number (status code 200) * @see FakeApi#fakeOuterNumberSerialize */ - public ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body) { + public ResponseEntity fakeOuterNumberSerialize( + +@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -108,7 +116,9 @@ public class FakeApiController implements FakeApi { * @return Output string (status code 200) * @see FakeApi#fakeOuterStringSerialize */ - public ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body) { + public ResponseEntity fakeOuterStringSerialize( + +@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -121,7 +131,9 @@ public class FakeApiController implements FakeApi { * @return Success (status code 200) * @see FakeApi#testBodyWithFileSchema */ - public ResponseEntity testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body) { + public ResponseEntity testBodyWithFileSchema( + +@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -134,7 +146,11 @@ public class FakeApiController implements FakeApi { * @return Success (status code 200) * @see FakeApi#testBodyWithQueryParams */ - public ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody User body) { + public ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query + +, + +@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -147,7 +163,9 @@ public class FakeApiController implements FakeApi { * @return successful operation (status code 200) * @see FakeApi#testClientModel */ - public ResponseEntity testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + public ResponseEntity testClientModel( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"client\" : \"client\" }"; @@ -181,7 +199,35 @@ public class FakeApiController implements FakeApi { * or User not found (status code 404) * @see FakeApi#testEndpointParameters */ - public ResponseEntity testEndpointParameters(@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float,@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary,@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date,@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime,@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + public ResponseEntity testEndpointParameters( + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + +@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + +@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + +@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + +@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, + +@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, + +@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, + +@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + +@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -202,7 +248,23 @@ public class FakeApiController implements FakeApi { * or Not found (status code 404) * @see FakeApi#testEnumParameters */ - public ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + public ResponseEntity testEnumParameters( +@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray +, +@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString +,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray + +,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble + +, + +@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + +@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -220,7 +282,19 @@ public class FakeApiController implements FakeApi { * @return Someting wrong (status code 400) * @see FakeApi#testGroupParameters */ - public ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + public ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup + +, +@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup +,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group + +,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup + +, +@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -232,7 +306,9 @@ public class FakeApiController implements FakeApi { * @return successful operation (status code 200) * @see FakeApi#testInlineAdditionalProperties */ - public ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Map param) { + public ResponseEntity testInlineAdditionalProperties( + +@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -245,7 +321,11 @@ public class FakeApiController implements FakeApi { * @return successful operation (status code 200) * @see FakeApi#testJsonFormData */ - public ResponseEntity testJsonFormData(@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + public ResponseEntity testJsonFormData( + +@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + +@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -262,7 +342,17 @@ public class FakeApiController implements FakeApi { * @return Success (status code 200) * @see FakeApi#testQueryParameterCollectionFormat */ - public ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context) { + public ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -276,7 +366,13 @@ public class FakeApiController implements FakeApi { * @return successful operation (status code 200) * @see FakeApi#uploadFileWithRequiredFile */ - public ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + public ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e0555ba889ea..f1102a0f069e 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -28,11 +28,13 @@ public interface FakeClassnameTestApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { @Authorization(value = "api_key_query") }, tags={ "fake_classname_tags 123#$%^", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -40,6 +42,8 @@ public interface FakeClassnameTestApi { produces = { "application/json" }, consumes = { "application/json" } ) - ResponseEntity testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body); + ResponseEntity testClassname( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body); } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 14b1f124d13f..80e92bdeaf15 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -40,7 +40,9 @@ public class FakeClassnameTestApiController implements FakeClassnameTestApi { * @return successful operation (status code 200) * @see FakeClassnameTestApi#testClassname */ - public ResponseEntity testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + public ResponseEntity testClassname( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"client\" : \"client\" }"; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index 8a1e70ad495b..9033b9ba3087 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -30,20 +30,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) - ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body); + ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); /** @@ -54,19 +59,26 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey); + ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +); /** @@ -77,20 +89,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid status value (status code 400) */ + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status); + ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +); /** @@ -102,20 +119,25 @@ public interface PetApi { * or Invalid tag value (status code 400) * @deprecated */ + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags); + ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + +); /** @@ -127,20 +149,26 @@ public interface PetApi { * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId); + ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +); /** @@ -152,22 +180,29 @@ public interface PetApi { * or Pet not found (status code 404) * or Validation exception (status code 405) */ + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) - ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body); + ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); /** @@ -178,19 +213,27 @@ public interface PetApi { * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status); + ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status); /** @@ -201,12 +244,14 @@ public interface PetApi { * @param file file to upload (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -214,6 +259,12 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file); + ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file); } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java index f2945cc6db34..4905ee8920bd 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApiController.java @@ -42,7 +42,9 @@ public class PetApiController implements PetApi { * or Invalid input (status code 405) * @see PetApi#addPet */ - public ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + public ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -56,7 +58,11 @@ public class PetApiController implements PetApi { * or Invalid pet value (status code 400) * @see PetApi#deletePet */ - public ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey) { + public ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -70,7 +76,9 @@ public class PetApiController implements PetApi { * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - public ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status) { + public ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; @@ -97,7 +105,9 @@ public class PetApiController implements PetApi { * @deprecated * @see PetApi#findPetsByTags */ - public ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags) { + public ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + +) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; @@ -124,7 +134,9 @@ public class PetApiController implements PetApi { * or Pet not found (status code 404) * @see PetApi#getPetById */ - public ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId) { + public ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; @@ -151,7 +163,9 @@ public class PetApiController implements PetApi { * or Validation exception (status code 405) * @see PetApi#updatePet */ - public ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + public ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -165,7 +179,13 @@ public class PetApiController implements PetApi { * @return Invalid input (status code 405) * @see PetApi#updatePetWithForm */ - public ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + public ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -179,7 +199,13 @@ public class PetApiController implements PetApi { * @return successful operation (status code 200) * @see PetApi#uploadFile */ - public ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + public ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index f31855d1318e..29a3d124c55c 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -30,15 +30,20 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId); + ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + +); /** @@ -47,11 +52,13 @@ public interface StoreApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @RequestMapping( method = RequestMethod.GET, @@ -70,17 +77,23 @@ public interface StoreApi { * or Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId); + ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + +); /** @@ -90,15 +103,20 @@ public interface StoreApi { * @return successful operation (status code 200) * or Invalid Order (status code 400) */ + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) - ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body); + ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body); } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java index 4e95605bddbc..392213709825 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApiController.java @@ -42,7 +42,9 @@ public class StoreApiController implements StoreApi { * or Order not found (status code 404) * @see StoreApi#deleteOrder */ - public ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId) { + public ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -69,7 +71,9 @@ public class StoreApiController implements StoreApi { * or Order not found (status code 404) * @see StoreApi#getOrderById */ - public ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId) { + public ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + +) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; @@ -94,7 +98,9 @@ public class StoreApiController implements StoreApi { * or Invalid Order (status code 400) * @see StoreApi#placeOrder */ - public ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body) { + public ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index 510d11d8e9e0..f96ae9134403 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -29,14 +29,18 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) - ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body); + ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body); /** @@ -45,14 +49,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) - ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body); + ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); /** @@ -61,14 +69,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) - ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body); + ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); /** @@ -79,15 +91,20 @@ public interface UserApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username); + ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +); /** @@ -98,17 +115,23 @@ public interface UserApi { * or Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username); + ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +); /** @@ -119,16 +142,23 @@ public interface UserApi { * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password); + ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +); /** @@ -136,8 +166,10 @@ public interface UserApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, @@ -155,14 +187,21 @@ public interface UserApi { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body); + ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body); } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java index 9f5ad372d5a8..a749387b89f1 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java @@ -41,7 +41,9 @@ public class UserApiController implements UserApi { * @return successful operation (status code 200) * @see UserApi#createUser */ - public ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body) { + public ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -53,7 +55,9 @@ public class UserApiController implements UserApi { * @return successful operation (status code 200) * @see UserApi#createUsersWithArrayInput */ - public ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + public ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -65,7 +69,9 @@ public class UserApiController implements UserApi { * @return successful operation (status code 200) * @see UserApi#createUsersWithListInput */ - public ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + public ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -79,7 +85,9 @@ public class UserApiController implements UserApi { * or User not found (status code 404) * @see UserApi#deleteUser */ - public ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username) { + public ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -93,7 +101,9 @@ public class UserApiController implements UserApi { * or User not found (status code 404) * @see UserApi#getUserByName */ - public ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username) { + public ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; @@ -119,7 +129,11 @@ public class UserApiController implements UserApi { * or Invalid username/password supplied (status code 400) * @see UserApi#loginUser */ - public ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password) { + public ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -145,7 +159,11 @@ public class UserApiController implements UserApi { * or User not found (status code 404) * @see UserApi#updateUser */ - public ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body) { + public ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index ca35a4dabdbe..66ec66896784 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,6 +11,9 @@ import java.util.Map; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesAnyType */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 3b70a93bfb68..aeb477e916f2 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import java.util.Map; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesArray */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index d0096c55cb18..4631883198a5 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,6 +11,9 @@ import java.util.Map; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesBoolean */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 70048242f0c7..8b8eaffbe717 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,6 +13,9 @@ import java.util.Map; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 74abe89e2eba..30654d0bec87 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,6 +11,9 @@ import java.util.Map; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesInteger */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index 824a44a55708..1a2c2a018f13 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import java.util.Map; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesNumber */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index cc8a8acc0d4f..4f14fb1747d0 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,6 +11,9 @@ import java.util.Map; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesObject */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index fb81a46af400..3cbd66fa9308 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,6 +11,9 @@ import java.util.Map; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesString */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java index 6c1b4f75d082..65534bbd4e39 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,6 +11,9 @@ import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Animal */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index cf1959a11e24..6366e913a321 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import java.util.List; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index ca0c1058d604..373e9f19c382 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import java.util.List; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java index 47de6885c4d3..209d51c584d3 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ArrayTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.model.ReadOnlyFirst; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayTest */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java index de0fcc89cac8..f0fa16873cb8 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.model.Cat; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCat */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java index c828f01f4026..a296dfc58190 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCatAllOf */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java index 9dc3270d4e24..638fd85562a5 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Capitalization.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,6 +9,9 @@ import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Capitalization */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java index 94756b3484ec..f1a6ba0ecd89 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,6 +11,9 @@ import org.openapitools.model.CatAllOf; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Cat */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java index 9d4ec215e785..166fdfaf7c88 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,6 +9,9 @@ import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * CatAllOf */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java index 7e0770622f47..3ca433624284 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,6 +9,9 @@ import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Category */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java index 328bae149d12..314cec6e2053 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ClassModel.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,6 +9,9 @@ import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model with \"_class\" property */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java index 594c1b919fb5..1853eeff5f03 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Client.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,6 +9,9 @@ import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Client */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java index a252c04222c6..e1d49d613485 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,6 +11,9 @@ import org.openapitools.model.DogAllOf; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Dog */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java index 9b41745ce153..0249347555d8 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,6 +9,9 @@ import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * DogAllOf */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java index 775b965f0640..2c22712b9ce4 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumArrays.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import java.util.List; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumArrays */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java index b3c09b9f30e3..344a5cc7f8d9 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumClass.java @@ -1,11 +1,16 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets EnumClass diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java index 21c7724914f2..47feac7def26 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,6 +11,9 @@ import org.openapitools.model.OuterEnum; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumTest */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 9d8809347cf6..6bb5c5c059ef 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,6 +11,9 @@ import java.util.List; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FileSchemaTestClass */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java index fa93af8fcdad..d7d44db402c7 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -13,6 +14,9 @@ import org.threeten.bp.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FormatTest */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 105d23165aa1..055eaea62215 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,6 +9,9 @@ import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * HasOnlyReadOnly */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java index ef38614ddc71..777ec8f061f8 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MapTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,6 +13,9 @@ import java.util.Map; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MapTest */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 6e5065a7f044..31f0e9691e44 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -14,6 +15,9 @@ import org.threeten.bp.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java index 56d627978a9b..a523a095a0d0 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Model200Response.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,6 +9,9 @@ import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name starting with number */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java index 9af9c13b9065..e2c8aca9fccb 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,6 +9,9 @@ import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ModelApiResponse */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java index ec3f1fc6b937..2887e82ae242 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ModelReturn.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,6 +9,9 @@ import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing reserved words */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java index 09c05ca6d10f..e90e446667d0 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,6 +9,9 @@ import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name same as property name */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java index 82239239bda6..e7453ce92624 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/NumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import java.math.BigDecimal; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * NumberOnly */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java index 43f887d1fc29..d90339edc7e3 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,6 +11,9 @@ import org.threeten.bp.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Order */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java index 0657c9fbe6ab..44d5a9dc16d6 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterComposite.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import java.math.BigDecimal; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * OuterComposite */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java index 075522bdeffb..214947f375cd 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/OuterEnum.java @@ -1,11 +1,16 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets OuterEnum diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java index aa1605a65d58..2c0efd3d18a6 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -15,6 +16,9 @@ import org.openapitools.model.Tag; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Pet */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 05ab3a4d0c76..af3367a7ffc1 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,6 +9,9 @@ import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ReadOnlyFirst */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java index b3616c034baf..6cde569d9c0b 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/SpecialModelName.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,6 +9,9 @@ import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * SpecialModelName */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java index 053950ec28cc..219b5ef9b872 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Tag.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,6 +9,9 @@ import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Tag */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java index 029e340bfd60..5ddbf1ebca16 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import java.util.List; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderDefault */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java index 0f0c046e1ca7..ad7786409091 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import java.util.List; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderExample */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java index 24c2f10976f7..6e56bc32a2e5 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/User.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,6 +9,9 @@ import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * User */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java index 48690657a23f..621f973ebaeb 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/XmlItem.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import java.util.List; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * XmlItem */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java index c39c4d2227eb..ba1b869f0363 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -36,8 +36,10 @@ public interface AnotherFakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -45,7 +47,9 @@ public interface AnotherFakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity call123testSpecialTags( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index 07302b4c7d8c..c22b8c03f8fe 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java @@ -45,15 +45,19 @@ public interface FakeApi { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) - default ResponseEntity createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem) { + default ResponseEntity createXmlItem( + +@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -66,15 +70,19 @@ public interface FakeApi { * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) - default ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body) { + default ResponseEntity fakeOuterBooleanSerialize( + +@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -87,15 +95,19 @@ public interface FakeApi { * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) - default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body) { + default ResponseEntity fakeOuterCompositeSerialize( + +@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { @@ -117,15 +129,19 @@ public interface FakeApi { * @param body Input number as post body (optional) * @return Output number (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) - default ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body) { + default ResponseEntity fakeOuterNumberSerialize( + +@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -138,15 +154,19 @@ public interface FakeApi { * @param body Input string as post body (optional) * @return Output string (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output string", response = String.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) - default ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body) { + default ResponseEntity fakeOuterStringSerialize( + +@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -159,15 +179,19 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) - default ResponseEntity testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body) { + default ResponseEntity testBodyWithFileSchema( + +@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -180,15 +204,21 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query + +, + +@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -201,8 +231,10 @@ public interface FakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -210,7 +242,9 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClientModel( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -246,19 +280,50 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float,@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary,@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date,@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime,@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + default ResponseEntity testEndpointParameters( + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + +@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + +@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + +@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + +@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, + +@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, + +@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, + +@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + +@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -279,16 +344,35 @@ public interface FakeApi { * @return Invalid request (status code 400) * or Not found (status code 404) */ + @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid request"), + @ApiResponse(code = 404, message = "Not found") }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + default ResponseEntity testEnumParameters( +@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray +, +@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString +,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray + +,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble + +, + +@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + +@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -306,14 +390,28 @@ public interface FakeApi { * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup + +, +@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup +,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group + +,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup + +, +@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -325,15 +423,19 @@ public interface FakeApi { * @param param request body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) - default ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Map param) { + default ResponseEntity testInlineAdditionalProperties( + +@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -346,15 +448,21 @@ public interface FakeApi { * @param param2 field2 (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + default ResponseEntity testJsonFormData( + +@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + +@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -371,14 +479,26 @@ public interface FakeApi { * @param context (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context) { + default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -392,12 +512,14 @@ public interface FakeApi { * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -405,7 +527,13 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 081a205e9125..71ce0007da65 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,11 +36,13 @@ public interface FakeClassnameTestApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { @Authorization(value = "api_key_query") }, tags={ "fake_classname_tags 123#$%^", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -48,7 +50,9 @@ public interface FakeClassnameTestApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClassname( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index b48e45b6068b..b0e4e2c2dc2e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -38,20 +38,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -65,19 +70,26 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey) { + default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -91,20 +103,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid status value (status code 400) */ + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status) { + default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -133,20 +150,25 @@ public interface PetApi { * or Invalid tag value (status code 400) * @deprecated */ + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags) { + default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -175,20 +197,26 @@ public interface PetApi { * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId) { + default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -217,22 +245,29 @@ public interface PetApi { * or Pet not found (status code 404) * or Validation exception (status code 405) */ + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -246,19 +281,27 @@ public interface PetApi { * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -272,12 +315,14 @@ public interface PetApi { * @param file file to upload (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -285,7 +330,13 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java index 65d771ce01bb..22b5b7670284 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java @@ -38,15 +38,20 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId) { + default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -58,11 +63,13 @@ public interface StoreApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @RequestMapping( method = RequestMethod.GET, @@ -84,17 +91,23 @@ public interface StoreApi { * or Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId) { + default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -121,16 +134,21 @@ public interface StoreApi { * @return successful operation (status code 200) * or Invalid Order (status code 400) */ + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) - default ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body) { + default ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java index 69205eeeb18f..27f6a346d300 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java @@ -37,14 +37,18 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) - default ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -56,14 +60,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) - default ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -75,14 +83,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) - default ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -96,15 +108,20 @@ public interface UserApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username) { + default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -118,17 +135,23 @@ public interface UserApi { * or Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username) { + default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -156,16 +179,23 @@ public interface UserApi { * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password) { + default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -176,8 +206,10 @@ public interface UserApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, @@ -198,15 +230,22 @@ public interface UserApi { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 8c7e00956c3a..847d9f37777c 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesAnyType */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 864299cf9b28..31b7fad0c945 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesArray */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index b445c7bb0d86..5c23bc8d768e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesBoolean */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 76a9f4e4c256..82d25ab6e747 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 089c1edce9d8..802674f78205 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesInteger */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index f2f8fe6949b0..787a4262026a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesNumber */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index bcca31ee32a2..271b66cf6820 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesObject */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 829ea052d3e1..08ba6bfe63ce 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesString */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java index 1319038cccc0..7598b6f55612 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Animal */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index aec96b23f033..bf1b74e83fca 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 63a657c8dddf..f1ced8ef71a0 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java index 2a36629dfc75..81c7ab3dd785 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ArrayTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.model.ReadOnlyFirst; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayTest */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java index c7912d432b77..1835c7bf2114 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.BigCatAllOf; import org.openapitools.model.Cat; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCat */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java index aba5eb47270c..43555f5bfed0 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCatAllOf */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java index 587443bb7667..2ccf1e812e5a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Capitalization.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Capitalization */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java index b32ade551792..0876d9f30a0b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Cat */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/CatAllOf.java index ce9d21ae5ecb..d59a3783d0af 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/CatAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * CatAllOf */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java index c79594679cf8..ef9a938298b9 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Category */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java index a462f09a9cb9..af4c74423128 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ClassModel.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model with \"_class\" property */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java index 727896658637..298c69c03b17 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Client.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Client */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java index 229b97f2a7cb..09938cd0f5fc 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Dog */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/DogAllOf.java index 29b736410b76..d95ac4a329d9 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/DogAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * DogAllOf */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java index ec2d4e1ce8b9..beeff77d9e56 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumArrays */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumClass.java index ef4719c757f0..8f82b2f78436 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumClass.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets EnumClass diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java index f9b00d90ed5b..0ce7ab0f2fa6 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.OuterEnum; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumTest */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 8e4f8d5d5d9d..ea5aa826feb7 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FileSchemaTestClass */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java index 091f7d97f2b5..352d758ce6e5 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FormatTest */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 2dd77785ad55..10e514bb1726 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * HasOnlyReadOnly */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java index 7b9a321ecb22..36754fec8c9e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MapTest */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index d80573256c63..8238e3227a6b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,9 +13,13 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java index 3f2d0da5f331..3f8bdc54450d 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Model200Response.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name starting with number */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ec7ccfe1417..99a06748ac14 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ModelApiResponse */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java index 5d0c266a148b..d9cc6193aee6 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ModelReturn.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing reserved words */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java index 3cc5bf64c066..880351d2843a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name same as property name */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java index c1cafb126beb..4af42224ae53 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/NumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * NumberOnly */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java index 0c9dddf85daf..ba0b3b2e3131 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Order */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java index 7425f5c75890..cdac99f37e41 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterComposite.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * OuterComposite */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterEnum.java index 6b5abc576b07..d74006b9d33e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterEnum.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets OuterEnum diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java index 5f44cab5669e..7f4aa1ef8b12 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -13,9 +14,13 @@ import java.util.Set; import org.openapitools.model.Category; import org.openapitools.model.Tag; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Pet */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 6f4a25b65efe..f872289b8da3 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ReadOnlyFirst */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java index 16e690b5740f..31cc434cd51b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/SpecialModelName.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * SpecialModelName */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java index 9306b226ea56..2d1ac94412f7 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Tag.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Tag */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java index 80788f31612a..fb29f038fc6b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderDefault */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java index 963c3c66b57b..096b4ada0991 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderExample */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java index 4a0c635f1adb..3cadd5d4ec50 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/User.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * User */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java index 465b94b6a88d..62cfbcc6b285 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/XmlItem.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * XmlItem */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 8a2205e990fe..b41fa1a1b795 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -32,8 +32,10 @@ public interface AnotherFakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -41,7 +43,9 @@ public interface AnotherFakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity call123testSpecialTags( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { return getDelegate().call123testSpecialTags(body); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java index b72e307f9750..70ea9673e92b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -41,15 +41,19 @@ public interface FakeApi { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) - default ResponseEntity createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem) { + default ResponseEntity createXmlItem( + +@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { return getDelegate().createXmlItem(xmlItem); } @@ -61,15 +65,19 @@ public interface FakeApi { * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) - default ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body) { + default ResponseEntity fakeOuterBooleanSerialize( + +@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { return getDelegate().fakeOuterBooleanSerialize(body); } @@ -81,15 +89,19 @@ public interface FakeApi { * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) - default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body) { + default ResponseEntity fakeOuterCompositeSerialize( + +@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { return getDelegate().fakeOuterCompositeSerialize(body); } @@ -101,15 +113,19 @@ public interface FakeApi { * @param body Input number as post body (optional) * @return Output number (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) - default ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body) { + default ResponseEntity fakeOuterNumberSerialize( + +@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { return getDelegate().fakeOuterNumberSerialize(body); } @@ -121,15 +137,19 @@ public interface FakeApi { * @param body Input string as post body (optional) * @return Output string (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output string", response = String.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) - default ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body) { + default ResponseEntity fakeOuterStringSerialize( + +@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { return getDelegate().fakeOuterStringSerialize(body); } @@ -141,15 +161,19 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) - default ResponseEntity testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body) { + default ResponseEntity testBodyWithFileSchema( + +@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { return getDelegate().testBodyWithFileSchema(body); } @@ -161,15 +185,21 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query + +, + +@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { return getDelegate().testBodyWithQueryParams(query, body); } @@ -181,8 +211,10 @@ public interface FakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -190,7 +222,9 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClientModel( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { return getDelegate().testClientModel(body); } @@ -216,19 +250,50 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float,@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary,@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date,@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime,@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + default ResponseEntity testEndpointParameters( + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + +@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + +@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + +@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + +@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, + +@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, + +@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, + +@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + +@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { return getDelegate().testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } @@ -248,16 +313,35 @@ public interface FakeApi { * @return Invalid request (status code 400) * or Not found (status code 404) */ + @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid request"), + @ApiResponse(code = 404, message = "Not found") }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + default ResponseEntity testEnumParameters( +@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray +, +@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString +,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray + +,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble + +, + +@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + +@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -274,14 +358,28 @@ public interface FakeApi { * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup + +, +@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup +,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group + +,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup + +, +@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + +) { return getDelegate().testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -292,15 +390,19 @@ public interface FakeApi { * @param param request body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) - default ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Map param) { + default ResponseEntity testInlineAdditionalProperties( + +@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { return getDelegate().testInlineAdditionalProperties(param); } @@ -312,15 +414,21 @@ public interface FakeApi { * @param param2 field2 (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + default ResponseEntity testJsonFormData( + +@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + +@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { return getDelegate().testJsonFormData(param, param2); } @@ -336,14 +444,26 @@ public interface FakeApi { * @param context (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context) { + default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + +) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } @@ -356,12 +476,14 @@ public interface FakeApi { * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -369,7 +491,13 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { return getDelegate().uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 7b84b8cd51ae..231633cb34e6 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -32,11 +32,13 @@ public interface FakeClassnameTestApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { @Authorization(value = "api_key_query") }, tags={ "fake_classname_tags 123#$%^", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -44,7 +46,9 @@ public interface FakeClassnameTestApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClassname( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { return getDelegate().testClassname(body); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index dccec075e5aa..8186ae2e5b32 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -34,20 +34,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return getDelegate().addPet(body); } @@ -60,19 +65,26 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey) { + default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +) { return getDelegate().deletePet(petId, apiKey); } @@ -85,20 +97,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid status value (status code 400) */ + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status) { + default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +) { return getDelegate().findPetsByStatus(status); } @@ -112,20 +129,25 @@ public interface PetApi { * or Invalid tag value (status code 400) * @deprecated */ + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags) { + default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + +) { return getDelegate().findPetsByTags(tags); } @@ -139,20 +161,26 @@ public interface PetApi { * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId) { + default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +) { return getDelegate().getPetById(petId); } @@ -166,22 +194,29 @@ public interface PetApi { * or Pet not found (status code 404) * or Validation exception (status code 405) */ + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return getDelegate().updatePet(body); } @@ -194,19 +229,27 @@ public interface PetApi { * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { return getDelegate().updatePetWithForm(petId, name, status); } @@ -219,12 +262,14 @@ public interface PetApi { * @param file file to upload (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -232,7 +277,13 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { return getDelegate().uploadFile(petId, additionalMetadata, file); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java index 2a0cfabab4b8..01a5e332fc45 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -34,15 +34,20 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId) { + default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + +) { return getDelegate().deleteOrder(orderId); } @@ -53,11 +58,13 @@ public interface StoreApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @RequestMapping( method = RequestMethod.GET, @@ -78,17 +85,23 @@ public interface StoreApi { * or Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId) { + default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + +) { return getDelegate().getOrderById(orderId); } @@ -100,16 +113,21 @@ public interface StoreApi { * @return successful operation (status code 200) * or Invalid Order (status code 400) */ + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) - default ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body) { + default ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { return getDelegate().placeOrder(body); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java index 59615e8d21c1..c6a6fa866994 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java @@ -33,14 +33,18 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) - default ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { return getDelegate().createUser(body); } @@ -51,14 +55,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) - default ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return getDelegate().createUsersWithArrayInput(body); } @@ -69,14 +77,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) - default ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return getDelegate().createUsersWithListInput(body); } @@ -89,15 +101,20 @@ public interface UserApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username) { + default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +) { return getDelegate().deleteUser(username); } @@ -110,17 +127,23 @@ public interface UserApi { * or Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username) { + default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +) { return getDelegate().getUserByName(username); } @@ -133,16 +156,23 @@ public interface UserApi { * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password) { + default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +) { return getDelegate().loginUser(username, password); } @@ -152,8 +182,10 @@ public interface UserApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, @@ -173,15 +205,22 @@ public interface UserApi { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { return getDelegate().updateUser(username, body); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 8c7e00956c3a..847d9f37777c 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesAnyType */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 864299cf9b28..31b7fad0c945 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesArray */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index b445c7bb0d86..5c23bc8d768e 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesBoolean */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 76a9f4e4c256..82d25ab6e747 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 089c1edce9d8..802674f78205 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesInteger */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index f2f8fe6949b0..787a4262026a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesNumber */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index bcca31ee32a2..271b66cf6820 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesObject */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 829ea052d3e1..08ba6bfe63ce 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesString */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java index 1319038cccc0..7598b6f55612 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Animal */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index aec96b23f033..bf1b74e83fca 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 63a657c8dddf..f1ced8ef71a0 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java index 2a36629dfc75..81c7ab3dd785 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ArrayTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.model.ReadOnlyFirst; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayTest */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java index c7912d432b77..1835c7bf2114 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.BigCatAllOf; import org.openapitools.model.Cat; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCat */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java index aba5eb47270c..43555f5bfed0 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCatAllOf */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java index 587443bb7667..2ccf1e812e5a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Capitalization.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Capitalization */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java index b32ade551792..0876d9f30a0b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Cat */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/CatAllOf.java index ce9d21ae5ecb..d59a3783d0af 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/CatAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * CatAllOf */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java index c79594679cf8..ef9a938298b9 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Category */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java index a462f09a9cb9..af4c74423128 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ClassModel.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model with \"_class\" property */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java index 727896658637..298c69c03b17 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Client.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Client */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java index 229b97f2a7cb..09938cd0f5fc 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Dog */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/DogAllOf.java index 29b736410b76..d95ac4a329d9 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/DogAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * DogAllOf */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java index ec2d4e1ce8b9..beeff77d9e56 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumArrays */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumClass.java index ef4719c757f0..8f82b2f78436 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumClass.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets EnumClass diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java index f9b00d90ed5b..0ce7ab0f2fa6 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.OuterEnum; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumTest */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 8e4f8d5d5d9d..ea5aa826feb7 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FileSchemaTestClass */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java index 091f7d97f2b5..352d758ce6e5 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FormatTest */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 2dd77785ad55..10e514bb1726 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * HasOnlyReadOnly */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java index 7b9a321ecb22..36754fec8c9e 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MapTest */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index d80573256c63..8238e3227a6b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,9 +13,13 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java index 3f2d0da5f331..3f8bdc54450d 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Model200Response.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name starting with number */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ec7ccfe1417..99a06748ac14 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ModelApiResponse */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java index 5d0c266a148b..d9cc6193aee6 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ModelReturn.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing reserved words */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java index 3cc5bf64c066..880351d2843a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name same as property name */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java index c1cafb126beb..4af42224ae53 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/NumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * NumberOnly */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java index 0c9dddf85daf..ba0b3b2e3131 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Order */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java index 7425f5c75890..cdac99f37e41 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterComposite.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * OuterComposite */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterEnum.java index 6b5abc576b07..d74006b9d33e 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterEnum.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets OuterEnum diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java index 5f44cab5669e..7f4aa1ef8b12 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -13,9 +14,13 @@ import java.util.Set; import org.openapitools.model.Category; import org.openapitools.model.Tag; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Pet */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 6f4a25b65efe..f872289b8da3 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ReadOnlyFirst */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java index 16e690b5740f..31cc434cd51b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/SpecialModelName.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * SpecialModelName */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java index 9306b226ea56..2d1ac94412f7 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Tag.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Tag */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index 80788f31612a..fb29f038fc6b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderDefault */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index 963c3c66b57b..096b4ada0991 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderExample */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java index 4a0c635f1adb..3cadd5d4ec50 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/User.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * User */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java index 465b94b6a88d..62cfbcc6b285 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * XmlItem */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index 8a2205e990fe..b41fa1a1b795 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -32,8 +32,10 @@ public interface AnotherFakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -41,7 +43,9 @@ public interface AnotherFakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity call123testSpecialTags( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { return getDelegate().call123testSpecialTags(body); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index b72e307f9750..70ea9673e92b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -41,15 +41,19 @@ public interface FakeApi { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) - default ResponseEntity createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem) { + default ResponseEntity createXmlItem( + +@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { return getDelegate().createXmlItem(xmlItem); } @@ -61,15 +65,19 @@ public interface FakeApi { * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) - default ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body) { + default ResponseEntity fakeOuterBooleanSerialize( + +@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { return getDelegate().fakeOuterBooleanSerialize(body); } @@ -81,15 +89,19 @@ public interface FakeApi { * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) - default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body) { + default ResponseEntity fakeOuterCompositeSerialize( + +@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { return getDelegate().fakeOuterCompositeSerialize(body); } @@ -101,15 +113,19 @@ public interface FakeApi { * @param body Input number as post body (optional) * @return Output number (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) - default ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body) { + default ResponseEntity fakeOuterNumberSerialize( + +@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { return getDelegate().fakeOuterNumberSerialize(body); } @@ -121,15 +137,19 @@ public interface FakeApi { * @param body Input string as post body (optional) * @return Output string (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output string", response = String.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) - default ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body) { + default ResponseEntity fakeOuterStringSerialize( + +@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { return getDelegate().fakeOuterStringSerialize(body); } @@ -141,15 +161,19 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) - default ResponseEntity testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body) { + default ResponseEntity testBodyWithFileSchema( + +@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { return getDelegate().testBodyWithFileSchema(body); } @@ -161,15 +185,21 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query + +, + +@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { return getDelegate().testBodyWithQueryParams(query, body); } @@ -181,8 +211,10 @@ public interface FakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -190,7 +222,9 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClientModel( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { return getDelegate().testClientModel(body); } @@ -216,19 +250,50 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float,@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary,@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date,@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime,@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + default ResponseEntity testEndpointParameters( + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + +@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + +@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + +@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + +@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, + +@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, + +@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, + +@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + +@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { return getDelegate().testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } @@ -248,16 +313,35 @@ public interface FakeApi { * @return Invalid request (status code 400) * or Not found (status code 404) */ + @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid request"), + @ApiResponse(code = 404, message = "Not found") }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + default ResponseEntity testEnumParameters( +@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray +, +@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString +,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray + +,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble + +, + +@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + +@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -274,14 +358,28 @@ public interface FakeApi { * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup + +, +@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup +,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group + +,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup + +, +@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + +) { return getDelegate().testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -292,15 +390,19 @@ public interface FakeApi { * @param param request body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) - default ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Map param) { + default ResponseEntity testInlineAdditionalProperties( + +@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { return getDelegate().testInlineAdditionalProperties(param); } @@ -312,15 +414,21 @@ public interface FakeApi { * @param param2 field2 (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + default ResponseEntity testJsonFormData( + +@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + +@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { return getDelegate().testJsonFormData(param, param2); } @@ -336,14 +444,26 @@ public interface FakeApi { * @param context (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context) { + default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + +) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } @@ -356,12 +476,14 @@ public interface FakeApi { * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -369,7 +491,13 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { return getDelegate().uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 7b84b8cd51ae..231633cb34e6 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -32,11 +32,13 @@ public interface FakeClassnameTestApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { @Authorization(value = "api_key_query") }, tags={ "fake_classname_tags 123#$%^", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -44,7 +46,9 @@ public interface FakeClassnameTestApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClassname( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { return getDelegate().testClassname(body); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index dccec075e5aa..8186ae2e5b32 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -34,20 +34,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return getDelegate().addPet(body); } @@ -60,19 +65,26 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey) { + default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +) { return getDelegate().deletePet(petId, apiKey); } @@ -85,20 +97,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid status value (status code 400) */ + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status) { + default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +) { return getDelegate().findPetsByStatus(status); } @@ -112,20 +129,25 @@ public interface PetApi { * or Invalid tag value (status code 400) * @deprecated */ + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags) { + default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + +) { return getDelegate().findPetsByTags(tags); } @@ -139,20 +161,26 @@ public interface PetApi { * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId) { + default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +) { return getDelegate().getPetById(petId); } @@ -166,22 +194,29 @@ public interface PetApi { * or Pet not found (status code 404) * or Validation exception (status code 405) */ + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return getDelegate().updatePet(body); } @@ -194,19 +229,27 @@ public interface PetApi { * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { return getDelegate().updatePetWithForm(petId, name, status); } @@ -219,12 +262,14 @@ public interface PetApi { * @param file file to upload (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -232,7 +277,13 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { return getDelegate().uploadFile(petId, additionalMetadata, file); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index 2a0cfabab4b8..01a5e332fc45 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -34,15 +34,20 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId) { + default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + +) { return getDelegate().deleteOrder(orderId); } @@ -53,11 +58,13 @@ public interface StoreApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @RequestMapping( method = RequestMethod.GET, @@ -78,17 +85,23 @@ public interface StoreApi { * or Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId) { + default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + +) { return getDelegate().getOrderById(orderId); } @@ -100,16 +113,21 @@ public interface StoreApi { * @return successful operation (status code 200) * or Invalid Order (status code 400) */ + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) - default ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body) { + default ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { return getDelegate().placeOrder(body); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index 59615e8d21c1..c6a6fa866994 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -33,14 +33,18 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) - default ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { return getDelegate().createUser(body); } @@ -51,14 +55,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) - default ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return getDelegate().createUsersWithArrayInput(body); } @@ -69,14 +77,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) - default ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return getDelegate().createUsersWithListInput(body); } @@ -89,15 +101,20 @@ public interface UserApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username) { + default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +) { return getDelegate().deleteUser(username); } @@ -110,17 +127,23 @@ public interface UserApi { * or Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username) { + default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +) { return getDelegate().getUserByName(username); } @@ -133,16 +156,23 @@ public interface UserApi { * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password) { + default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +) { return getDelegate().loginUser(username, password); } @@ -152,8 +182,10 @@ public interface UserApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, @@ -173,15 +205,22 @@ public interface UserApi { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { return getDelegate().updateUser(username, body); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 8c7e00956c3a..847d9f37777c 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesAnyType */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 864299cf9b28..31b7fad0c945 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesArray */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index b445c7bb0d86..5c23bc8d768e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesBoolean */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 76a9f4e4c256..82d25ab6e747 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 089c1edce9d8..802674f78205 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesInteger */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index f2f8fe6949b0..787a4262026a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesNumber */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index bcca31ee32a2..271b66cf6820 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesObject */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 829ea052d3e1..08ba6bfe63ce 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesString */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java index 1319038cccc0..7598b6f55612 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Animal */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index aec96b23f033..bf1b74e83fca 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 63a657c8dddf..f1ced8ef71a0 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java index 2a36629dfc75..81c7ab3dd785 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ArrayTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.model.ReadOnlyFirst; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayTest */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java index c7912d432b77..1835c7bf2114 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.BigCatAllOf; import org.openapitools.model.Cat; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCat */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java index aba5eb47270c..43555f5bfed0 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCatAllOf */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java index 587443bb7667..2ccf1e812e5a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Capitalization.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Capitalization */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java index b32ade551792..0876d9f30a0b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Cat */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java index ce9d21ae5ecb..d59a3783d0af 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * CatAllOf */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java index c79594679cf8..ef9a938298b9 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Category */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java index a462f09a9cb9..af4c74423128 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ClassModel.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model with \"_class\" property */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java index 727896658637..298c69c03b17 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Client.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Client */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java index 229b97f2a7cb..09938cd0f5fc 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Dog */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java index 29b736410b76..d95ac4a329d9 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * DogAllOf */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java index ec2d4e1ce8b9..beeff77d9e56 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumArrays */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java index ef4719c757f0..8f82b2f78436 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets EnumClass diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java index f9b00d90ed5b..0ce7ab0f2fa6 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.OuterEnum; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumTest */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 8e4f8d5d5d9d..ea5aa826feb7 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FileSchemaTestClass */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java index 091f7d97f2b5..352d758ce6e5 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FormatTest */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 2dd77785ad55..10e514bb1726 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * HasOnlyReadOnly */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java index 7b9a321ecb22..36754fec8c9e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MapTest */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index d80573256c63..8238e3227a6b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,9 +13,13 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java index 3f2d0da5f331..3f8bdc54450d 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Model200Response.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name starting with number */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ec7ccfe1417..99a06748ac14 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ModelApiResponse */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java index 5d0c266a148b..d9cc6193aee6 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ModelReturn.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing reserved words */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java index 3cc5bf64c066..880351d2843a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name same as property name */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java index c1cafb126beb..4af42224ae53 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/NumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * NumberOnly */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java index 0c9dddf85daf..ba0b3b2e3131 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Order */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java index 7425f5c75890..cdac99f37e41 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterComposite.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * OuterComposite */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java index 6b5abc576b07..d74006b9d33e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets OuterEnum diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index 5f44cab5669e..7f4aa1ef8b12 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -13,9 +14,13 @@ import java.util.Set; import org.openapitools.model.Category; import org.openapitools.model.Tag; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Pet */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 6f4a25b65efe..f872289b8da3 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ReadOnlyFirst */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java index 16e690b5740f..31cc434cd51b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/SpecialModelName.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * SpecialModelName */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java index 9306b226ea56..2d1ac94412f7 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Tag.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Tag */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java index 80788f31612a..fb29f038fc6b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderDefault */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java index 963c3c66b57b..096b4ada0991 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderExample */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java index 4a0c635f1adb..3cadd5d4ec50 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/User.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * User */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java index 465b94b6a88d..62cfbcc6b285 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/XmlItem.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * XmlItem */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index 3b1e30dd3852..bf263c24b4cf 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -36,8 +36,10 @@ public interface AnotherFakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @ApiImplicitParams({ }) @@ -47,7 +49,9 @@ public interface AnotherFakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity call123testSpecialTags( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index d8835b1f794f..ab909726e8d8 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -45,8 +45,10 @@ public interface FakeApi { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @ApiImplicitParams({ }) @@ -55,7 +57,9 @@ public interface FakeApi { value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) - default ResponseEntity createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem) { + default ResponseEntity createXmlItem( + +@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -68,8 +72,10 @@ public interface FakeApi { * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) @ApiImplicitParams({ }) @@ -78,7 +84,9 @@ public interface FakeApi { value = "/fake/outer/boolean", produces = { "*/*" } ) - default ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body) { + default ResponseEntity fakeOuterBooleanSerialize( + +@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -91,8 +99,10 @@ public interface FakeApi { * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) @ApiImplicitParams({ }) @@ -101,7 +111,9 @@ public interface FakeApi { value = "/fake/outer/composite", produces = { "*/*" } ) - default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body) { + default ResponseEntity fakeOuterCompositeSerialize( + +@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { @@ -123,8 +135,10 @@ public interface FakeApi { * @param body Input number as post body (optional) * @return Output number (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) @ApiImplicitParams({ }) @@ -133,7 +147,9 @@ public interface FakeApi { value = "/fake/outer/number", produces = { "*/*" } ) - default ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body) { + default ResponseEntity fakeOuterNumberSerialize( + +@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -146,8 +162,10 @@ public interface FakeApi { * @param body Input string as post body (optional) * @return Output string (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output string", response = String.class) }) @ApiImplicitParams({ }) @@ -156,7 +174,9 @@ public interface FakeApi { value = "/fake/outer/string", produces = { "*/*" } ) - default ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body) { + default ResponseEntity fakeOuterStringSerialize( + +@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -169,8 +189,10 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @ApiImplicitParams({ }) @@ -179,7 +201,9 @@ public interface FakeApi { value = "/fake/body-with-file-schema", consumes = { "application/json" } ) - default ResponseEntity testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body) { + default ResponseEntity testBodyWithFileSchema( + +@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -192,8 +216,10 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @ApiImplicitParams({ }) @@ -202,7 +228,11 @@ public interface FakeApi { value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query + +, + +@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -215,8 +245,10 @@ public interface FakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @ApiImplicitParams({ }) @@ -226,7 +258,9 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClientModel( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -262,12 +296,15 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @ApiImplicitParams({ }) @@ -276,7 +313,35 @@ public interface FakeApi { value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float,@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary,@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date,@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime,@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + default ResponseEntity testEndpointParameters( + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + +@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + +@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + +@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + +@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, + +@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, + +@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, + +@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + +@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -295,9 +360,12 @@ public interface FakeApi { * @return Invalid request (status code 400) * or Not found (status code 404) */ + @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid request"), + @ApiResponse(code = 404, message = "Not found") }) @ApiImplicitParams({ @ApiImplicitParam(name = "enumHeaderStringArray", value = "Header parameter enum test (string array)", dataType = "List", paramType = "header"), @@ -308,7 +376,19 @@ public interface FakeApi { value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEnumParameters(@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + default ResponseEntity testEnumParameters(@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray + +,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble + +, + +@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + +@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -324,8 +404,10 @@ public interface FakeApi { * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) @ApiImplicitParams({ @ApiImplicitParam(name = "requiredBooleanGroup", value = "Required Boolean in group parameters", required = true, dataType = "Boolean", paramType = "header"), @@ -335,7 +417,15 @@ public interface FakeApi { method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup + +,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group + +,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup + +,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -347,8 +437,10 @@ public interface FakeApi { * @param param request body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @ApiImplicitParams({ }) @@ -357,7 +449,9 @@ public interface FakeApi { value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) - default ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Map param) { + default ResponseEntity testInlineAdditionalProperties( + +@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -370,8 +464,10 @@ public interface FakeApi { * @param param2 field2 (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @ApiImplicitParams({ }) @@ -380,7 +476,11 @@ public interface FakeApi { value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + default ResponseEntity testJsonFormData( + +@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + +@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -397,8 +497,10 @@ public interface FakeApi { * @param context (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @ApiImplicitParams({ }) @@ -406,7 +508,17 @@ public interface FakeApi { method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context) { + default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -420,12 +532,14 @@ public interface FakeApi { * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @ApiImplicitParams({ }) @@ -435,7 +549,13 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index ea96bda489ce..6ee5686f74ad 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,11 +36,13 @@ public interface FakeClassnameTestApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { @Authorization(value = "api_key_query") }, tags={ "fake_classname_tags 123#$%^", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @ApiImplicitParams({ }) @@ -50,7 +52,9 @@ public interface FakeClassnameTestApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClassname( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index db5edb9933af..98a0f6aa2e73 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -38,13 +38,16 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 405, message = "Invalid input") }) @ApiImplicitParams({ }) @@ -53,7 +56,9 @@ public interface PetApi { value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -66,13 +71,16 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid pet value") }) @ApiImplicitParams({ @ApiImplicitParam(name = "apiKey", value = "", dataType = "String", paramType = "header") @@ -81,7 +89,9 @@ public interface PetApi { method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId) { + default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -95,13 +105,16 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid status value (status code 400) */ + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @ApiImplicitParams({ }) @@ -110,7 +123,9 @@ public interface PetApi { value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status) { + default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -139,13 +154,16 @@ public interface PetApi { * or Invalid tag value (status code 400) * @deprecated */ + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @ApiImplicitParams({ }) @@ -154,7 +172,9 @@ public interface PetApi { value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags) { + default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -183,13 +203,17 @@ public interface PetApi { * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @ApiImplicitParams({ }) @@ -198,7 +222,9 @@ public interface PetApi { value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId) { + default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -227,15 +253,20 @@ public interface PetApi { * or Pet not found (status code 404) * or Validation exception (status code 405) */ + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @ApiImplicitParams({ }) @@ -244,7 +275,9 @@ public interface PetApi { value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -258,12 +291,14 @@ public interface PetApi { * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @ApiImplicitParams({ }) @@ -272,7 +307,13 @@ public interface PetApi { value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -286,12 +327,14 @@ public interface PetApi { * @param file file to upload (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @ApiImplicitParams({ }) @@ -301,7 +344,13 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index af72984a1320..2591ae1d45fa 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -38,9 +38,12 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @ApiImplicitParams({ }) @@ -48,7 +51,9 @@ public interface StoreApi { method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId) { + default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -60,11 +65,13 @@ public interface StoreApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @ApiImplicitParams({ }) @@ -88,10 +95,14 @@ public interface StoreApi { * or Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @ApiImplicitParams({ }) @@ -100,7 +111,9 @@ public interface StoreApi { value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId) { + default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -127,9 +140,12 @@ public interface StoreApi { * @return successful operation (status code 200) * or Invalid Order (status code 400) */ + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @ApiImplicitParams({ }) @@ -138,7 +154,9 @@ public interface StoreApi { value = "/store/order", produces = { "application/xml", "application/json" } ) - default ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body) { + default ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index 9236407c3a7c..cb97dfa0de6f 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -37,8 +37,10 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @ApiImplicitParams({ }) @@ -46,7 +48,9 @@ public interface UserApi { method = RequestMethod.POST, value = "/user" ) - default ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -58,8 +62,10 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @ApiImplicitParams({ }) @@ -67,7 +73,9 @@ public interface UserApi { method = RequestMethod.POST, value = "/user/createWithArray" ) - default ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -79,8 +87,10 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @ApiImplicitParams({ }) @@ -88,7 +98,9 @@ public interface UserApi { method = RequestMethod.POST, value = "/user/createWithList" ) - default ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -102,9 +114,12 @@ public interface UserApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @ApiImplicitParams({ }) @@ -112,7 +127,9 @@ public interface UserApi { method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username) { + default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -126,10 +143,14 @@ public interface UserApi { * or Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @ApiImplicitParams({ }) @@ -138,7 +159,9 @@ public interface UserApi { value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username) { + default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -166,9 +189,12 @@ public interface UserApi { * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @ApiImplicitParams({ }) @@ -177,7 +203,11 @@ public interface UserApi { value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password) { + default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -188,8 +218,10 @@ public interface UserApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @ApiImplicitParams({ }) @@ -212,9 +244,12 @@ public interface UserApi { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @ApiImplicitParams({ }) @@ -222,7 +257,11 @@ public interface UserApi { method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 8c7e00956c3a..847d9f37777c 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesAnyType */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 864299cf9b28..31b7fad0c945 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesArray */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index b445c7bb0d86..5c23bc8d768e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesBoolean */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 76a9f4e4c256..82d25ab6e747 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 089c1edce9d8..802674f78205 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesInteger */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index f2f8fe6949b0..787a4262026a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesNumber */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index bcca31ee32a2..271b66cf6820 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesObject */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 829ea052d3e1..08ba6bfe63ce 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesString */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java index 1319038cccc0..7598b6f55612 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Animal */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index aec96b23f033..bf1b74e83fca 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 63a657c8dddf..f1ced8ef71a0 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java index 2a36629dfc75..81c7ab3dd785 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ArrayTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.model.ReadOnlyFirst; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayTest */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java index c7912d432b77..1835c7bf2114 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.BigCatAllOf; import org.openapitools.model.Cat; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCat */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java index aba5eb47270c..43555f5bfed0 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCatAllOf */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java index 587443bb7667..2ccf1e812e5a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Capitalization.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Capitalization */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java index b32ade551792..0876d9f30a0b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Cat */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java index ce9d21ae5ecb..d59a3783d0af 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * CatAllOf */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java index c79594679cf8..ef9a938298b9 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Category */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java index a462f09a9cb9..af4c74423128 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ClassModel.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model with \"_class\" property */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java index 727896658637..298c69c03b17 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Client.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Client */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java index 229b97f2a7cb..09938cd0f5fc 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Dog */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java index 29b736410b76..d95ac4a329d9 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * DogAllOf */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java index ec2d4e1ce8b9..beeff77d9e56 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumArrays */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java index ef4719c757f0..8f82b2f78436 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets EnumClass diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java index f9b00d90ed5b..0ce7ab0f2fa6 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.OuterEnum; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumTest */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 8e4f8d5d5d9d..ea5aa826feb7 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FileSchemaTestClass */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java index 091f7d97f2b5..352d758ce6e5 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FormatTest */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 2dd77785ad55..10e514bb1726 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * HasOnlyReadOnly */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java index 7b9a321ecb22..36754fec8c9e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MapTest */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index d80573256c63..8238e3227a6b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,9 +13,13 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java index 3f2d0da5f331..3f8bdc54450d 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Model200Response.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name starting with number */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ec7ccfe1417..99a06748ac14 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ModelApiResponse */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java index 5d0c266a148b..d9cc6193aee6 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ModelReturn.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing reserved words */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java index 3cc5bf64c066..880351d2843a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name same as property name */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java index c1cafb126beb..4af42224ae53 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/NumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * NumberOnly */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java index 0c9dddf85daf..ba0b3b2e3131 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Order */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java index 7425f5c75890..cdac99f37e41 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterComposite.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * OuterComposite */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java index 6b5abc576b07..d74006b9d33e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets OuterEnum diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index 5f44cab5669e..7f4aa1ef8b12 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -13,9 +14,13 @@ import java.util.Set; import org.openapitools.model.Category; import org.openapitools.model.Tag; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Pet */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 6f4a25b65efe..f872289b8da3 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ReadOnlyFirst */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java index 16e690b5740f..31cc434cd51b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/SpecialModelName.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * SpecialModelName */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java index 9306b226ea56..2d1ac94412f7 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Tag.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Tag */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java index 80788f31612a..fb29f038fc6b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderDefault */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java index 963c3c66b57b..096b4ada0991 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderExample */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java index 4a0c635f1adb..3cadd5d4ec50 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/User.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * User */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java index 465b94b6a88d..62cfbcc6b285 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/XmlItem.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * XmlItem */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index cc36aa71d7aa..bce3a8a84857 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -36,8 +36,10 @@ public interface AnotherFakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -45,7 +47,9 @@ public interface AnotherFakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default Mono> call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> call123testSpecialTags( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().call123testSpecialTags(body, exchange); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index fbc80bf9a77d..8bc50f63c879 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -45,15 +45,19 @@ public interface FakeApi { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) - default Mono> createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody Mono xmlItem, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> createXmlItem( + +@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody Mono xmlItem, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().createXmlItem(xmlItem, exchange); } @@ -65,15 +69,19 @@ public interface FakeApi { * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) - default Mono> fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> fakeOuterBooleanSerialize( + +@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().fakeOuterBooleanSerialize(body, exchange); } @@ -85,15 +93,19 @@ public interface FakeApi { * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) - default Mono> fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> fakeOuterCompositeSerialize( + +@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().fakeOuterCompositeSerialize(body, exchange); } @@ -105,15 +117,19 @@ public interface FakeApi { * @param body Input number as post body (optional) * @return Output number (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) - default Mono> fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> fakeOuterNumberSerialize( + +@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().fakeOuterNumberSerialize(body, exchange); } @@ -125,15 +141,19 @@ public interface FakeApi { * @param body Input string as post body (optional) * @return Output string (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output string", response = String.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) - default Mono> fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> fakeOuterStringSerialize( + +@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().fakeOuterStringSerialize(body, exchange); } @@ -145,15 +165,19 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) - default Mono> testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> testBodyWithFileSchema( + +@ApiParam(value = "", required = true ) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().testBodyWithFileSchema(body, exchange); } @@ -165,15 +189,21 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default Mono> testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query + +, + +@ApiParam(value = "", required = true ) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().testBodyWithQueryParams(query, body, exchange); } @@ -185,8 +215,10 @@ public interface FakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -194,7 +226,9 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default Mono> testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> testClientModel( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().testClientModel(body, exchange); } @@ -220,19 +254,50 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default Mono> testEndpointParameters(@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float,@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) Flux binary,@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date,@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime,@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> testEndpointParameters( + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + +@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + +@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + +@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + +@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) Flux binary, + +@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, + +@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, + +@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + +@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, exchange); } @@ -252,16 +317,35 @@ public interface FakeApi { * @return Invalid request (status code 400) * or Not found (status code 404) */ + @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid request"), + @ApiResponse(code = 404, message = "Not found") }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default Mono> testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> testEnumParameters( +@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray +, +@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString +,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray + +,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble + +, + +@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + +@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, exchange); } @@ -278,14 +362,28 @@ public interface FakeApi { * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default Mono> testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup + +, +@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup +,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group + +,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup + +, +@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + +, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, exchange); } @@ -296,15 +394,19 @@ public interface FakeApi { * @param param request body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) - default Mono> testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Mono> param, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> testInlineAdditionalProperties( + +@ApiParam(value = "request body", required = true ) @Valid @RequestBody Mono> param, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().testInlineAdditionalProperties(param, exchange); } @@ -316,15 +418,21 @@ public interface FakeApi { * @param param2 field2 (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) - default Mono> testJsonFormData(@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> testJsonFormData( + +@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + +@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().testJsonFormData(param, param2, exchange); } @@ -340,14 +448,26 @@ public interface FakeApi { * @param context (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default Mono> testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + +, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, exchange); } @@ -360,12 +480,14 @@ public interface FakeApi { * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -373,7 +495,13 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default Mono> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) Flux requiredFile,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) Flux requiredFile, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, exchange); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 0cc1498fa757..0badb75bc22a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,11 +36,13 @@ public interface FakeClassnameTestApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { @Authorization(value = "api_key_query") }, tags={ "fake_classname_tags 123#$%^", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -48,7 +50,9 @@ public interface FakeClassnameTestApi { produces = { "application/json" }, consumes = { "application/json" } ) - default Mono> testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> testClassname( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().testClassname(body, exchange); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 3babe1c40a41..101ef0e1acb0 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -38,20 +38,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) - default Mono> addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().addPet(body, exchange); } @@ -64,19 +69,26 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default Mono> deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().deletePet(petId, apiKey, exchange); } @@ -89,20 +101,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid status value (status code 400) */ + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default Mono>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().findPetsByStatus(status, exchange); } @@ -116,20 +133,25 @@ public interface PetApi { * or Invalid tag value (status code 400) * @deprecated */ + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default Mono>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + +, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().findPetsByTags(tags, exchange); } @@ -143,20 +165,26 @@ public interface PetApi { * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default Mono> getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().getPetById(petId, exchange); } @@ -170,22 +198,29 @@ public interface PetApi { * or Pet not found (status code 404) * or Validation exception (status code 405) */ + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) - default Mono> updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().updatePet(body, exchange); } @@ -198,19 +233,27 @@ public interface PetApi { * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default Mono> updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().updatePetWithForm(petId, name, status, exchange); } @@ -223,12 +266,14 @@ public interface PetApi { * @param file file to upload (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -236,7 +281,13 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default Mono> uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) Flux file, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) Flux file, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().uploadFile(petId, additionalMetadata, file, exchange); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java index 20713d38c146..a8418c54ea17 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -38,15 +38,20 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default Mono> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + +, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().deleteOrder(orderId, exchange); } @@ -57,11 +62,13 @@ public interface StoreApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @RequestMapping( method = RequestMethod.GET, @@ -82,17 +89,23 @@ public interface StoreApi { * or Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default Mono> getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + +, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().getOrderById(orderId, exchange); } @@ -104,16 +117,21 @@ public interface StoreApi { * @return successful operation (status code 200) * or Invalid Order (status code 400) */ + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) - default Mono> placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().placeOrder(body, exchange); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index e95954ffb963..505c317d5f45 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -37,14 +37,18 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) - default Mono> createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().createUser(body, exchange); } @@ -55,14 +59,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) - default Mono> createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody Flux body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody Flux body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().createUsersWithArrayInput(body, exchange); } @@ -73,14 +81,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) - default Mono> createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody Flux body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody Flux body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().createUsersWithListInput(body, exchange); } @@ -93,15 +105,20 @@ public interface UserApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default Mono> deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().deleteUser(username, exchange); } @@ -114,17 +131,23 @@ public interface UserApi { * or Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default Mono> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().getUserByName(username, exchange); } @@ -137,16 +160,23 @@ public interface UserApi { * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default Mono> loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().loginUser(username, password, exchange); } @@ -156,8 +186,10 @@ public interface UserApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, @@ -177,15 +209,22 @@ public interface UserApi { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default Mono> updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { + default Mono> updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody Mono body, @springfox.documentation.annotations.ApiIgnore final ServerWebExchange exchange) { return getDelegate().updateUser(username, body, exchange); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 8c7e00956c3a..847d9f37777c 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesAnyType */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 864299cf9b28..31b7fad0c945 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesArray */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index b445c7bb0d86..5c23bc8d768e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesBoolean */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 76a9f4e4c256..82d25ab6e747 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 089c1edce9d8..802674f78205 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesInteger */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index f2f8fe6949b0..787a4262026a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesNumber */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index bcca31ee32a2..271b66cf6820 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesObject */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 829ea052d3e1..08ba6bfe63ce 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesString */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java index 1319038cccc0..7598b6f55612 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Animal */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index aec96b23f033..bf1b74e83fca 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 63a657c8dddf..f1ced8ef71a0 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java index 2a36629dfc75..81c7ab3dd785 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ArrayTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.model.ReadOnlyFirst; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayTest */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java index c7912d432b77..1835c7bf2114 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.BigCatAllOf; import org.openapitools.model.Cat; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCat */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java index aba5eb47270c..43555f5bfed0 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCatAllOf */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java index 587443bb7667..2ccf1e812e5a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Capitalization.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Capitalization */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java index b32ade551792..0876d9f30a0b 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Cat */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java index ce9d21ae5ecb..d59a3783d0af 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * CatAllOf */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java index c79594679cf8..ef9a938298b9 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Category */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java index a462f09a9cb9..af4c74423128 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ClassModel.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model with \"_class\" property */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java index 727896658637..298c69c03b17 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Client.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Client */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java index 229b97f2a7cb..09938cd0f5fc 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Dog */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java index 29b736410b76..d95ac4a329d9 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * DogAllOf */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java index ec2d4e1ce8b9..beeff77d9e56 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumArrays */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java index ef4719c757f0..8f82b2f78436 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets EnumClass diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java index f9b00d90ed5b..0ce7ab0f2fa6 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.OuterEnum; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumTest */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 8e4f8d5d5d9d..ea5aa826feb7 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FileSchemaTestClass */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java index 091f7d97f2b5..352d758ce6e5 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FormatTest */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 2dd77785ad55..10e514bb1726 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * HasOnlyReadOnly */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java index 7b9a321ecb22..36754fec8c9e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MapTest */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index d80573256c63..8238e3227a6b 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,9 +13,13 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java index 3f2d0da5f331..3f8bdc54450d 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Model200Response.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name starting with number */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ec7ccfe1417..99a06748ac14 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ModelApiResponse */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java index 5d0c266a148b..d9cc6193aee6 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ModelReturn.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing reserved words */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java index 3cc5bf64c066..880351d2843a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name same as property name */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java index c1cafb126beb..4af42224ae53 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/NumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * NumberOnly */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java index 0c9dddf85daf..ba0b3b2e3131 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Order */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java index 7425f5c75890..cdac99f37e41 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterComposite.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * OuterComposite */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java index 6b5abc576b07..d74006b9d33e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets OuterEnum diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java index 5f44cab5669e..7f4aa1ef8b12 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -13,9 +14,13 @@ import java.util.Set; import org.openapitools.model.Category; import org.openapitools.model.Tag; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Pet */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 6f4a25b65efe..f872289b8da3 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ReadOnlyFirst */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java index 16e690b5740f..31cc434cd51b 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/SpecialModelName.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * SpecialModelName */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java index 9306b226ea56..2d1ac94412f7 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Tag.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Tag */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java index 80788f31612a..fb29f038fc6b 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderDefault */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java index 963c3c66b57b..096b4ada0991 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderExample */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java index 4a0c635f1adb..3cadd5d4ec50 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/User.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * User */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java index 465b94b6a88d..62cfbcc6b285 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/XmlItem.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * XmlItem */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index a84f97e7071b..e6d35a4c351e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -28,8 +28,10 @@ public interface AnotherFakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -37,6 +39,8 @@ public interface AnotherFakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - ResponseEntity call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body); + ResponseEntity call123testSpecialTags( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java index 98cbe886cf68..30d4f1c90e32 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -38,7 +38,9 @@ public class AnotherFakeApiController implements AnotherFakeApi { * @return successful operation (status code 200) * @see AnotherFakeApi#call123testSpecialTags */ - public ResponseEntity call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + public ResponseEntity call123testSpecialTags( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { return delegate.call123testSpecialTags(body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java index d84e0f2663de..94827ba4a000 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -37,15 +37,19 @@ public interface FakeApi { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) - ResponseEntity createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem); + ResponseEntity createXmlItem( + +@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem); /** @@ -55,15 +59,19 @@ public interface FakeApi { * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) - ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body); + ResponseEntity fakeOuterBooleanSerialize( + +@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body); /** @@ -73,15 +81,19 @@ public interface FakeApi { * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) - ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body); + ResponseEntity fakeOuterCompositeSerialize( + +@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body); /** @@ -91,15 +103,19 @@ public interface FakeApi { * @param body Input number as post body (optional) * @return Output number (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) - ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body); + ResponseEntity fakeOuterNumberSerialize( + +@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body); /** @@ -109,15 +125,19 @@ public interface FakeApi { * @param body Input string as post body (optional) * @return Output string (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output string", response = String.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) - ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body); + ResponseEntity fakeOuterStringSerialize( + +@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body); /** @@ -127,15 +147,19 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) - ResponseEntity testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body); + ResponseEntity testBodyWithFileSchema( + +@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body); /** @@ -145,15 +169,21 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody User body); + ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query + +, + +@ApiParam(value = "", required = true ) @Valid @RequestBody User body); /** @@ -163,8 +193,10 @@ public interface FakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -172,7 +204,9 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - ResponseEntity testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body); + ResponseEntity testClientModel( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body); /** @@ -196,19 +230,50 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - ResponseEntity testEndpointParameters(@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float,@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary,@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date,@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime,@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback); + ResponseEntity testEndpointParameters( + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + +@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + +@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + +@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + +@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, + +@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, + +@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, + +@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + +@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback); /** @@ -226,16 +291,35 @@ public interface FakeApi { * @return Invalid request (status code 400) * or Not found (status code 404) */ + @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid request"), + @ApiResponse(code = 404, message = "Not found") }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString); + ResponseEntity testEnumParameters( +@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray +, +@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString +,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray + +,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble + +, + +@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + +@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString); /** @@ -250,14 +334,28 @@ public interface FakeApi { * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group); + ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup + +, +@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup +,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group + +,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup + +, +@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + +); /** @@ -266,15 +364,19 @@ public interface FakeApi { * @param param request body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) - ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Map param); + ResponseEntity testInlineAdditionalProperties( + +@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param); /** @@ -284,15 +386,21 @@ public interface FakeApi { * @param param2 field2 (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) - ResponseEntity testJsonFormData(@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2); + ResponseEntity testJsonFormData( + +@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + +@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2); /** @@ -306,14 +414,26 @@ public interface FakeApi { * @param context (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context); + ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + +); /** @@ -324,12 +444,14 @@ public interface FakeApi { * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -337,6 +459,12 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata); + ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java index 8fc941c75459..e714970497e1 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiController.java @@ -47,7 +47,9 @@ public class FakeApiController implements FakeApi { * @return successful operation (status code 200) * @see FakeApi#createXmlItem */ - public ResponseEntity createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem) { + public ResponseEntity createXmlItem( + +@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { return delegate.createXmlItem(xmlItem); } @@ -59,7 +61,9 @@ public class FakeApiController implements FakeApi { * @return Output boolean (status code 200) * @see FakeApi#fakeOuterBooleanSerialize */ - public ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body) { + public ResponseEntity fakeOuterBooleanSerialize( + +@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { return delegate.fakeOuterBooleanSerialize(body); } @@ -71,7 +75,9 @@ public class FakeApiController implements FakeApi { * @return Output composite (status code 200) * @see FakeApi#fakeOuterCompositeSerialize */ - public ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body) { + public ResponseEntity fakeOuterCompositeSerialize( + +@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { return delegate.fakeOuterCompositeSerialize(body); } @@ -83,7 +89,9 @@ public class FakeApiController implements FakeApi { * @return Output number (status code 200) * @see FakeApi#fakeOuterNumberSerialize */ - public ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body) { + public ResponseEntity fakeOuterNumberSerialize( + +@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { return delegate.fakeOuterNumberSerialize(body); } @@ -95,7 +103,9 @@ public class FakeApiController implements FakeApi { * @return Output string (status code 200) * @see FakeApi#fakeOuterStringSerialize */ - public ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body) { + public ResponseEntity fakeOuterStringSerialize( + +@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { return delegate.fakeOuterStringSerialize(body); } @@ -107,7 +117,9 @@ public class FakeApiController implements FakeApi { * @return Success (status code 200) * @see FakeApi#testBodyWithFileSchema */ - public ResponseEntity testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body) { + public ResponseEntity testBodyWithFileSchema( + +@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { return delegate.testBodyWithFileSchema(body); } @@ -119,7 +131,11 @@ public class FakeApiController implements FakeApi { * @return Success (status code 200) * @see FakeApi#testBodyWithQueryParams */ - public ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody User body) { + public ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query + +, + +@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { return delegate.testBodyWithQueryParams(query, body); } @@ -131,7 +147,9 @@ public class FakeApiController implements FakeApi { * @return successful operation (status code 200) * @see FakeApi#testClientModel */ - public ResponseEntity testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + public ResponseEntity testClientModel( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { return delegate.testClientModel(body); } @@ -157,7 +175,35 @@ public class FakeApiController implements FakeApi { * or User not found (status code 404) * @see FakeApi#testEndpointParameters */ - public ResponseEntity testEndpointParameters(@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float,@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary,@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date,@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime,@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + public ResponseEntity testEndpointParameters( + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + +@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + +@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + +@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + +@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, + +@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, + +@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, + +@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + +@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { return delegate.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } @@ -177,7 +223,23 @@ public class FakeApiController implements FakeApi { * or Not found (status code 404) * @see FakeApi#testEnumParameters */ - public ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + public ResponseEntity testEnumParameters( +@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray +, +@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString +,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray + +,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble + +, + +@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + +@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -194,7 +256,19 @@ public class FakeApiController implements FakeApi { * @return Someting wrong (status code 400) * @see FakeApi#testGroupParameters */ - public ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + public ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup + +, +@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup +,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group + +,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup + +, +@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + +) { return delegate.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -205,7 +279,9 @@ public class FakeApiController implements FakeApi { * @return successful operation (status code 200) * @see FakeApi#testInlineAdditionalProperties */ - public ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Map param) { + public ResponseEntity testInlineAdditionalProperties( + +@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { return delegate.testInlineAdditionalProperties(param); } @@ -217,7 +293,11 @@ public class FakeApiController implements FakeApi { * @return successful operation (status code 200) * @see FakeApi#testJsonFormData */ - public ResponseEntity testJsonFormData(@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + public ResponseEntity testJsonFormData( + +@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + +@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { return delegate.testJsonFormData(param, param2); } @@ -233,7 +313,17 @@ public class FakeApiController implements FakeApi { * @return Success (status code 200) * @see FakeApi#testQueryParameterCollectionFormat */ - public ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context) { + public ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + +) { return delegate.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } @@ -246,7 +336,13 @@ public class FakeApiController implements FakeApi { * @return successful operation (status code 200) * @see FakeApi#uploadFileWithRequiredFile */ - public ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + public ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { return delegate.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e0555ba889ea..f1102a0f069e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -28,11 +28,13 @@ public interface FakeClassnameTestApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { @Authorization(value = "api_key_query") }, tags={ "fake_classname_tags 123#$%^", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -40,6 +42,8 @@ public interface FakeClassnameTestApi { produces = { "application/json" }, consumes = { "application/json" } ) - ResponseEntity testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body); + ResponseEntity testClassname( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index e2e76a05e8cd..027fe24ac123 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -38,7 +38,9 @@ public class FakeClassnameTestApiController implements FakeClassnameTestApi { * @return successful operation (status code 200) * @see FakeClassnameTestApi#testClassname */ - public ResponseEntity testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + public ResponseEntity testClassname( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { return delegate.testClassname(body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java index 37449224cb77..f26f3c41e4bc 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -29,20 +29,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) - ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body); + ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); /** @@ -53,19 +58,26 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey); + ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +); /** @@ -76,20 +88,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid status value (status code 400) */ + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable); + ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable); /** @@ -101,20 +118,25 @@ public interface PetApi { * or Invalid tag value (status code 400) * @deprecated */ + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable); + ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + +, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable); /** @@ -126,20 +148,26 @@ public interface PetApi { * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId); + ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +); /** @@ -151,22 +179,29 @@ public interface PetApi { * or Pet not found (status code 404) * or Validation exception (status code 405) */ + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) - ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body); + ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); /** @@ -177,19 +212,27 @@ public interface PetApi { * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status); + ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status); /** @@ -200,12 +243,14 @@ public interface PetApi { * @param file file to upload (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -213,6 +258,12 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file); + ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java index 5b91410b4518..79e735b977f3 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApiController.java @@ -39,7 +39,9 @@ public class PetApiController implements PetApi { * or Invalid input (status code 405) * @see PetApi#addPet */ - public ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + public ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return delegate.addPet(body); } @@ -52,7 +54,11 @@ public class PetApiController implements PetApi { * or Invalid pet value (status code 400) * @see PetApi#deletePet */ - public ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey) { + public ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +) { return delegate.deletePet(petId, apiKey); } @@ -65,7 +71,9 @@ public class PetApiController implements PetApi { * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - public ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, @springfox.documentation.annotations.ApiIgnore final Pageable pageable) { + public ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +, @springfox.documentation.annotations.ApiIgnore final Pageable pageable) { return delegate.findPetsByStatus(status, pageable); } @@ -79,7 +87,9 @@ public class PetApiController implements PetApi { * @deprecated * @see PetApi#findPetsByTags */ - public ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, @springfox.documentation.annotations.ApiIgnore final Pageable pageable) { + public ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + +, @springfox.documentation.annotations.ApiIgnore final Pageable pageable) { return delegate.findPetsByTags(tags, pageable); } @@ -93,7 +103,9 @@ public class PetApiController implements PetApi { * or Pet not found (status code 404) * @see PetApi#getPetById */ - public ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId) { + public ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +) { return delegate.getPetById(petId); } @@ -107,7 +119,9 @@ public class PetApiController implements PetApi { * or Validation exception (status code 405) * @see PetApi#updatePet */ - public ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + public ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return delegate.updatePet(body); } @@ -120,7 +134,13 @@ public class PetApiController implements PetApi { * @return Invalid input (status code 405) * @see PetApi#updatePetWithForm */ - public ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + public ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { return delegate.updatePetWithForm(petId, name, status); } @@ -133,7 +153,13 @@ public class PetApiController implements PetApi { * @return successful operation (status code 200) * @see PetApi#uploadFile */ - public ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + public ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { return delegate.uploadFile(petId, additionalMetadata, file); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java index f31855d1318e..29a3d124c55c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -30,15 +30,20 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId); + ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + +); /** @@ -47,11 +52,13 @@ public interface StoreApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @RequestMapping( method = RequestMethod.GET, @@ -70,17 +77,23 @@ public interface StoreApi { * or Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId); + ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + +); /** @@ -90,15 +103,20 @@ public interface StoreApi { * @return successful operation (status code 200) * or Invalid Order (status code 400) */ + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) - ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body); + ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiController.java index d662f8581370..76d07f1fc783 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiController.java @@ -40,7 +40,9 @@ public class StoreApiController implements StoreApi { * or Order not found (status code 404) * @see StoreApi#deleteOrder */ - public ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId) { + public ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + +) { return delegate.deleteOrder(orderId); } @@ -65,7 +67,9 @@ public class StoreApiController implements StoreApi { * or Order not found (status code 404) * @see StoreApi#getOrderById */ - public ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId) { + public ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + +) { return delegate.getOrderById(orderId); } @@ -77,7 +81,9 @@ public class StoreApiController implements StoreApi { * or Invalid Order (status code 400) * @see StoreApi#placeOrder */ - public ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body) { + public ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { return delegate.placeOrder(body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java index 510d11d8e9e0..f96ae9134403 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -29,14 +29,18 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) - ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body); + ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body); /** @@ -45,14 +49,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) - ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body); + ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); /** @@ -61,14 +69,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) - ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body); + ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); /** @@ -79,15 +91,20 @@ public interface UserApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username); + ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +); /** @@ -98,17 +115,23 @@ public interface UserApi { * or Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username); + ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +); /** @@ -119,16 +142,23 @@ public interface UserApi { * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password); + ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +); /** @@ -136,8 +166,10 @@ public interface UserApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, @@ -155,14 +187,21 @@ public interface UserApi { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body); + ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java index 642c9683055b..da136ce2f801 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java @@ -39,7 +39,9 @@ public class UserApiController implements UserApi { * @return successful operation (status code 200) * @see UserApi#createUser */ - public ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body) { + public ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { return delegate.createUser(body); } @@ -50,7 +52,9 @@ public class UserApiController implements UserApi { * @return successful operation (status code 200) * @see UserApi#createUsersWithArrayInput */ - public ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + public ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return delegate.createUsersWithArrayInput(body); } @@ -61,7 +65,9 @@ public class UserApiController implements UserApi { * @return successful operation (status code 200) * @see UserApi#createUsersWithListInput */ - public ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + public ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return delegate.createUsersWithListInput(body); } @@ -74,7 +80,9 @@ public class UserApiController implements UserApi { * or User not found (status code 404) * @see UserApi#deleteUser */ - public ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username) { + public ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +) { return delegate.deleteUser(username); } @@ -87,7 +95,9 @@ public class UserApiController implements UserApi { * or User not found (status code 404) * @see UserApi#getUserByName */ - public ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username) { + public ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +) { return delegate.getUserByName(username); } @@ -100,7 +110,11 @@ public class UserApiController implements UserApi { * or Invalid username/password supplied (status code 400) * @see UserApi#loginUser */ - public ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password) { + public ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +) { return delegate.loginUser(username, password); } @@ -124,7 +138,11 @@ public class UserApiController implements UserApi { * or User not found (status code 404) * @see UserApi#updateUser */ - public ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body) { + public ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { return delegate.updateUser(username, body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 8c7e00956c3a..46281c6456d3 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesAnyType */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 864299cf9b28..474278b1b192 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,6 +13,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesArray */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index b445c7bb0d86..c670f89cdfc0 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesBoolean */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 1e2c8c2726d3..9f89c16c1bcf 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -13,6 +14,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 089c1edce9d8..5ef4af43bbd9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesInteger */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index f2f8fe6949b0..95a742297272 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,6 +13,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesNumber */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index bcca31ee32a2..9969c2fe7201 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesObject */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 829ea052d3e1..757c0a536fd8 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesString */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java index 7fb6b8e2ef66..22249d7cc27e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Animal */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 9c226efbbc46..995bebadda86 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,6 +13,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 51ea58aab386..922dc7a56667 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,6 +13,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java index 1fea247ab3ca..6937756d45c7 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ArrayTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,6 +13,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayTest */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Capitalization.java index 587443bb7667..19ab1f8baff0 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Capitalization.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Capitalization */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java index b32ade551792..ebf9c7cec807 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Cat */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/CatAllOf.java index ce9d21ae5ecb..257322699ab9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/CatAllOf.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * CatAllOf */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java index c79594679cf8..3c2a6be2b25f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Category */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ClassModel.java index a462f09a9cb9..4d88c1e45a8e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ClassModel.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model with \"_class\" property */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Client.java index 727896658637..bb63f835363f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Client.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Client */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java index 229b97f2a7cb..21a27eb4e458 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Dog */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/DogAllOf.java index 29b736410b76..09bb08f9458b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/DogAllOf.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * DogAllOf */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java index 90d7bf130bb1..14bf9e2c281c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumArrays.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,6 +13,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumArrays */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumClass.java index ef4719c757f0..ed676c3662e1 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumClass.java @@ -1,12 +1,17 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets EnumClass diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java index f9b00d90ed5b..3a9a9e85a8c2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumTest */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java index a99196c28084..3d885b7876d4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FileSchemaTestClass */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java index 8911b494fd5a..7f83ebda6cbf 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -14,6 +15,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FormatTest */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 2dd77785ad55..a712d19243f9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * HasOnlyReadOnly */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java index b1d48c044ada..a4f10eadf355 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MapTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -13,6 +14,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MapTest */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 71693227fa7a..b6607ec1de22 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -15,6 +16,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Model200Response.java index 3f2d0da5f331..8e51dc7b0bf5 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Model200Response.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name starting with number */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ec7ccfe1417..1c50e0984df6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ModelApiResponse */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelReturn.java index 5d0c266a148b..f71f60f59709 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ModelReturn.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing reserved words */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java index 3cc5bf64c066..8336bed2c940 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name same as property name */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/NumberOnly.java index c1cafb126beb..87c0551edfce 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/NumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,6 +11,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * NumberOnly */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Order.java index 06a8fdb89353..c03246a0acb9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Order */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterComposite.java index 7425f5c75890..34098a524fc2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterComposite.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,6 +11,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * OuterComposite */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterEnum.java index 6b5abc576b07..33f64f0954e6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/OuterEnum.java @@ -1,12 +1,17 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets OuterEnum diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java index 94dfc109a57d..8e56b7045abc 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -14,6 +15,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Pet */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 6f4a25b65efe..655154d2cf28 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ReadOnlyFirst */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java index 16e690b5740f..beddd922ad47 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * SpecialModelName */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Tag.java index 9306b226ea56..c7dba2565eea 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Tag.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Tag */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index bcf00b393fd4..9dbb6eeeb09d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,6 +13,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderDefault */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index 2151f844f8ed..998c11fb3232 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,6 +13,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderExample */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/User.java index 4a0c635f1adb..ac48b7bd3ac7 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/User.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * User */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java index 9240d5345a67..fa83623c4bfb 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,6 +13,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * XmlItem */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java index 8a2205e990fe..b41fa1a1b795 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -32,8 +32,10 @@ public interface AnotherFakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -41,7 +43,9 @@ public interface AnotherFakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity call123testSpecialTags( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { return getDelegate().call123testSpecialTags(body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java index 9c9ba633da75..052aa11e934f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java @@ -41,15 +41,19 @@ public interface FakeApi { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) - default ResponseEntity createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem) { + default ResponseEntity createXmlItem( + +@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { return getDelegate().createXmlItem(xmlItem); } @@ -61,15 +65,19 @@ public interface FakeApi { * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) - default ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body) { + default ResponseEntity fakeOuterBooleanSerialize( + +@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { return getDelegate().fakeOuterBooleanSerialize(body); } @@ -81,15 +89,19 @@ public interface FakeApi { * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) - default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body) { + default ResponseEntity fakeOuterCompositeSerialize( + +@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { return getDelegate().fakeOuterCompositeSerialize(body); } @@ -101,15 +113,19 @@ public interface FakeApi { * @param body Input number as post body (optional) * @return Output number (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) - default ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body) { + default ResponseEntity fakeOuterNumberSerialize( + +@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { return getDelegate().fakeOuterNumberSerialize(body); } @@ -121,15 +137,19 @@ public interface FakeApi { * @param body Input string as post body (optional) * @return Output string (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output string", response = String.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) - default ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body) { + default ResponseEntity fakeOuterStringSerialize( + +@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { return getDelegate().fakeOuterStringSerialize(body); } @@ -141,15 +161,19 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) - default ResponseEntity testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body) { + default ResponseEntity testBodyWithFileSchema( + +@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { return getDelegate().testBodyWithFileSchema(body); } @@ -161,15 +185,21 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query + +, + +@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { return getDelegate().testBodyWithQueryParams(query, body); } @@ -181,8 +211,10 @@ public interface FakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -190,7 +222,9 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClientModel( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { return getDelegate().testClientModel(body); } @@ -216,19 +250,50 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float,@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary,@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date,@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime,@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + default ResponseEntity testEndpointParameters( + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + +@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + +@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + +@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + +@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, + +@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, + +@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, + +@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + +@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { return getDelegate().testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } @@ -248,16 +313,35 @@ public interface FakeApi { * @return Invalid request (status code 400) * or Not found (status code 404) */ + @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid request"), + @ApiResponse(code = 404, message = "Not found") }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + default ResponseEntity testEnumParameters( +@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray +, +@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString +,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray + +,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble + +, + +@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + +@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -274,14 +358,28 @@ public interface FakeApi { * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup + +, +@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup +,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group + +,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup + +, +@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + +) { return getDelegate().testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -292,15 +390,19 @@ public interface FakeApi { * @param param request body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) - default ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Map param) { + default ResponseEntity testInlineAdditionalProperties( + +@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { return getDelegate().testInlineAdditionalProperties(param); } @@ -312,15 +414,21 @@ public interface FakeApi { * @param param2 field2 (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + default ResponseEntity testJsonFormData( + +@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + +@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { return getDelegate().testJsonFormData(param, param2); } @@ -336,14 +444,26 @@ public interface FakeApi { * @param context (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context) { + default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + +) { return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } @@ -356,12 +476,14 @@ public interface FakeApi { * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -369,7 +491,13 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { return getDelegate().uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 7b84b8cd51ae..231633cb34e6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -32,11 +32,13 @@ public interface FakeClassnameTestApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { @Authorization(value = "api_key_query") }, tags={ "fake_classname_tags 123#$%^", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -44,7 +46,9 @@ public interface FakeClassnameTestApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClassname( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { return getDelegate().testClassname(body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java index d966a69941c8..fd2d40410eb3 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java @@ -33,20 +33,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return getDelegate().addPet(body); } @@ -59,19 +64,26 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey) { + default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +) { return getDelegate().deletePet(petId, apiKey); } @@ -84,20 +96,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid status value (status code 400) */ + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable) { + default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable) { return getDelegate().findPetsByStatus(status, pageable); } @@ -111,20 +128,25 @@ public interface PetApi { * or Invalid tag value (status code 400) * @deprecated */ + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable) { + default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + +, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable) { return getDelegate().findPetsByTags(tags, pageable); } @@ -138,20 +160,26 @@ public interface PetApi { * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId) { + default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +) { return getDelegate().getPetById(petId); } @@ -165,22 +193,29 @@ public interface PetApi { * or Pet not found (status code 404) * or Validation exception (status code 405) */ + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return getDelegate().updatePet(body); } @@ -193,19 +228,27 @@ public interface PetApi { * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { return getDelegate().updatePetWithForm(petId, name, status); } @@ -218,12 +261,14 @@ public interface PetApi { * @param file file to upload (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -231,7 +276,13 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { return getDelegate().uploadFile(petId, additionalMetadata, file); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java index 2a0cfabab4b8..01a5e332fc45 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java @@ -34,15 +34,20 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId) { + default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + +) { return getDelegate().deleteOrder(orderId); } @@ -53,11 +58,13 @@ public interface StoreApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @RequestMapping( method = RequestMethod.GET, @@ -78,17 +85,23 @@ public interface StoreApi { * or Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId) { + default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + +) { return getDelegate().getOrderById(orderId); } @@ -100,16 +113,21 @@ public interface StoreApi { * @return successful operation (status code 200) * or Invalid Order (status code 400) */ + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) - default ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body) { + default ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { return getDelegate().placeOrder(body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java index 59615e8d21c1..c6a6fa866994 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java @@ -33,14 +33,18 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) - default ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { return getDelegate().createUser(body); } @@ -51,14 +55,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) - default ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return getDelegate().createUsersWithArrayInput(body); } @@ -69,14 +77,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) - default ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return getDelegate().createUsersWithListInput(body); } @@ -89,15 +101,20 @@ public interface UserApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username) { + default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +) { return getDelegate().deleteUser(username); } @@ -110,17 +127,23 @@ public interface UserApi { * or Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username) { + default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +) { return getDelegate().getUserByName(username); } @@ -133,16 +156,23 @@ public interface UserApi { * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password) { + default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +) { return getDelegate().loginUser(username, password); } @@ -152,8 +182,10 @@ public interface UserApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, @@ -173,15 +205,22 @@ public interface UserApi { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { return getDelegate().updateUser(username, body); } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 8c7e00956c3a..847d9f37777c 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesAnyType */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 864299cf9b28..31b7fad0c945 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesArray */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index b445c7bb0d86..5c23bc8d768e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesBoolean */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 76a9f4e4c256..82d25ab6e747 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 089c1edce9d8..802674f78205 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesInteger */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index f2f8fe6949b0..787a4262026a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesNumber */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index bcca31ee32a2..271b66cf6820 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesObject */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 829ea052d3e1..08ba6bfe63ce 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesString */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java index 7fb6b8e2ef66..db4f29350ded 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Animal */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index aec96b23f033..bf1b74e83fca 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 63a657c8dddf..f1ced8ef71a0 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java index 2a36629dfc75..81c7ab3dd785 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ArrayTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.model.ReadOnlyFirst; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayTest */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Capitalization.java index 587443bb7667..2ccf1e812e5a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Capitalization.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Capitalization */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java index b32ade551792..0876d9f30a0b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Cat */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/CatAllOf.java index ce9d21ae5ecb..d59a3783d0af 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/CatAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * CatAllOf */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java index c79594679cf8..ef9a938298b9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Category */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ClassModel.java index a462f09a9cb9..af4c74423128 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ClassModel.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model with \"_class\" property */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Client.java index 727896658637..298c69c03b17 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Client.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Client */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java index 229b97f2a7cb..09938cd0f5fc 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Dog */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/DogAllOf.java index 29b736410b76..d95ac4a329d9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/DogAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * DogAllOf */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java index ec2d4e1ce8b9..beeff77d9e56 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumArrays.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumArrays */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumClass.java index ef4719c757f0..8f82b2f78436 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumClass.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets EnumClass diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java index f9b00d90ed5b..0ce7ab0f2fa6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.OuterEnum; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumTest */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 8e4f8d5d5d9d..ea5aa826feb7 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FileSchemaTestClass */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java index 091f7d97f2b5..352d758ce6e5 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FormatTest */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 2dd77785ad55..10e514bb1726 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * HasOnlyReadOnly */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java index 7b9a321ecb22..36754fec8c9e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MapTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MapTest */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index d80573256c63..8238e3227a6b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,9 +13,13 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Model200Response.java index 3f2d0da5f331..3f8bdc54450d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Model200Response.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name starting with number */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ec7ccfe1417..99a06748ac14 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ModelApiResponse */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelReturn.java index 5d0c266a148b..d9cc6193aee6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ModelReturn.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing reserved words */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java index 3cc5bf64c066..880351d2843a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name same as property name */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/NumberOnly.java index c1cafb126beb..4af42224ae53 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/NumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * NumberOnly */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Order.java index 0c9dddf85daf..ba0b3b2e3131 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Order */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterComposite.java index 7425f5c75890..cdac99f37e41 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterComposite.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * OuterComposite */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterEnum.java index 6b5abc576b07..d74006b9d33e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/OuterEnum.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets OuterEnum diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java index 289be8925e1b..729ef7defa59 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.util.List; import org.openapitools.model.Category; import org.openapitools.model.Tag; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Pet */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 6f4a25b65efe..f872289b8da3 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ReadOnlyFirst */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/SpecialModelName.java index 16e690b5740f..31cc434cd51b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/SpecialModelName.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * SpecialModelName */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Tag.java index 9306b226ea56..2d1ac94412f7 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Tag.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Tag */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java index 80788f31612a..fb29f038fc6b 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderDefault */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java index 963c3c66b57b..096b4ada0991 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderExample */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/User.java index 4a0c635f1adb..3cadd5d4ec50 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/User.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * User */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java index 465b94b6a88d..62cfbcc6b285 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/XmlItem.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * XmlItem */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index a84f97e7071b..e6d35a4c351e 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -28,8 +28,10 @@ public interface AnotherFakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -37,6 +39,8 @@ public interface AnotherFakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - ResponseEntity call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body); + ResponseEntity call123testSpecialTags( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body); } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java index e22ac97a74a4..ec32cf448bff 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApiController.java @@ -40,7 +40,9 @@ public class AnotherFakeApiController implements AnotherFakeApi { * @return successful operation (status code 200) * @see AnotherFakeApi#call123testSpecialTags */ - public ResponseEntity call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + public ResponseEntity call123testSpecialTags( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"client\" : \"client\" }"; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java index d84e0f2663de..94827ba4a000 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -37,15 +37,19 @@ public interface FakeApi { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) - ResponseEntity createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem); + ResponseEntity createXmlItem( + +@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem); /** @@ -55,15 +59,19 @@ public interface FakeApi { * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) - ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body); + ResponseEntity fakeOuterBooleanSerialize( + +@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body); /** @@ -73,15 +81,19 @@ public interface FakeApi { * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) - ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body); + ResponseEntity fakeOuterCompositeSerialize( + +@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body); /** @@ -91,15 +103,19 @@ public interface FakeApi { * @param body Input number as post body (optional) * @return Output number (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) - ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body); + ResponseEntity fakeOuterNumberSerialize( + +@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body); /** @@ -109,15 +125,19 @@ public interface FakeApi { * @param body Input string as post body (optional) * @return Output string (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output string", response = String.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) - ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body); + ResponseEntity fakeOuterStringSerialize( + +@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body); /** @@ -127,15 +147,19 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) - ResponseEntity testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body); + ResponseEntity testBodyWithFileSchema( + +@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body); /** @@ -145,15 +169,21 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody User body); + ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query + +, + +@ApiParam(value = "", required = true ) @Valid @RequestBody User body); /** @@ -163,8 +193,10 @@ public interface FakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -172,7 +204,9 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - ResponseEntity testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body); + ResponseEntity testClientModel( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body); /** @@ -196,19 +230,50 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - ResponseEntity testEndpointParameters(@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float,@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary,@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date,@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime,@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback); + ResponseEntity testEndpointParameters( + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + +@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + +@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + +@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + +@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, + +@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, + +@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, + +@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + +@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback); /** @@ -226,16 +291,35 @@ public interface FakeApi { * @return Invalid request (status code 400) * or Not found (status code 404) */ + @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid request"), + @ApiResponse(code = 404, message = "Not found") }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString); + ResponseEntity testEnumParameters( +@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray +, +@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString +,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray + +,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble + +, + +@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + +@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString); /** @@ -250,14 +334,28 @@ public interface FakeApi { * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group); + ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup + +, +@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup +,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group + +,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup + +, +@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + +); /** @@ -266,15 +364,19 @@ public interface FakeApi { * @param param request body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) - ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Map param); + ResponseEntity testInlineAdditionalProperties( + +@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param); /** @@ -284,15 +386,21 @@ public interface FakeApi { * @param param2 field2 (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) - ResponseEntity testJsonFormData(@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2); + ResponseEntity testJsonFormData( + +@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + +@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2); /** @@ -306,14 +414,26 @@ public interface FakeApi { * @param context (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context); + ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + +); /** @@ -324,12 +444,14 @@ public interface FakeApi { * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -337,6 +459,12 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata); + ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata); } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java index 99873d39bc34..34b4872f1857 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApiController.java @@ -49,7 +49,9 @@ public class FakeApiController implements FakeApi { * @return successful operation (status code 200) * @see FakeApi#createXmlItem */ - public ResponseEntity createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem) { + public ResponseEntity createXmlItem( + +@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -62,7 +64,9 @@ public class FakeApiController implements FakeApi { * @return Output boolean (status code 200) * @see FakeApi#fakeOuterBooleanSerialize */ - public ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body) { + public ResponseEntity fakeOuterBooleanSerialize( + +@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -75,7 +79,9 @@ public class FakeApiController implements FakeApi { * @return Output composite (status code 200) * @see FakeApi#fakeOuterCompositeSerialize */ - public ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body) { + public ResponseEntity fakeOuterCompositeSerialize( + +@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true }"; @@ -95,7 +101,9 @@ public class FakeApiController implements FakeApi { * @return Output number (status code 200) * @see FakeApi#fakeOuterNumberSerialize */ - public ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body) { + public ResponseEntity fakeOuterNumberSerialize( + +@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -108,7 +116,9 @@ public class FakeApiController implements FakeApi { * @return Output string (status code 200) * @see FakeApi#fakeOuterStringSerialize */ - public ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body) { + public ResponseEntity fakeOuterStringSerialize( + +@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -121,7 +131,9 @@ public class FakeApiController implements FakeApi { * @return Success (status code 200) * @see FakeApi#testBodyWithFileSchema */ - public ResponseEntity testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body) { + public ResponseEntity testBodyWithFileSchema( + +@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -134,7 +146,11 @@ public class FakeApiController implements FakeApi { * @return Success (status code 200) * @see FakeApi#testBodyWithQueryParams */ - public ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody User body) { + public ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query + +, + +@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -147,7 +163,9 @@ public class FakeApiController implements FakeApi { * @return successful operation (status code 200) * @see FakeApi#testClientModel */ - public ResponseEntity testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + public ResponseEntity testClientModel( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"client\" : \"client\" }"; @@ -181,7 +199,35 @@ public class FakeApiController implements FakeApi { * or User not found (status code 404) * @see FakeApi#testEndpointParameters */ - public ResponseEntity testEndpointParameters(@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float,@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary,@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date,@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime,@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + public ResponseEntity testEndpointParameters( + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + +@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + +@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + +@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + +@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, + +@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, + +@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, + +@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + +@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -202,7 +248,23 @@ public class FakeApiController implements FakeApi { * or Not found (status code 404) * @see FakeApi#testEnumParameters */ - public ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + public ResponseEntity testEnumParameters( +@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray +, +@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString +,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray + +,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble + +, + +@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + +@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -220,7 +282,19 @@ public class FakeApiController implements FakeApi { * @return Someting wrong (status code 400) * @see FakeApi#testGroupParameters */ - public ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + public ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup + +, +@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup +,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group + +,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup + +, +@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -232,7 +306,9 @@ public class FakeApiController implements FakeApi { * @return successful operation (status code 200) * @see FakeApi#testInlineAdditionalProperties */ - public ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Map param) { + public ResponseEntity testInlineAdditionalProperties( + +@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -245,7 +321,11 @@ public class FakeApiController implements FakeApi { * @return successful operation (status code 200) * @see FakeApi#testJsonFormData */ - public ResponseEntity testJsonFormData(@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + public ResponseEntity testJsonFormData( + +@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + +@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -262,7 +342,17 @@ public class FakeApiController implements FakeApi { * @return Success (status code 200) * @see FakeApi#testQueryParameterCollectionFormat */ - public ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context) { + public ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -276,7 +366,13 @@ public class FakeApiController implements FakeApi { * @return successful operation (status code 200) * @see FakeApi#uploadFileWithRequiredFile */ - public ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + public ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e0555ba889ea..f1102a0f069e 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -28,11 +28,13 @@ public interface FakeClassnameTestApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { @Authorization(value = "api_key_query") }, tags={ "fake_classname_tags 123#$%^", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -40,6 +42,8 @@ public interface FakeClassnameTestApi { produces = { "application/json" }, consumes = { "application/json" } ) - ResponseEntity testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body); + ResponseEntity testClassname( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body); } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java index 14b1f124d13f..80e92bdeaf15 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java @@ -40,7 +40,9 @@ public class FakeClassnameTestApiController implements FakeClassnameTestApi { * @return successful operation (status code 200) * @see FakeClassnameTestApi#testClassname */ - public ResponseEntity testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + public ResponseEntity testClassname( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"client\" : \"client\" }"; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java index 37449224cb77..f26f3c41e4bc 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -29,20 +29,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) - ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body); + ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); /** @@ -53,19 +58,26 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey); + ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +); /** @@ -76,20 +88,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid status value (status code 400) */ + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable); + ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable); /** @@ -101,20 +118,25 @@ public interface PetApi { * or Invalid tag value (status code 400) * @deprecated */ + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable); + ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + +, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable); /** @@ -126,20 +148,26 @@ public interface PetApi { * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId); + ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +); /** @@ -151,22 +179,29 @@ public interface PetApi { * or Pet not found (status code 404) * or Validation exception (status code 405) */ + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) - ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body); + ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body); /** @@ -177,19 +212,27 @@ public interface PetApi { * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status); + ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status); /** @@ -200,12 +243,14 @@ public interface PetApi { * @param file file to upload (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -213,6 +258,12 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file); + ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file); } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java index 4d2e1b7626f8..27bc49a0f61e 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApiController.java @@ -41,7 +41,9 @@ public class PetApiController implements PetApi { * or Invalid input (status code 405) * @see PetApi#addPet */ - public ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + public ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -55,7 +57,11 @@ public class PetApiController implements PetApi { * or Invalid pet value (status code 400) * @see PetApi#deletePet */ - public ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey) { + public ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -69,7 +75,9 @@ public class PetApiController implements PetApi { * or Invalid status value (status code 400) * @see PetApi#findPetsByStatus */ - public ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, @springfox.documentation.annotations.ApiIgnore final Pageable pageable) { + public ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +, @springfox.documentation.annotations.ApiIgnore final Pageable pageable) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; @@ -96,7 +104,9 @@ public class PetApiController implements PetApi { * @deprecated * @see PetApi#findPetsByTags */ - public ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, @springfox.documentation.annotations.ApiIgnore final Pageable pageable) { + public ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + +, @springfox.documentation.annotations.ApiIgnore final Pageable pageable) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; @@ -123,7 +133,9 @@ public class PetApiController implements PetApi { * or Pet not found (status code 404) * @see PetApi#getPetById */ - public ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId) { + public ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; @@ -150,7 +162,9 @@ public class PetApiController implements PetApi { * or Validation exception (status code 405) * @see PetApi#updatePet */ - public ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + public ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -164,7 +178,13 @@ public class PetApiController implements PetApi { * @return Invalid input (status code 405) * @see PetApi#updatePetWithForm */ - public ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + public ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -178,7 +198,13 @@ public class PetApiController implements PetApi { * @return successful operation (status code 200) * @see PetApi#uploadFile */ - public ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + public ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java index f31855d1318e..29a3d124c55c 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -30,15 +30,20 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId); + ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + +); /** @@ -47,11 +52,13 @@ public interface StoreApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @RequestMapping( method = RequestMethod.GET, @@ -70,17 +77,23 @@ public interface StoreApi { * or Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId); + ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + +); /** @@ -90,15 +103,20 @@ public interface StoreApi { * @return successful operation (status code 200) * or Invalid Order (status code 400) */ + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) - ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body); + ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body); } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApiController.java index 4e95605bddbc..392213709825 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApiController.java @@ -42,7 +42,9 @@ public class StoreApiController implements StoreApi { * or Order not found (status code 404) * @see StoreApi#deleteOrder */ - public ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId) { + public ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -69,7 +71,9 @@ public class StoreApiController implements StoreApi { * or Order not found (status code 404) * @see StoreApi#getOrderById */ - public ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId) { + public ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + +) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; @@ -94,7 +98,9 @@ public class StoreApiController implements StoreApi { * or Invalid Order (status code 400) * @see StoreApi#placeOrder */ - public ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body) { + public ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java index 510d11d8e9e0..f96ae9134403 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -29,14 +29,18 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) - ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body); + ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body); /** @@ -45,14 +49,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) - ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body); + ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); /** @@ -61,14 +69,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) - ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body); + ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body); /** @@ -79,15 +91,20 @@ public interface UserApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username); + ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +); /** @@ -98,17 +115,23 @@ public interface UserApi { * or Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username); + ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +); /** @@ -119,16 +142,23 @@ public interface UserApi { * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password); + ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +); /** @@ -136,8 +166,10 @@ public interface UserApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, @@ -155,14 +187,21 @@ public interface UserApi { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body); + ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body); } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java index 9f5ad372d5a8..a749387b89f1 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java @@ -41,7 +41,9 @@ public class UserApiController implements UserApi { * @return successful operation (status code 200) * @see UserApi#createUser */ - public ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body) { + public ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -53,7 +55,9 @@ public class UserApiController implements UserApi { * @return successful operation (status code 200) * @see UserApi#createUsersWithArrayInput */ - public ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + public ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -65,7 +69,9 @@ public class UserApiController implements UserApi { * @return successful operation (status code 200) * @see UserApi#createUsersWithListInput */ - public ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + public ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -79,7 +85,9 @@ public class UserApiController implements UserApi { * or User not found (status code 404) * @see UserApi#deleteUser */ - public ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username) { + public ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -93,7 +101,9 @@ public class UserApiController implements UserApi { * or User not found (status code 404) * @see UserApi#getUserByName */ - public ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username) { + public ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; @@ -119,7 +129,11 @@ public class UserApiController implements UserApi { * or Invalid username/password supplied (status code 400) * @see UserApi#loginUser */ - public ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password) { + public ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -145,7 +159,11 @@ public class UserApiController implements UserApi { * or User not found (status code 404) * @see UserApi#updateUser */ - public ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body) { + public ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 8c7e00956c3a..46281c6456d3 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesAnyType */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 864299cf9b28..474278b1b192 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,6 +13,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesArray */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index b445c7bb0d86..c670f89cdfc0 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesBoolean */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 1e2c8c2726d3..9f89c16c1bcf 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -13,6 +14,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 089c1edce9d8..5ef4af43bbd9 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesInteger */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index f2f8fe6949b0..95a742297272 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,6 +13,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesNumber */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index bcca31ee32a2..9969c2fe7201 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesObject */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 829ea052d3e1..757c0a536fd8 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesString */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java index 7fb6b8e2ef66..22249d7cc27e 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Animal */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 9c226efbbc46..995bebadda86 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,6 +13,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 51ea58aab386..922dc7a56667 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,6 +13,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java index 1fea247ab3ca..6937756d45c7 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ArrayTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,6 +13,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayTest */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Capitalization.java index 587443bb7667..19ab1f8baff0 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Capitalization.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Capitalization */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java index b32ade551792..ebf9c7cec807 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Cat */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/CatAllOf.java index ce9d21ae5ecb..257322699ab9 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/CatAllOf.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * CatAllOf */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java index c79594679cf8..3c2a6be2b25f 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Category */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ClassModel.java index a462f09a9cb9..4d88c1e45a8e 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ClassModel.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model with \"_class\" property */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Client.java index 727896658637..bb63f835363f 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Client.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Client */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java index 229b97f2a7cb..21a27eb4e458 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Dog */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/DogAllOf.java index 29b736410b76..09bb08f9458b 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/DogAllOf.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * DogAllOf */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java index 90d7bf130bb1..14bf9e2c281c 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumArrays.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,6 +13,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumArrays */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumClass.java index ef4719c757f0..ed676c3662e1 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumClass.java @@ -1,12 +1,17 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets EnumClass diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java index f9b00d90ed5b..3a9a9e85a8c2 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumTest */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java index a99196c28084..3d885b7876d4 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FileSchemaTestClass */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java index 8911b494fd5a..7f83ebda6cbf 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -14,6 +15,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FormatTest */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 2dd77785ad55..a712d19243f9 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * HasOnlyReadOnly */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java index b1d48c044ada..a4f10eadf355 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MapTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -13,6 +14,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MapTest */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 71693227fa7a..b6607ec1de22 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -15,6 +16,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Model200Response.java index 3f2d0da5f331..8e51dc7b0bf5 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Model200Response.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name starting with number */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ec7ccfe1417..1c50e0984df6 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ModelApiResponse */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelReturn.java index 5d0c266a148b..f71f60f59709 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ModelReturn.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing reserved words */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java index 3cc5bf64c066..8336bed2c940 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name same as property name */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/NumberOnly.java index c1cafb126beb..87c0551edfce 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/NumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,6 +11,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * NumberOnly */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Order.java index 06a8fdb89353..c03246a0acb9 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,6 +12,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Order */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterComposite.java index 7425f5c75890..34098a524fc2 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterComposite.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,6 +11,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * OuterComposite */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterEnum.java index 6b5abc576b07..33f64f0954e6 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/OuterEnum.java @@ -1,12 +1,17 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets OuterEnum diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java index 94dfc109a57d..8e56b7045abc 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -14,6 +15,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Pet */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 6f4a25b65efe..655154d2cf28 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ReadOnlyFirst */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java index 16e690b5740f..beddd922ad47 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/SpecialModelName.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * SpecialModelName */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Tag.java index 9306b226ea56..c7dba2565eea 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Tag.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Tag */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index bcf00b393fd4..9dbb6eeeb09d 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,6 +13,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderDefault */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index 2151f844f8ed..998c11fb3232 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,6 +13,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderExample */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/User.java index 4a0c635f1adb..ac48b7bd3ac7 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/User.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,6 +10,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * User */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java index 9240d5345a67..fa83623c4bfb 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/XmlItem.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,6 +13,9 @@ import org.openapitools.jackson.nullable.JsonNullable; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * XmlItem */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index c39c4d2227eb..ba1b869f0363 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -36,8 +36,10 @@ public interface AnotherFakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -45,7 +47,9 @@ public interface AnotherFakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity call123testSpecialTags( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index 2a84a4ab5c69..a56d13721e16 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -45,15 +45,19 @@ public interface FakeApi { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) - default ResponseEntity createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem) { + default ResponseEntity createXmlItem( + +@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -66,15 +70,19 @@ public interface FakeApi { * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) - default ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body) { + default ResponseEntity fakeOuterBooleanSerialize( + +@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -87,15 +95,19 @@ public interface FakeApi { * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) - default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body) { + default ResponseEntity fakeOuterCompositeSerialize( + +@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { @@ -117,15 +129,19 @@ public interface FakeApi { * @param body Input number as post body (optional) * @return Output number (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) - default ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body) { + default ResponseEntity fakeOuterNumberSerialize( + +@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -138,15 +154,19 @@ public interface FakeApi { * @param body Input string as post body (optional) * @return Output string (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output string", response = String.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) - default ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body) { + default ResponseEntity fakeOuterStringSerialize( + +@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -159,15 +179,19 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) - default ResponseEntity testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body) { + default ResponseEntity testBodyWithFileSchema( + +@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -180,15 +204,21 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query + +, + +@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -201,8 +231,10 @@ public interface FakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -210,7 +242,9 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClientModel( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -246,19 +280,50 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float,@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary,@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date,@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime,@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + default ResponseEntity testEndpointParameters( + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + +@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + +@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + +@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + +@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, + +@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, + +@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, + +@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + +@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -279,16 +344,35 @@ public interface FakeApi { * @return Invalid request (status code 400) * or Not found (status code 404) */ + @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid request"), + @ApiResponse(code = 404, message = "Not found") }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + default ResponseEntity testEnumParameters( +@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray +, +@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString +,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray + +,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble + +, + +@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + +@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -306,14 +390,28 @@ public interface FakeApi { * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup + +, +@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup +,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group + +,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup + +, +@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -325,15 +423,19 @@ public interface FakeApi { * @param param request body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) - default ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Map param) { + default ResponseEntity testInlineAdditionalProperties( + +@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -346,15 +448,21 @@ public interface FakeApi { * @param param2 field2 (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + default ResponseEntity testJsonFormData( + +@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + +@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -371,14 +479,26 @@ public interface FakeApi { * @param context (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context) { + default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -392,12 +512,14 @@ public interface FakeApi { * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -405,7 +527,13 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 081a205e9125..71ce0007da65 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,11 +36,13 @@ public interface FakeClassnameTestApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { @Authorization(value = "api_key_query") }, tags={ "fake_classname_tags 123#$%^", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -48,7 +50,9 @@ public interface FakeClassnameTestApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClassname( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 62ac8b226cc6..f07fa4a7edff 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -37,20 +37,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -64,19 +69,26 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey) { + default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -90,20 +102,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid status value (status code 400) */ + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable) { + default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -132,20 +149,25 @@ public interface PetApi { * or Invalid tag value (status code 400) * @deprecated */ + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable) { + default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags + +, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -174,20 +196,26 @@ public interface PetApi { * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId) { + default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -216,22 +244,29 @@ public interface PetApi { * or Pet not found (status code 404) * or Validation exception (status code 405) */ + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -245,19 +280,27 @@ public interface PetApi { * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -271,12 +314,14 @@ public interface PetApi { * @param file file to upload (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -284,7 +329,13 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 65d771ce01bb..22b5b7670284 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -38,15 +38,20 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId) { + default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -58,11 +63,13 @@ public interface StoreApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @RequestMapping( method = RequestMethod.GET, @@ -84,17 +91,23 @@ public interface StoreApi { * or Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId) { + default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -121,16 +134,21 @@ public interface StoreApi { * @return successful operation (status code 200) * or Invalid Order (status code 400) */ + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) - default ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body) { + default ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 69205eeeb18f..27f6a346d300 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -37,14 +37,18 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) - default ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -56,14 +60,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) - default ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -75,14 +83,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) - default ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -96,15 +108,20 @@ public interface UserApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username) { + default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -118,17 +135,23 @@ public interface UserApi { * or Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username) { + default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -156,16 +179,23 @@ public interface UserApi { * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password) { + default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -176,8 +206,10 @@ public interface UserApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, @@ -198,15 +230,22 @@ public interface UserApi { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 8c7e00956c3a..847d9f37777c 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesAnyType */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 864299cf9b28..31b7fad0c945 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesArray */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index b445c7bb0d86..5c23bc8d768e 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesBoolean */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 76a9f4e4c256..82d25ab6e747 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 089c1edce9d8..802674f78205 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesInteger */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index f2f8fe6949b0..787a4262026a 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesNumber */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index bcca31ee32a2..271b66cf6820 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesObject */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 829ea052d3e1..08ba6bfe63ce 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesString */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java index 7fb6b8e2ef66..db4f29350ded 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Animal */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index aec96b23f033..bf1b74e83fca 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 63a657c8dddf..f1ced8ef71a0 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java index 2a36629dfc75..81c7ab3dd785 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ArrayTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.model.ReadOnlyFirst; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayTest */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java index 587443bb7667..2ccf1e812e5a 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Capitalization.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Capitalization */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java index b32ade551792..0876d9f30a0b 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Cat */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java index ce9d21ae5ecb..d59a3783d0af 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * CatAllOf */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java index c79594679cf8..ef9a938298b9 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Category */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java index a462f09a9cb9..af4c74423128 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ClassModel.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model with \"_class\" property */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Client.java index 727896658637..298c69c03b17 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Client.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Client */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java index 229b97f2a7cb..09938cd0f5fc 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Dog */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java index 29b736410b76..d95ac4a329d9 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * DogAllOf */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java index ec2d4e1ce8b9..beeff77d9e56 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumArrays.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumArrays */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java index ef4719c757f0..8f82b2f78436 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumClass.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets EnumClass diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java index f9b00d90ed5b..0ce7ab0f2fa6 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.OuterEnum; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumTest */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 8e4f8d5d5d9d..ea5aa826feb7 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FileSchemaTestClass */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java index 091f7d97f2b5..352d758ce6e5 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FormatTest */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 2dd77785ad55..10e514bb1726 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * HasOnlyReadOnly */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java index 7b9a321ecb22..36754fec8c9e 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MapTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MapTest */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index d80573256c63..8238e3227a6b 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,9 +13,13 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java index 3f2d0da5f331..3f8bdc54450d 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Model200Response.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name starting with number */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ec7ccfe1417..99a06748ac14 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ModelApiResponse */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java index 5d0c266a148b..d9cc6193aee6 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ModelReturn.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing reserved words */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java index 3cc5bf64c066..880351d2843a 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name same as property name */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java index c1cafb126beb..4af42224ae53 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/NumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * NumberOnly */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Order.java index 0c9dddf85daf..ba0b3b2e3131 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Order */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java index 7425f5c75890..cdac99f37e41 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterComposite.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * OuterComposite */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java index 6b5abc576b07..d74006b9d33e 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/OuterEnum.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets OuterEnum diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java index 289be8925e1b..729ef7defa59 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.util.List; import org.openapitools.model.Category; import org.openapitools.model.Tag; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Pet */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 6f4a25b65efe..f872289b8da3 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ReadOnlyFirst */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java index 16e690b5740f..31cc434cd51b 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/SpecialModelName.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * SpecialModelName */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Tag.java index 9306b226ea56..2d1ac94412f7 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Tag.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Tag */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java index 80788f31612a..fb29f038fc6b 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderDefault */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java index 963c3c66b57b..096b4ada0991 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderExample */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/User.java index 4a0c635f1adb..3cadd5d4ec50 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/User.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * User */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java index 465b94b6a88d..62cfbcc6b285 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/XmlItem.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * XmlItem */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java index c39c4d2227eb..ba1b869f0363 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -36,8 +36,10 @@ public interface AnotherFakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -45,7 +47,9 @@ public interface AnotherFakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity call123testSpecialTags( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index 03bab0f6dcc8..3cc4f5442898 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -45,15 +45,19 @@ public interface FakeApi { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) - default ResponseEntity createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem) { + default ResponseEntity createXmlItem( + +@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -66,15 +70,19 @@ public interface FakeApi { * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) - default ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body) { + default ResponseEntity fakeOuterBooleanSerialize( + +@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -87,15 +95,19 @@ public interface FakeApi { * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) - default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body) { + default ResponseEntity fakeOuterCompositeSerialize( + +@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { @@ -117,15 +129,19 @@ public interface FakeApi { * @param body Input number as post body (optional) * @return Output number (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) - default ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body) { + default ResponseEntity fakeOuterNumberSerialize( + +@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -138,15 +154,19 @@ public interface FakeApi { * @param body Input string as post body (optional) * @return Output string (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output string", response = String.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) - default ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body) { + default ResponseEntity fakeOuterStringSerialize( + +@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -159,15 +179,19 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) - default ResponseEntity testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body) { + default ResponseEntity testBodyWithFileSchema( + +@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -180,15 +204,21 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query + +, + +@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -201,8 +231,10 @@ public interface FakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -210,7 +242,9 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClientModel( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -246,19 +280,50 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float,@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary,@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date,@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime,@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + default ResponseEntity testEndpointParameters( + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + +@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + +@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + +@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + +@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, + +@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, + +@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, + +@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + +@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -279,16 +344,35 @@ public interface FakeApi { * @return Invalid request (status code 400) * or Not found (status code 404) */ + @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid request"), + @ApiResponse(code = 404, message = "Not found") }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) Optional> enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) Optional enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) Optional> enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") Optional enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Optional enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Optional enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + default ResponseEntity testEnumParameters( +@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) Optional> enumHeaderStringArray +, +@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) Optional enumHeaderString +,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) Optional> enumQueryStringArray + +,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") Optional enumQueryString + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Optional enumQueryInteger + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Optional enumQueryDouble + +, + +@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + +@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -306,14 +390,28 @@ public interface FakeApi { * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Optional stringGroup,@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Optional booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Optional int64Group) { + default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup + +, +@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup +,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group + +,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Optional stringGroup + +, +@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Optional booleanGroup +,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Optional int64Group + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -325,15 +423,19 @@ public interface FakeApi { * @param param request body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) - default ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Map param) { + default ResponseEntity testInlineAdditionalProperties( + +@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -346,15 +448,21 @@ public interface FakeApi { * @param param2 field2 (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + default ResponseEntity testJsonFormData( + +@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + +@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -371,14 +479,26 @@ public interface FakeApi { * @param context (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context) { + default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -392,12 +512,14 @@ public interface FakeApi { * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -405,7 +527,13 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 081a205e9125..71ce0007da65 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,11 +36,13 @@ public interface FakeClassnameTestApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { @Authorization(value = "api_key_query") }, tags={ "fake_classname_tags 123#$%^", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -48,7 +50,9 @@ public interface FakeClassnameTestApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClassname( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index b65e9c01bf7c..6eb817a03f54 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -38,20 +38,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -65,19 +70,26 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) Optional apiKey) { + default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) Optional apiKey +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -91,20 +103,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid status value (status code 400) */ + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status) { + default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -133,20 +150,25 @@ public interface PetApi { * or Invalid tag value (status code 400) * @deprecated */ + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags) { + default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -175,20 +197,26 @@ public interface PetApi { * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId) { + default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -217,22 +245,29 @@ public interface PetApi { * or Pet not found (status code 404) * or Validation exception (status code 405) */ + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -246,19 +281,27 @@ public interface PetApi { * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -272,12 +315,14 @@ public interface PetApi { * @param file file to upload (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -285,7 +330,13 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index 65d771ce01bb..22b5b7670284 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -38,15 +38,20 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId) { + default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -58,11 +63,13 @@ public interface StoreApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @RequestMapping( method = RequestMethod.GET, @@ -84,17 +91,23 @@ public interface StoreApi { * or Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId) { + default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -121,16 +134,21 @@ public interface StoreApi { * @return successful operation (status code 200) * or Invalid Order (status code 400) */ + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) - default ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body) { + default ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index 69205eeeb18f..27f6a346d300 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -37,14 +37,18 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) - default ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -56,14 +60,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) - default ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -75,14 +83,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) - default ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -96,15 +108,20 @@ public interface UserApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username) { + default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -118,17 +135,23 @@ public interface UserApi { * or Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username) { + default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -156,16 +179,23 @@ public interface UserApi { * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password) { + default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -176,8 +206,10 @@ public interface UserApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, @@ -198,15 +230,22 @@ public interface UserApi { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 8c7e00956c3a..847d9f37777c 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesAnyType */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 864299cf9b28..31b7fad0c945 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesArray */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index b445c7bb0d86..5c23bc8d768e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesBoolean */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 76a9f4e4c256..82d25ab6e747 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 089c1edce9d8..802674f78205 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesInteger */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index f2f8fe6949b0..787a4262026a 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesNumber */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index bcca31ee32a2..271b66cf6820 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesObject */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 829ea052d3e1..08ba6bfe63ce 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesString */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java index 1319038cccc0..7598b6f55612 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Animal */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index aec96b23f033..bf1b74e83fca 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 63a657c8dddf..f1ced8ef71a0 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java index 2a36629dfc75..81c7ab3dd785 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ArrayTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.model.ReadOnlyFirst; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayTest */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java index c7912d432b77..1835c7bf2114 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.BigCatAllOf; import org.openapitools.model.Cat; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCat */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java index aba5eb47270c..43555f5bfed0 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCatAllOf */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java index 587443bb7667..2ccf1e812e5a 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Capitalization.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Capitalization */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java index b32ade551792..0876d9f30a0b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Cat */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java index ce9d21ae5ecb..d59a3783d0af 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * CatAllOf */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java index c79594679cf8..ef9a938298b9 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Category */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java index a462f09a9cb9..af4c74423128 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ClassModel.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model with \"_class\" property */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java index 727896658637..298c69c03b17 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Client.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Client */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java index 229b97f2a7cb..09938cd0f5fc 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Dog */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java index 29b736410b76..d95ac4a329d9 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * DogAllOf */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java index ec2d4e1ce8b9..beeff77d9e56 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumArrays */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java index ef4719c757f0..8f82b2f78436 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets EnumClass diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java index f9b00d90ed5b..0ce7ab0f2fa6 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.OuterEnum; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumTest */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 8e4f8d5d5d9d..ea5aa826feb7 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FileSchemaTestClass */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java index 091f7d97f2b5..352d758ce6e5 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FormatTest */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 2dd77785ad55..10e514bb1726 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * HasOnlyReadOnly */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java index 7b9a321ecb22..36754fec8c9e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MapTest */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index d80573256c63..8238e3227a6b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,9 +13,13 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java index 3f2d0da5f331..3f8bdc54450d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Model200Response.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name starting with number */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ec7ccfe1417..99a06748ac14 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ModelApiResponse */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java index 5d0c266a148b..d9cc6193aee6 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ModelReturn.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing reserved words */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java index 3cc5bf64c066..880351d2843a 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name same as property name */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java index c1cafb126beb..4af42224ae53 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/NumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * NumberOnly */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java index 0c9dddf85daf..ba0b3b2e3131 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Order */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java index 7425f5c75890..cdac99f37e41 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterComposite.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * OuterComposite */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java index 6b5abc576b07..d74006b9d33e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets OuterEnum diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java index 5f44cab5669e..7f4aa1ef8b12 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -13,9 +14,13 @@ import java.util.Set; import org.openapitools.model.Category; import org.openapitools.model.Tag; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Pet */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 6f4a25b65efe..f872289b8da3 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ReadOnlyFirst */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java index 16e690b5740f..31cc434cd51b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/SpecialModelName.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * SpecialModelName */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java index 9306b226ea56..2d1ac94412f7 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Tag.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Tag */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java index 80788f31612a..fb29f038fc6b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderDefault */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java index 963c3c66b57b..096b4ada0991 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderExample */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java index 4a0c635f1adb..3cadd5d4ec50 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/User.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * User */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java index 465b94b6a88d..62cfbcc6b285 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/XmlItem.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * XmlItem */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java index 42b1510a64d4..b71a163e8ef5 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java @@ -40,8 +40,10 @@ public interface AnotherFakeApi { * @return successful operation (status code 200) */ @ApiVirtual + @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -49,7 +51,9 @@ public interface AnotherFakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity call123testSpecialTags( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java index 700d3b47d22f..c36496ec99d3 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java @@ -49,15 +49,19 @@ public interface FakeApi { * @return successful operation (status code 200) */ @ApiVirtual + @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) - default ResponseEntity createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem) { + default ResponseEntity createXmlItem( + +@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -71,15 +75,19 @@ public interface FakeApi { * @return Output boolean (status code 200) */ @ApiVirtual + @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) - default ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body) { + default ResponseEntity fakeOuterBooleanSerialize( + +@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -93,15 +101,19 @@ public interface FakeApi { * @return Output composite (status code 200) */ @ApiVirtual + @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) - default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body) { + default ResponseEntity fakeOuterCompositeSerialize( + +@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { @@ -124,15 +136,19 @@ public interface FakeApi { * @return Output number (status code 200) */ @ApiVirtual + @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) - default ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body) { + default ResponseEntity fakeOuterNumberSerialize( + +@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -146,15 +162,19 @@ public interface FakeApi { * @return Output string (status code 200) */ @ApiVirtual + @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output string", response = String.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) - default ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body) { + default ResponseEntity fakeOuterStringSerialize( + +@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -168,15 +188,19 @@ public interface FakeApi { * @return Success (status code 200) */ @ApiVirtual + @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) - default ResponseEntity testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body) { + default ResponseEntity testBodyWithFileSchema( + +@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -190,15 +214,21 @@ public interface FakeApi { * @return Success (status code 200) */ @ApiVirtual + @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query + +, + +@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -212,8 +242,10 @@ public interface FakeApi { * @return successful operation (status code 200) */ @ApiVirtual + @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -221,7 +253,9 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClientModel( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -258,19 +292,50 @@ public interface FakeApi { * or User not found (status code 404) */ @ApiVirtual + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float,@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary,@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date,@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime,@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + default ResponseEntity testEndpointParameters( + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + +@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + +@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + +@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + +@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, + +@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, + +@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, + +@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + +@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -292,16 +357,35 @@ public interface FakeApi { * or Not found (status code 404) */ @ApiVirtual + @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid request"), + @ApiResponse(code = 404, message = "Not found") }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + default ResponseEntity testEnumParameters( +@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray +, +@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString +,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray + +,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble + +, + +@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + +@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -320,14 +404,28 @@ public interface FakeApi { * @return Someting wrong (status code 400) */ @ApiVirtual + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup + +, +@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup +,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group + +,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup + +, +@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -340,15 +438,19 @@ public interface FakeApi { * @return successful operation (status code 200) */ @ApiVirtual + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) - default ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Map param) { + default ResponseEntity testInlineAdditionalProperties( + +@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -362,15 +464,21 @@ public interface FakeApi { * @return successful operation (status code 200) */ @ApiVirtual + @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + default ResponseEntity testJsonFormData( + +@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + +@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -388,14 +496,26 @@ public interface FakeApi { * @return Success (status code 200) */ @ApiVirtual + @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context) { + default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -410,12 +530,14 @@ public interface FakeApi { * @return successful operation (status code 200) */ @ApiVirtual + @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -423,7 +545,13 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java index 733c4b7532d2..4aa760d7a8e9 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java @@ -40,11 +40,13 @@ public interface FakeClassnameTestApi { * @return successful operation (status code 200) */ @ApiVirtual + @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { @Authorization(value = "api_key_query") }, tags={ "fake_classname_tags 123#$%^", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -52,7 +54,9 @@ public interface FakeClassnameTestApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClassname( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java index 9e3e39339af5..fbac4cf8c2af 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java @@ -42,20 +42,25 @@ public interface PetApi { * or Invalid input (status code 405) */ @ApiVirtual + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -70,19 +75,26 @@ public interface PetApi { * or Invalid pet value (status code 400) */ @ApiVirtual + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey) { + default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -97,20 +109,25 @@ public interface PetApi { * or Invalid status value (status code 400) */ @ApiVirtual + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status) { + default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -140,20 +157,25 @@ public interface PetApi { * @deprecated */ @ApiVirtual + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags) { + default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -183,20 +205,26 @@ public interface PetApi { * or Pet not found (status code 404) */ @ApiVirtual + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId) { + default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -226,22 +254,29 @@ public interface PetApi { * or Validation exception (status code 405) */ @ApiVirtual + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -256,19 +291,27 @@ public interface PetApi { * @return Invalid input (status code 405) */ @ApiVirtual + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -283,12 +326,14 @@ public interface PetApi { * @return successful operation (status code 200) */ @ApiVirtual + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -296,7 +341,13 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java index f31840b4f143..7edd493e6b11 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java @@ -42,15 +42,20 @@ public interface StoreApi { * or Order not found (status code 404) */ @ApiVirtual + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId) { + default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -63,11 +68,13 @@ public interface StoreApi { * @return successful operation (status code 200) */ @ApiVirtual + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @RequestMapping( method = RequestMethod.GET, @@ -90,17 +97,23 @@ public interface StoreApi { * or Order not found (status code 404) */ @ApiVirtual + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId) { + default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -128,16 +141,21 @@ public interface StoreApi { * or Invalid Order (status code 400) */ @ApiVirtual + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) - default ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body) { + default ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java index 9e2c99591309..f97eeb8e4071 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java @@ -41,14 +41,18 @@ public interface UserApi { * @return successful operation (status code 200) */ @ApiVirtual + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) - default ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -61,14 +65,18 @@ public interface UserApi { * @return successful operation (status code 200) */ @ApiVirtual + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) - default ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -81,14 +89,18 @@ public interface UserApi { * @return successful operation (status code 200) */ @ApiVirtual + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) - default ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -103,15 +115,20 @@ public interface UserApi { * or User not found (status code 404) */ @ApiVirtual + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username) { + default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -126,17 +143,23 @@ public interface UserApi { * or User not found (status code 404) */ @ApiVirtual + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username) { + default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -165,16 +188,23 @@ public interface UserApi { * or Invalid username/password supplied (status code 400) */ @ApiVirtual + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password) { + default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -186,8 +216,10 @@ public interface UserApi { * @return successful operation (status code 200) */ @ApiVirtual + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, @@ -209,15 +241,22 @@ public interface UserApi { * or User not found (status code 404) */ @ApiVirtual + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesAnyType.java index 53912aef870f..22fa90b899c0 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesAnyType.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesAnyType */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesArray.java index 54c20bff237c..83acca5c876f 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesArray.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesArray */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesBoolean.java index d97294b55522..8d09220b9cbb 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesBoolean.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesBoolean */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java index cf58358fe5fb..d51807ac9765 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesInteger.java index fae7f3537415..cac69369d0ae 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesInteger.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesInteger */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesNumber.java index d794067a8ad7..b58b9bc950c4 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesNumber.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesNumber */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesObject.java index 19a1cb20f056..67b8b985fedf 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesObject.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesObject */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesString.java index b39451f8a75d..51c6a3054665 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/AdditionalPropertiesString.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesString */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java index 8bd774613ef7..51c6715f728d 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Animal */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java index 9ae273ba4df7..bafe2d77003b 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java index 796fe05be61e..e7c79260c172 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java index 2c0996a0f966..620e277c3746 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ArrayTest.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.virtualan.model.ReadOnlyFirst; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayTest */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java index 6be0905eda70..4ed49f643a6b 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.virtualan.model.BigCatAllOf; import org.openapitools.virtualan.model.Cat; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCat */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java index d7809187f581..943231933200 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCatAllOf */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java index 203e488e0a7f..d21f7764706b 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Capitalization.java @@ -1,14 +1,19 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Capitalization */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java index 52d0d2e40be5..395738af94c2 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.virtualan.model.Animal; import org.openapitools.virtualan.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Cat */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/CatAllOf.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/CatAllOf.java index bd739d710740..b0ad30eb11c5 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/CatAllOf.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/CatAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * CatAllOf */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java index f7ee48c86238..c626fa4b8cfa 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java @@ -1,14 +1,19 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Category */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java index 6e76f1d4433d..cef8cd8b90a0 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ClassModel.java @@ -1,14 +1,19 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model with \"_class\" property */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java index d67f27ec39c2..28b2c3b1b5fd 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Client.java @@ -1,14 +1,19 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Client */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java index efcab2e2ea06..8af075378f7f 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.virtualan.model.Animal; import org.openapitools.virtualan.model.DogAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Dog */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/DogAllOf.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/DogAllOf.java index 3faa1dd56f5c..678e4809263a 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/DogAllOf.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/DogAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * DogAllOf */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java index e166cf59f7f0..c2d6663545f4 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumArrays */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumClass.java index 02adc43755a7..85be2a8ca87e 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumClass.java @@ -1,12 +1,18 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets EnumClass diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java index 20c6df50571f..d27c78376abc 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.virtualan.model.OuterEnum; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumTest */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java index 561455901aba..7000e76b90dc 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FileSchemaTestClass.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FileSchemaTestClass */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java index fb66e37f30fd..b17cb35148c0 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FormatTest */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java index 48053ce06ae8..e74e246e1eeb 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/HasOnlyReadOnly.java @@ -1,14 +1,19 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * HasOnlyReadOnly */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java index 015d09ef65cc..1aac4a7b761e 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MapTest */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java index 9ab1502ece7f..3b7c1d6f066e 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,9 +13,13 @@ import java.util.Map; import java.util.UUID; import org.openapitools.virtualan.model.Animal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java index 015d939e4421..d6ee65d5da49 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Model200Response.java @@ -1,14 +1,19 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name starting with number */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java index 773ae33fb65b..7aa0db2e770b 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelApiResponse.java @@ -1,14 +1,19 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ModelApiResponse */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java index 94edc8e28b63..beccd82a057a 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ModelReturn.java @@ -1,14 +1,19 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing reserved words */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java index 93032c7789e0..09c2ff8ded9c 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java @@ -1,14 +1,19 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name same as property name */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java index 2701de1414a9..ac7912f6bb3a 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/NumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * NumberOnly */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java index 6b6992560bbe..f7053b1ef4c8 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Order */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java index a7e770bcd018..654297922e7e 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterComposite.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * OuterComposite */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterEnum.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterEnum.java index ef0bba51c505..574ca853a37b 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterEnum.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterEnum.java @@ -1,12 +1,18 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets OuterEnum diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java index bfcbcc446665..a1fcc8fd5276 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -13,9 +14,13 @@ import java.util.Set; import org.openapitools.virtualan.model.Category; import org.openapitools.virtualan.model.Tag; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Pet */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java index 56fbcc791803..0da3f27957b7 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java @@ -1,14 +1,19 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ReadOnlyFirst */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java index 8623dccd79ec..030ff057ae43 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/SpecialModelName.java @@ -1,14 +1,19 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * SpecialModelName */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java index 24a53e73c9a2..05f100a5113d 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Tag.java @@ -1,14 +1,19 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Tag */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java index cfe55efc337b..603dceb13698 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderDefault */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java index 9afbf2d5ed8f..a8470a066d82 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderExample */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java index 35ca0d4cd1cd..8232f1059a48 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/User.java @@ -1,14 +1,19 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * User */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java index 7535d477655b..0a23cfea1162 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/XmlItem.java @@ -1,5 +1,6 @@ package org.openapitools.virtualan.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * XmlItem */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java index c39c4d2227eb..ba1b869f0363 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -36,8 +36,10 @@ public interface AnotherFakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -45,7 +47,9 @@ public interface AnotherFakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity call123testSpecialTags( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java index 07302b4c7d8c..c22b8c03f8fe 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java @@ -45,15 +45,19 @@ public interface FakeApi { * @param xmlItem XmlItem Body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) - default ResponseEntity createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem) { + default ResponseEntity createXmlItem( + +@ApiParam(value = "XmlItem Body", required = true ) @Valid @RequestBody XmlItem xmlItem) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -66,15 +70,19 @@ public interface FakeApi { * @param body Input boolean as post body (optional) * @return Output boolean (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/boolean", produces = { "*/*" } ) - default ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body) { + default ResponseEntity fakeOuterBooleanSerialize( + +@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody(required = false) Boolean body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -87,15 +95,19 @@ public interface FakeApi { * @param body Input composite as post body (optional) * @return Output composite (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/composite", produces = { "*/*" } ) - default ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body) { + default ResponseEntity fakeOuterCompositeSerialize( + +@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody(required = false) OuterComposite body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) { @@ -117,15 +129,19 @@ public interface FakeApi { * @param body Input number as post body (optional) * @return Output number (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/number", produces = { "*/*" } ) - default ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body) { + default ResponseEntity fakeOuterNumberSerialize( + +@ApiParam(value = "Input number as post body" ) @Valid @RequestBody(required = false) BigDecimal body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -138,15 +154,19 @@ public interface FakeApi { * @param body Input string as post body (optional) * @return Output string (status code 200) */ + @ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Output string", response = String.class) }) @RequestMapping( method = RequestMethod.POST, value = "/fake/outer/string", produces = { "*/*" } ) - default ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body) { + default ResponseEntity fakeOuterStringSerialize( + +@ApiParam(value = "Input string as post body" ) @Valid @RequestBody(required = false) String body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -159,15 +179,19 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-file-schema", consumes = { "application/json" } ) - default ResponseEntity testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body) { + default ResponseEntity testBodyWithFileSchema( + +@ApiParam(value = "", required = true ) @Valid @RequestBody FileSchemaTestClass body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -180,15 +204,21 @@ public interface FakeApi { * @param body (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/body-with-query-params", consumes = { "application/json" } ) - default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody User body) { + default ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query + +, + +@ApiParam(value = "", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -201,8 +231,10 @@ public interface FakeApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -210,7 +242,9 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClientModel( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -246,19 +280,50 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.POST, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEndpointParameters(@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float,@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string,@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary,@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date,@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime,@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { + default ResponseEntity testEndpointParameters( + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter, + +@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte, + +@ApiParam(value = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32, + +@ApiParam(value = "None") @Valid @RequestPart(value = "int64", required = false) Long int64, + +@ApiParam(value = "None") @Valid @RequestPart(value = "float", required = false) Float _float, + +@ApiParam(value = "None") @Valid @RequestPart(value = "string", required = false) String string, + +@ApiParam(value = "None") @Valid @RequestPart(value = "binary", required = false) MultipartFile binary, + +@ApiParam(value = "None") @Valid @RequestPart(value = "date", required = false) LocalDate date, + +@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) OffsetDateTime dateTime, + +@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password, + +@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -279,16 +344,35 @@ public interface FakeApi { * @return Invalid request (status code 400) * or Not found (status code 404) */ + @ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid request"), + @ApiResponse(code = 404, message = "Not found") }) @RequestMapping( method = RequestMethod.GET, value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { + default ResponseEntity testEnumParameters( +@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray +, +@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString +,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray + +,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger + +,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble + +, + +@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List enumFormStringArray, + +@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -306,14 +390,28 @@ public interface FakeApi { * @param int64Group Integer in group parameters (optional) * @return Someting wrong (status code 400) */ + @ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Someting wrong") }) @RequestMapping( method = RequestMethod.DELETE, value = "/fake" ) - default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) { + default ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup + +, +@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup +,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group + +,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup + +, +@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup +,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -325,15 +423,19 @@ public interface FakeApi { * @param param request body (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) - default ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Map param) { + default ResponseEntity testInlineAdditionalProperties( + +@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map param) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -346,15 +448,21 @@ public interface FakeApi { * @param param2 field2 (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity testJsonFormData(@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { + default ResponseEntity testJsonFormData( + +@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param, + +@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -371,14 +479,26 @@ public interface FakeApi { * @param context (required) * @return Success (status code 200) */ + @ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) @RequestMapping( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) - default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context) { + default ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url + +,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -392,12 +512,14 @@ public interface FakeApi { * @param additionalMetadata Additional data to pass to server (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -405,7 +527,13 @@ public interface FakeApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { + default ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 081a205e9125..71ce0007da65 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -36,11 +36,13 @@ public interface FakeClassnameTestApi { * @param body client model (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = { @Authorization(value = "api_key_query") }, tags={ "fake_classname_tags 123#$%^", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @RequestMapping( method = RequestMethod.PATCH, @@ -48,7 +50,9 @@ public interface FakeClassnameTestApi { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) { + default ResponseEntity testClassname( + +@ApiParam(value = "client model", required = true ) @Valid @RequestBody Client body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index b48e45b6068b..b0e4e2c2dc2e 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -38,20 +38,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid input (status code 405) */ + @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity addPet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -65,19 +70,26 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid pet value (status code 400) */ + @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping( method = RequestMethod.DELETE, value = "/pet/{petId}" ) - default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey) { + default ResponseEntity deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId + +, +@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -91,20 +103,25 @@ public interface PetApi { * @return successful operation (status code 200) * or Invalid status value (status code 400) */ + @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status) { + default ResponseEntity> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -133,20 +150,25 @@ public interface PetApi { * or Invalid tag value (status code 400) * @deprecated */ + @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "Set", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), + @ApiResponse(code = 400, message = "Invalid tag value") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) - default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags) { + default ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -175,20 +197,26 @@ public interface PetApi { * or Invalid ID supplied (status code 400) * or Pet not found (status code 404) */ + @ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = { @Authorization(value = "api_key") }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId) { + default ResponseEntity getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -217,22 +245,29 @@ public interface PetApi { * or Pet not found (status code 404) * or Validation exception (status code 405) */ + @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation"), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) @RequestMapping( method = RequestMethod.PUT, value = "/pet", consumes = { "application/json", "application/xml" } ) - default ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) { + default ResponseEntity updatePet( + +@ApiParam(value = "Pet object that needs to be added to the store", required = true ) @Valid @RequestBody Pet body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -246,19 +281,27 @@ public interface PetApi { * @param status Updated status of the pet (optional) * @return Invalid input (status code 405) */ + @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping( method = RequestMethod.POST, value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) - default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { + default ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name, + +@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -272,12 +315,14 @@ public interface PetApi { * @param file file to upload (optional) * @return successful operation (status code 200) */ + @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping( method = RequestMethod.POST, @@ -285,7 +330,13 @@ public interface PetApi { produces = { "application/json" }, consumes = { "multipart/form-data" } ) - default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { + default ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId + +, + +@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata, + +@ApiParam(value = "file to upload") @Valid @RequestPart(value = "file", required = false) MultipartFile file) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index 65d771ce01bb..22b5b7670284 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -38,15 +38,20 @@ public interface StoreApi { * @return Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) - default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId) { + default ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -58,11 +63,13 @@ public interface StoreApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @Authorization(value = "api_key") }, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @RequestMapping( method = RequestMethod.GET, @@ -84,17 +91,23 @@ public interface StoreApi { * or Invalid ID supplied (status code 400) * or Order not found (status code 404) */ + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId) { + default ResponseEntity getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -121,16 +134,21 @@ public interface StoreApi { * @return successful operation (status code 200) * or Invalid Order (status code 400) */ + @ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping( method = RequestMethod.POST, value = "/store/order", produces = { "application/xml", "application/json" } ) - default ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body) { + default ResponseEntity placeOrder( + +@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index 69205eeeb18f..27f6a346d300 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -37,14 +37,18 @@ public interface UserApi { * @param body Created user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user" ) - default ResponseEntity createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity createUser( + +@ApiParam(value = "Created user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -56,14 +60,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithArray" ) - default ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithArrayInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -75,14 +83,18 @@ public interface UserApi { * @param body List of user object (required) * @return successful operation (status code 200) */ + @ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.POST, value = "/user/createWithList" ) - default ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body) { + default ResponseEntity createUsersWithListInput( + +@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -96,15 +108,20 @@ public interface UserApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.DELETE, value = "/user/{username}" ) - default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username) { + default ResponseEntity deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -118,17 +135,23 @@ public interface UserApi { * or Invalid username supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", produces = { "application/xml", "application/json" } ) - default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username) { + default ResponseEntity getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username + +) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -156,16 +179,23 @@ public interface UserApi { * @return successful operation (status code 200) * or Invalid username/password supplied (status code 400) */ + @ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) @RequestMapping( method = RequestMethod.GET, value = "/user/login", produces = { "application/xml", "application/json" } ) - default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password) { + default ResponseEntity loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username + +,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password + +) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -176,8 +206,10 @@ public interface UserApi { * * @return successful operation (status code 200) */ + @ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping( method = RequestMethod.GET, @@ -198,15 +230,22 @@ public interface UserApi { * @return Invalid user supplied (status code 400) * or User not found (status code 404) */ + @ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) @RequestMapping( method = RequestMethod.PUT, value = "/user/{username}" ) - default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body) { + default ResponseEntity updateUser(@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username + +, + +@ApiParam(value = "Updated user object", required = true ) @Valid @RequestBody User body) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 8c7e00956c3a..847d9f37777c 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesAnyType */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 864299cf9b28..31b7fad0c945 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesArray */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index b445c7bb0d86..5c23bc8d768e 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesBoolean */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 76a9f4e4c256..82d25ab6e747 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index 089c1edce9d8..802674f78205 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesInteger */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index f2f8fe6949b0..787a4262026a 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesNumber */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index bcca31ee32a2..271b66cf6820 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesObject */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 829ea052d3e1..08ba6bfe63ce 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * AdditionalPropertiesString */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java index 1319038cccc0..7598b6f55612 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Animal */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index aec96b23f033..bf1b74e83fca 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 63a657c8dddf..f1ced8ef71a0 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayOfNumberOnly */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java index 2a36629dfc75..81c7ab3dd785 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.model.ReadOnlyFirst; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ArrayTest */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java index c7912d432b77..1835c7bf2114 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.BigCatAllOf; import org.openapitools.model.Cat; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCat */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java index aba5eb47270c..43555f5bfed0 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * BigCatAllOf */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java index 587443bb7667..2ccf1e812e5a 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Capitalization */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java index b32ade551792..0876d9f30a0b 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.CatAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Cat */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatAllOf.java index ce9d21ae5ecb..d59a3783d0af 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * CatAllOf */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java index c79594679cf8..ef9a938298b9 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Category */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java index a462f09a9cb9..af4c74423128 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model with \"_class\" property */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java index 727896658637..298c69c03b17 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Client */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java index 229b97f2a7cb..09938cd0f5fc 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Dog */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogAllOf.java index 29b736410b76..d95ac4a329d9 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogAllOf.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * DogAllOf */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java index ec2d4e1ce8b9..beeff77d9e56 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumArrays */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java index ef4719c757f0..8f82b2f78436 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets EnumClass diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java index f9b00d90ed5b..0ce7ab0f2fa6 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.OuterEnum; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * EnumTest */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 8e4f8d5d5d9d..ea5aa826feb7 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FileSchemaTestClass */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java index 091f7d97f2b5..352d758ce6e5 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -11,9 +12,13 @@ import java.time.OffsetDateTime; import java.util.Arrays; import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * FormatTest */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index 2dd77785ad55..10e514bb1726 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * HasOnlyReadOnly */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java index 7b9a321ecb22..36754fec8c9e 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -10,9 +11,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MapTest */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index d80573256c63..8238e3227a6b 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -12,9 +13,13 @@ import java.util.Map; import java.util.UUID; import org.openapitools.model.Animal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * MixedPropertiesAndAdditionalPropertiesClass */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java index 3f2d0da5f331..3f8bdc54450d 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name starting with number */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java index 0ec7ccfe1417..99a06748ac14 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ModelApiResponse */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java index 5d0c266a148b..d9cc6193aee6 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing reserved words */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java index 3cc5bf64c066..880351d2843a 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Model for testing model name same as property name */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java index c1cafb126beb..4af42224ae53 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * NumberOnly */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java index 0c9dddf85daf..ba0b3b2e3131 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -8,9 +9,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Order */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java index 7425f5c75890..cdac99f37e41 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,9 +8,13 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * OuterComposite */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java index 6b5abc576b07..d74006b9d33e 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java @@ -1,12 +1,18 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; /** * Gets or Sets OuterEnum diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java index 5f44cab5669e..7f4aa1ef8b12 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -13,9 +14,13 @@ import java.util.Set; import org.openapitools.model.Category; import org.openapitools.model.Tag; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Pet */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 6f4a25b65efe..f872289b8da3 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * ReadOnlyFirst */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java index 16e690b5740f..31cc434cd51b 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * SpecialModelName */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java index 9306b226ea56..2d1ac94412f7 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * Tag */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefault.java index 80788f31612a..fb29f038fc6b 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderDefault */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExample.java index 963c3c66b57b..096b4ada0991 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * TypeHolderExample */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java index 4a0c635f1adb..3cadd5d4ec50 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java @@ -1,14 +1,19 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * User */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItem.java index 465b94b6a88d..62cfbcc6b285 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItem.java @@ -1,5 +1,6 @@ package org.openapitools.model; +import java.net.URI; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -9,9 +10,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; import javax.validation.Valid; import javax.validation.constraints.*; + +import java.util.*; + /** * XmlItem */