mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-08 16:40:56 +00:00
Allow Spring generated code to use new OAS 3 annotations (#9775)
* Resolve #9774 - Add in `oas3` option for Spring codegen to use newer annotations - Add `useSpringController` option for Spring codegen - Use `useSpringfox` to fix some unwanted imports for Spring codegen - Use `jdk8` to add OffsetDateTime import for models in Spring codegen - Add `JsonValue` to `enumOuterClass.mustache` to allow enums to be generated properly * Update spring examples * Update with a clean maven install and regenerate samples * Remove newling at end of param files and regenerate samples * Update codegen with merge from master * Update tests and samples * Remove #vendorParams from API * Update generated and tests * Get closer to master * Remove SpringFox setter boolean - Annotation was altered to be fully qualified, doesn't need import removed anymore * Update examples and tests * FIx pojo.mustache (missed update to master) and regenerate tests * Fix pojo.mustache extra `(` * Update tests and documentation * Update models and documentation * Handle boolean property correctly - Use `convertPropertyToBoolean` and `writePropertyBack` * Fix more @ApiParam usage with @Parameter - Also replace allowableValues with @Scheme(allowableValues = ` * Update samples * Update maven `pom.xml` mustache to use OAS3 annotations * FIx typo in variable name * Write back `useSpringfox` property
This commit is contained in:
parent
60bc508163
commit
b117d29729
@ -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|
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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<Part>{{/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<Part>{{/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}}
|
||||
|
@ -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}}
|
||||
{{#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}}
|
@ -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}}
|
||||
{{#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}}
|
@ -1,5 +1,6 @@
|
||||
{{#jackson}}
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
{{/jackson}}
|
||||
|
||||
/**
|
||||
|
@ -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<Part>{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{baseName}}{{/isFile}}{{/isFormParam}}
|
||||
{{#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<Part>{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{baseName}}{{/isFile}}{{/isFormParam}}
|
@ -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}}
|
||||
{{#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}}
|
||||
|
@ -114,11 +114,20 @@
|
||||
<artifactId>swagger-ui</artifactId>
|
||||
<version>3.14.2</version>
|
||||
</dependency>
|
||||
{{#oas3}}
|
||||
<dependency>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>2.1.2</version>
|
||||
</dependency>
|
||||
{{/oas3}}
|
||||
{{^oas3}}
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>1.5.14</version>
|
||||
</dependency>
|
||||
{{/oas3}}
|
||||
<!-- @Nullable annotation -->
|
||||
<dependency>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
|
@ -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<Part>{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{paramName}}{{/isFile}}{{/isFormParam}}
|
||||
{{#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<Part>{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{paramName}}{{/isFile}}{{/isFormParam}}
|
@ -44,6 +44,14 @@
|
||||
|
||||
{{/parentOverridden}}
|
||||
<dependencies>
|
||||
{{#oas3}}
|
||||
<dependency>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>2.1.2</version>
|
||||
</dependency>
|
||||
{{/oas3}}
|
||||
{{^oas3}}
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
@ -51,6 +59,7 @@
|
||||
<version>${swagger-core-version}</version>
|
||||
{{/parentOverridden}}
|
||||
</dependency>
|
||||
{{/oas3}}
|
||||
<!-- @Nullable annotation -->
|
||||
<dependency>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
|
@ -183,11 +183,20 @@
|
||||
<artifactId>swagger-ui</artifactId>
|
||||
<version>3.14.2</version>
|
||||
</dependency>
|
||||
{{#oas3}}
|
||||
<dependency>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>2.1.2</version>
|
||||
</dependency>
|
||||
{{/oas3}}
|
||||
{{^oas3}}
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>1.5.14</version>
|
||||
</dependency>
|
||||
{{/oas3}}
|
||||
<!-- @Nullable annotation -->
|
||||
<dependency>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
|
@ -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}}
|
||||
|
@ -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}}
|
||||
{{#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}}
|
||||
|
@ -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}};
|
||||
}
|
||||
|
@ -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}}
|
||||
{{#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}}
|
@ -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<ResponseEntity<Void>> addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body);
|
||||
CompletableFuture<ResponseEntity<Void>> 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<ResponseEntity<Void>> deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey);
|
||||
CompletableFuture<ResponseEntity<Void>> 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<ResponseEntity<List<Pet>>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List<String> status);
|
||||
CompletableFuture<ResponseEntity<List<Pet>>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
@ -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<ResponseEntity<List<Pet>>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags);
|
||||
CompletableFuture<ResponseEntity<List<Pet>>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> 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<ResponseEntity<Pet>> getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId);
|
||||
CompletableFuture<ResponseEntity<Pet>> 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<ResponseEntity<Void>> updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body);
|
||||
CompletableFuture<ResponseEntity<Void>> 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<ResponseEntity<Void>> 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<ResponseEntity<Void>> 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<ResponseEntity<ModelApiResponse>> 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<ResponseEntity<ModelApiResponse>> 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);
|
||||
|
||||
}
|
||||
|
@ -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<ResponseEntity<Void>> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId);
|
||||
CompletableFuture<ResponseEntity<Void>> 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<ResponseEntity<Order>> getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId);
|
||||
CompletableFuture<ResponseEntity<Order>> 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<ResponseEntity<Order>> placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body);
|
||||
CompletableFuture<ResponseEntity<Order>> placeOrder(
|
||||
|
||||
@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body);
|
||||
|
||||
}
|
||||
|
@ -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<ResponseEntity<Void>> createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body);
|
||||
CompletableFuture<ResponseEntity<Void>> 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<ResponseEntity<Void>> createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<User> body);
|
||||
CompletableFuture<ResponseEntity<Void>> createUsersWithArrayInput(
|
||||
|
||||
@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List<User> 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<ResponseEntity<Void>> createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<User> body);
|
||||
CompletableFuture<ResponseEntity<Void>> createUsersWithListInput(
|
||||
|
||||
@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List<User> 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<ResponseEntity<Void>> deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username);
|
||||
CompletableFuture<ResponseEntity<Void>> 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<ResponseEntity<User>> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username);
|
||||
CompletableFuture<ResponseEntity<User>> 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<ResponseEntity<String>> 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<ResponseEntity<String>> 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<ResponseEntity<Void>> 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<ResponseEntity<Void>> 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);
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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<ResponseEntity<Void>> 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<ResponseEntity<Void>> 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<ResponseEntity<List<Pet>>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List<String> status);
|
||||
|
||||
|
||||
/**
|
||||
* 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<ResponseEntity<List<Pet>>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> 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<ResponseEntity<Pet>> 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<ResponseEntity<Void>> 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<ResponseEntity<Void>> 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<ResponseEntity<ModelApiResponse>> 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);
|
||||
|
||||
}
|
@ -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<ResponseEntity<Void>> 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<ResponseEntity<Map<String, Integer>>> 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<ResponseEntity<Order>> 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<ResponseEntity<Order>> placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body);
|
||||
|
||||
}
|
@ -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<ResponseEntity<Void>> 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<ResponseEntity<Void>> createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List<User> 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<ResponseEntity<Void>> createUsersWithListInput(@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List<User> 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<ResponseEntity<Void>> 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<ResponseEntity<User>> 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<ResponseEntity<String>> 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<ResponseEntity<Void>> 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<ResponseEntity<Void>> 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);
|
||||
|
||||
}
|
@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@ -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<String> photoUrls = new ArrayList<>();
|
||||
|
||||
@JsonProperty("tags")
|
||||
@Valid
|
||||
private List<Tag> 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<String> 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<String> getPhotoUrls() {
|
||||
return photoUrls;
|
||||
}
|
||||
|
||||
public void setPhotoUrls(List<String> photoUrls) {
|
||||
this.photoUrls = photoUrls;
|
||||
}
|
||||
|
||||
public Pet tags(List<Tag> 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<Tag> getTags() {
|
||||
return tags;
|
||||
}
|
||||
|
||||
public void setTags(List<Tag> 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 ");
|
||||
}
|
||||
}
|
||||
|
@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@ -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<Void> addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body);
|
||||
ResponseEntity<Void> 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<Void> deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey);
|
||||
ResponseEntity<Void> 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<List<Pet>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List<String> status, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable);
|
||||
ResponseEntity<List<Pet>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
|
||||
, @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<List<Pet>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable);
|
||||
ResponseEntity<List<Pet>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags
|
||||
|
||||
, @springfox.documentation.annotations.ApiIgnore final org.springframework.data.domain.Pageable pageable);
|
||||
|
||||
|
||||
/**
|
||||
@ -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<Pet> getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId);
|
||||
ResponseEntity<Pet> 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<Void> updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body);
|
||||
ResponseEntity<Void> 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<Void> 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<Void> 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<ModelApiResponse> 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<ModelApiResponse> 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);
|
||||
|
||||
}
|
||||
|
@ -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<Void> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId);
|
||||
ResponseEntity<Void> 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<Order> getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId);
|
||||
ResponseEntity<Order> 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<Order> placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body);
|
||||
ResponseEntity<Order> placeOrder(
|
||||
|
||||
@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order body);
|
||||
|
||||
}
|
||||
|
@ -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<Void> createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body);
|
||||
ResponseEntity<Void> 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<Void> createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<User> body);
|
||||
ResponseEntity<Void> createUsersWithArrayInput(
|
||||
|
||||
@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List<User> 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<Void> createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<User> body);
|
||||
ResponseEntity<Void> createUsersWithListInput(
|
||||
|
||||
@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List<User> 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<Void> deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username);
|
||||
ResponseEntity<Void> 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<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username);
|
||||
ResponseEntity<User> 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<String> 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<String> 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<Void> 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<Void> 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);
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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<Pet> addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet);
|
||||
ResponseEntity<Pet> 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<Void> deletePet(@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey);
|
||||
ResponseEntity<Void> 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<List<Pet>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List<String> status);
|
||||
ResponseEntity<List<Pet>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
@ -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<List<Pet>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags);
|
||||
ResponseEntity<List<Pet>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> 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<Pet> getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId);
|
||||
ResponseEntity<Pet> 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<Pet> updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet);
|
||||
ResponseEntity<Pet> 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<Void> 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<Void> 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<ModelApiResponse> 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<ModelApiResponse> 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);
|
||||
|
||||
}
|
||||
|
@ -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<Void> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId);
|
||||
ResponseEntity<Void> 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<Order> getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId);
|
||||
ResponseEntity<Order> 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<Order> placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order);
|
||||
ResponseEntity<Order> placeOrder(
|
||||
|
||||
@ApiParam(value = "order placed for purchasing the pet", required = true ) @Valid @RequestBody Order order);
|
||||
|
||||
}
|
||||
|
@ -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<Void> createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user);
|
||||
ResponseEntity<Void> 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<Void> createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<User> user);
|
||||
ResponseEntity<Void> createUsersWithArrayInput(
|
||||
|
||||
@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List<User> 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<Void> createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<User> user);
|
||||
ResponseEntity<Void> createUsersWithListInput(
|
||||
|
||||
@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List<User> 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<Void> deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username);
|
||||
ResponseEntity<Void> 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<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username);
|
||||
ResponseEntity<User> 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<String> 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<String> 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<Void> 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<Void> 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);
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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<Void> addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) {
|
||||
default ResponseEntity<Void> 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<Void> 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<Void> 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<List<Pet>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List<String> status) {
|
||||
default ResponseEntity<List<Pet>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
|
||||
) {
|
||||
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<List<Pet>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags) {
|
||||
default ResponseEntity<List<Pet>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> 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<Pet> getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId) {
|
||||
default ResponseEntity<Pet> 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<Void> updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) {
|
||||
default ResponseEntity<Void> 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<Void> 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<Void> 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<ModelApiResponse> 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<ModelApiResponse> 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"))) {
|
||||
|
@ -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<Void> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId) {
|
||||
default ResponseEntity<Void> 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<Order> getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId) {
|
||||
default ResponseEntity<Order> 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<Order> placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body) {
|
||||
default ResponseEntity<Order> 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"))) {
|
||||
|
@ -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<Void> createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body) {
|
||||
default ResponseEntity<Void> 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<Void> createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<User> body) {
|
||||
default ResponseEntity<Void> createUsersWithArrayInput(
|
||||
|
||||
@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List<User> 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<Void> createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<User> body) {
|
||||
default ResponseEntity<Void> createUsersWithListInput(
|
||||
|
||||
@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List<User> 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<Void> deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username) {
|
||||
default ResponseEntity<Void> 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<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username) {
|
||||
default ResponseEntity<User> 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<String> 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<String> 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<Void> 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<Void> 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);
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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<TestResponse> 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<TestResponse> 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"))) {
|
||||
|
@ -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<TestResponse> 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<TestResponse> 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"))) {
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -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<ResponseEntity<Client>> call123testSpecialTags(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) {
|
||||
default CompletableFuture<ResponseEntity<Client>> 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"))) {
|
||||
|
@ -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<ResponseEntity<Void>> createXmlItem(@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem) {
|
||||
default CompletableFuture<ResponseEntity<Void>> 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<ResponseEntity<Boolean>> fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body) {
|
||||
default CompletableFuture<ResponseEntity<Boolean>> 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<ResponseEntity<OuterComposite>> fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body) {
|
||||
default CompletableFuture<ResponseEntity<OuterComposite>> 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<ResponseEntity<BigDecimal>> fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body) {
|
||||
default CompletableFuture<ResponseEntity<BigDecimal>> 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<ResponseEntity<String>> fakeOuterStringSerialize(@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body) {
|
||||
default CompletableFuture<ResponseEntity<String>> 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<ResponseEntity<Void>> testBodyWithFileSchema(@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body) {
|
||||
default CompletableFuture<ResponseEntity<Void>> 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<ResponseEntity<Void>> testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "", required = true) @Valid @RequestBody User body) {
|
||||
default CompletableFuture<ResponseEntity<Void>> 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<ResponseEntity<Client>> testClientModel(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) {
|
||||
default CompletableFuture<ResponseEntity<Client>> 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<ResponseEntity<Void>> 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<ResponseEntity<Void>> 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<ResponseEntity<Void>> testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List<String> 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<String> 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<String> 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<ResponseEntity<Void>> testEnumParameters(
|
||||
@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List<String> 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<String> 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<String> 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<ResponseEntity<Void>> 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<ResponseEntity<Void>> 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<ResponseEntity<Void>> testInlineAdditionalProperties(@ApiParam(value = "request body", required = true) @Valid @RequestBody Map<String, String> param) {
|
||||
default CompletableFuture<ResponseEntity<Void>> testInlineAdditionalProperties(
|
||||
|
||||
@ApiParam(value = "request body", required = true ) @Valid @RequestBody Map<String, String> 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<ResponseEntity<Void>> 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<ResponseEntity<Void>> 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<ResponseEntity<Void>> testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context) {
|
||||
default CompletableFuture<ResponseEntity<Void>> testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe
|
||||
|
||||
,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil
|
||||
|
||||
,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http
|
||||
|
||||
,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url
|
||||
|
||||
,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> 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<ResponseEntity<ModelApiResponse>> 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<ResponseEntity<ModelApiResponse>> 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"))) {
|
||||
|
@ -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<ResponseEntity<Client>> testClassname(@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body) {
|
||||
default CompletableFuture<ResponseEntity<Client>> 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"))) {
|
||||
|
@ -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<ResponseEntity<Void>> addPet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) {
|
||||
default CompletableFuture<ResponseEntity<Void>> 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<ResponseEntity<Void>> 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<ResponseEntity<Void>> 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<ResponseEntity<List<Pet>>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List<String> status) {
|
||||
default CompletableFuture<ResponseEntity<List<Pet>>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
|
||||
) {
|
||||
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<ResponseEntity<Set<Pet>>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags) {
|
||||
default CompletableFuture<ResponseEntity<Set<Pet>>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> 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<ResponseEntity<Pet>> getPetById(@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId) {
|
||||
default CompletableFuture<ResponseEntity<Pet>> 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<ResponseEntity<Void>> updatePet(@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body) {
|
||||
default CompletableFuture<ResponseEntity<Void>> 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<ResponseEntity<Void>> 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<ResponseEntity<Void>> 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<ResponseEntity<ModelApiResponse>> 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<ResponseEntity<ModelApiResponse>> 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"))) {
|
||||
|
@ -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<ResponseEntity<Void>> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId) {
|
||||
default CompletableFuture<ResponseEntity<Void>> 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<ResponseEntity<Order>> getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId) {
|
||||
default CompletableFuture<ResponseEntity<Order>> 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<ResponseEntity<Order>> placeOrder(@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body) {
|
||||
default CompletableFuture<ResponseEntity<Order>> 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"))) {
|
||||
|
@ -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<ResponseEntity<Void>> createUser(@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body) {
|
||||
default CompletableFuture<ResponseEntity<Void>> 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<ResponseEntity<Void>> createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<User> body) {
|
||||
default CompletableFuture<ResponseEntity<Void>> createUsersWithArrayInput(
|
||||
|
||||
@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List<User> 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<ResponseEntity<Void>> createUsersWithListInput(@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<User> body) {
|
||||
default CompletableFuture<ResponseEntity<Void>> createUsersWithListInput(
|
||||
|
||||
@ApiParam(value = "List of user object", required = true ) @Valid @RequestBody List<User> 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<ResponseEntity<Void>> deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username) {
|
||||
default CompletableFuture<ResponseEntity<Void>> 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<ResponseEntity<User>> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username) {
|
||||
default CompletableFuture<ResponseEntity<User>> 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<ResponseEntity<String>> 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<ResponseEntity<String>> 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<ResponseEntity<Void>> 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<ResponseEntity<Void>> 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));
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -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
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
*/
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user