mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-10-13 16:03:43 +00:00
[cxf] add support for Swagger2 (#22010)
* [cxf] add support for Swagger2 Closes #3668 * regen samples * regen docs * unconditionally include parameter imports * Add swagger2 update samples --------- Co-authored-by: Jens Kleine-Herzbruch <jensgr@gmx.net>
This commit is contained in:
parent
75804e4e31
commit
f02acaf27e
@ -22,6 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|annotationLibrary|Select the complementary documentation annotation library.|<dl><dt>**none**</dt><dd>Do not annotate Model and Api with complementary annotations.</dd><dt>**swagger1**</dt><dd>Annotate Model and Api using the Swagger Annotations 1.x library.</dd><dt>**swagger2**</dt><dd>Annotate Model and Api using the Swagger Annotations 2.x library.</dd></dl>|swagger1|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-client|
|
||||
@ -39,6 +40,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|documentationProvider|Select the OpenAPI documentation provider.|<dl><dt>**none**</dt><dd>Do not publish an OpenAPI specification.</dd><dt>**swagger1**</dt><dd>Generate an OpenAPI 2 (fka Swagger RESTful API Documentation Specification) specification using Swagger-Core 1.x.</dd><dt>**swagger2**</dt><dd>Generate an OpenAPI 3 specification using Swagger-Core 2.x.</dd></dl>|swagger1|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE', 'legacy' and 'original'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|
@ -23,6 +23,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|annotationLibrary|Select the complementary documentation annotation library.|<dl><dt>**none**</dt><dd>Do not annotate Model and Api with complementary annotations.</dd><dt>**swagger1**</dt><dd>Annotate Model and Api using the Swagger Annotations 1.x library.</dd><dt>**swagger2**</dt><dd>Annotate Model and Api using the Swagger Annotations 2.x library.</dd></dl>|swagger1|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-cxf-server|
|
||||
@ -40,6 +41,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|documentationProvider|Select the OpenAPI documentation provider.|<dl><dt>**none**</dt><dd>Do not publish an OpenAPI specification.</dd><dt>**swagger1**</dt><dd>Generate an OpenAPI 2 (fka Swagger RESTful API Documentation Specification) specification using Swagger-Core 1.x.</dd><dt>**swagger2**</dt><dd>Generate an OpenAPI 3 specification using Swagger-Core 2.x.</dd></dl>|swagger1|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE', 'legacy' and 'original'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|
@ -23,6 +23,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
|
||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
||||
|annotationLibrary|Select the complementary documentation annotation library.|<dl><dt>**none**</dt><dd>Do not annotate Model and Api with complementary annotations.</dd><dt>**swagger1**</dt><dd>Annotate Model and Api using the Swagger Annotations 1.x library.</dd><dt>**swagger2**</dt><dd>Annotate Model and Api using the Swagger Annotations 2.x library.</dd></dl>|swagger1|
|
||||
|apiPackage|package for generated api classes| |org.openapitools.api|
|
||||
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|
|
||||
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-cxf-server|
|
||||
@ -40,6 +41,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|documentationProvider|Select the OpenAPI documentation provider.|<dl><dt>**none**</dt><dd>Do not publish an OpenAPI specification.</dd><dt>**swagger1**</dt><dd>Generate an OpenAPI 2 (fka Swagger RESTful API Documentation Specification) specification using Swagger-Core 1.x.</dd><dt>**swagger2**</dt><dd>Generate an OpenAPI 3 specification using Swagger-Core 2.x.</dd></dl>|swagger1|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'MACRO_CASE', 'legacy' and 'original'| |MACRO_CASE|
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|
@ -18,6 +18,7 @@
|
||||
package org.openapitools.codegen.languages;
|
||||
|
||||
import io.swagger.v3.oas.models.Operation;
|
||||
import io.swagger.v3.oas.models.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.openapitools.codegen.*;
|
||||
@ -115,6 +116,20 @@ public class JavaCXFClientCodegen extends AbstractJavaCodegen
|
||||
return "jaxrs-cxf-client";
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DocumentationProvider> supportedDocumentationProvider() {
|
||||
return List.of(DocumentationProvider.NONE, DocumentationProvider.SWAGGER1, DocumentationProvider.SWAGGER2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AnnotationLibrary> supportedAnnotationLibraries() {
|
||||
return List.of(AnnotationLibrary.NONE, AnnotationLibrary.SWAGGER1, AnnotationLibrary.SWAGGER2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DocumentationProvider defaultDocumentationProvider() {
|
||||
return DocumentationProvider.SWAGGER1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CodegenType getTag() {
|
||||
@ -127,11 +142,19 @@ public class JavaCXFClientCodegen extends AbstractJavaCodegen
|
||||
co.subresourceOperation = !co.path.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CodegenModel fromModel(String name, Schema model) {
|
||||
CodegenModel m = super.fromModel(name, model);
|
||||
m.imports.remove("ApiModel");
|
||||
return m;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postProcessModelProperty(CodegenModel model, CodegenProperty property) {
|
||||
super.postProcessModelProperty(model, property);
|
||||
model.imports.remove("ApiModelProperty");
|
||||
model.imports.remove("ApiModel");
|
||||
model.imports.remove("JsonTypeName");
|
||||
|
||||
if (jackson) {
|
||||
//Add jackson imports when model has inner enum
|
||||
|
@ -18,6 +18,7 @@
|
||||
package org.openapitools.codegen.languages;
|
||||
|
||||
import lombok.Setter;
|
||||
import io.swagger.v3.oas.models.media.Schema;
|
||||
import org.openapitools.codegen.*;
|
||||
import org.openapitools.codegen.languages.features.CXFServerFeatures;
|
||||
import org.openapitools.codegen.languages.features.GzipTestFeatures;
|
||||
@ -222,12 +223,35 @@ public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen
|
||||
return "jaxrs-cxf";
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DocumentationProvider> supportedDocumentationProvider() {
|
||||
return List.of(DocumentationProvider.NONE, DocumentationProvider.SWAGGER1, DocumentationProvider.SWAGGER2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AnnotationLibrary> supportedAnnotationLibraries() {
|
||||
return List.of(AnnotationLibrary.NONE, AnnotationLibrary.SWAGGER1, AnnotationLibrary.SWAGGER2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DocumentationProvider defaultDocumentationProvider() {
|
||||
return DocumentationProvider.SWAGGER1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CodegenModel fromModel(String name, Schema model) {
|
||||
CodegenModel m = super.fromModel(name, model);
|
||||
m.imports.remove("ApiModel");
|
||||
return m;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postProcessModelProperty(CodegenModel model, CodegenProperty property) {
|
||||
super.postProcessModelProperty(model, property);
|
||||
model.imports.remove("ApiModelProperty");
|
||||
model.imports.remove("ApiModel");
|
||||
model.imports.remove("JsonFormat");
|
||||
model.imports.remove("JsonTypeName");
|
||||
|
||||
//Add imports for Jackson when model has inner enum
|
||||
if (isJackson()) {
|
||||
|
@ -3,20 +3,40 @@ package {{package}};
|
||||
{{#imports}}import {{import}};
|
||||
{{/imports}}
|
||||
|
||||
{{#useAbstractionForFiles}}
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
{{/useAbstractionForFiles}}
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import {{javaxPackage}}.ws.rs.*;
|
||||
{{#useGenericResponse}}
|
||||
import {{javaxPackage}}.ws.rs.core.Response;
|
||||
{{/useGenericResponse}}
|
||||
{{#addConsumesProducesJson}}
|
||||
import {{javaxPackage}}.ws.rs.core.MediaType;
|
||||
{{/addConsumesProducesJson}}
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
{{#swagger1AnnotationLibrary}}
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.jaxrs.PATCH;
|
||||
{{/swagger1AnnotationLibrary}}
|
||||
{{#swagger2AnnotationLibrary}}
|
||||
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import io.swagger.v3.oas.annotations.info.Info;
|
||||
import io.swagger.v3.oas.annotations.media.ArraySchema;
|
||||
import io.swagger.v3.oas.annotations.media.Content;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||
{{/swagger2AnnotationLibrary}}
|
||||
{{#useBeanValidation}}
|
||||
import {{javaxPackage}}.validation.constraints.*;
|
||||
import {{javaxPackage}}.validation.Valid;
|
||||
@ -33,7 +53,18 @@ import {{javaxPackage}}.validation.Valid;
|
||||
*/
|
||||
{{/appName}}
|
||||
@Path("{{#useAnnotatedBasePath}}{{contextPath}}{{/useAnnotatedBasePath}}{{commonPath}}")
|
||||
{{#swagger1AnnotationLibrary}}
|
||||
@Api(value = "/", description = "{{description}}")
|
||||
{{/swagger1AnnotationLibrary}}
|
||||
{{#swagger2AnnotationLibrary}}
|
||||
@OpenAPIDefinition(
|
||||
info = @Info(
|
||||
{{#appName}}title = "{{{appName}}}",{{/appName}}
|
||||
{{#appDescription}}description = "{{{appDescription}}}",{{/appDescription}}
|
||||
version = "{{{appVersion}}}"
|
||||
)
|
||||
)
|
||||
{{/swagger2AnnotationLibrary}}
|
||||
{{#addConsumesProducesJson}}
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@ -60,6 +91,7 @@ public interface {{classname}} {
|
||||
{{#hasProduces}}
|
||||
@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} })
|
||||
{{/hasProduces}}
|
||||
{{#swagger1AnnotationLibrary}}
|
||||
@ApiOperation(value = "{{{summary}}}", tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} })
|
||||
{{#implicitHeadersParams.0}}
|
||||
@io.swagger.annotations.ApiImplicitParams({
|
||||
@ -70,6 +102,19 @@ public interface {{classname}} {
|
||||
{{/implicitHeadersParams.0}}
|
||||
@ApiResponses(value = { {{#responses}}
|
||||
@ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{^vendorExtensions.x-java-is-response-void}}, response = {{#isFile}}{{#useAbstractionForFiles}}InputStream{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{baseType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{baseType}}}{{/isFile}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}{{/vendorExtensions.x-java-is-response-void}}){{^-last}},{{/-last}}{{/responses}} })
|
||||
{{/swagger1AnnotationLibrary}}
|
||||
{{#swagger2AnnotationLibrary}}
|
||||
@Operation(operationId = "{{{operationIdOriginal}}}"{{#summary}}, summary = "{{{.}}}"{{/summary}}, {{#isDeprecated}}deprecated = true, {{/isDeprecated}} tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} })
|
||||
@ApiResponses(value = { {{#responses}}
|
||||
@ApiResponse(responseCode = "{{{code}}}", description = "{{{message}}}"{{^vendorExtensions.x-java-is-response-void}}, content = @Content({{#containerType}}array = @ArraySchema({{/containerType}}schema = @Schema(implementation = {{#isFile}}{{#useAbstractionForFiles}}InputStream{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{baseType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{baseType}}}{{/isFile}}.class){{#containerType}}){{/containerType}}){{/vendorExtensions.x-java-is-response-void}}){{^-last}},{{/-last}}{{/responses}} })
|
||||
{{#implicitHeadersParams.0}}
|
||||
@Parameters({
|
||||
{{#implicitHeadersParams}}
|
||||
{{>paramDoc}}{{^-last}},{{/-last}}
|
||||
{{/implicitHeadersParams}}
|
||||
})
|
||||
{{/implicitHeadersParams.0}}
|
||||
{{/swagger2AnnotationLibrary}}
|
||||
public {{>returnTypes}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}});
|
||||
{{/operation}}
|
||||
}
|
||||
|
@ -15,7 +15,6 @@ import org.apache.cxf.jaxrs.model.wadl.DocTarget;
|
||||
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
{{#useSpringAnnotationConfig}}
|
||||
import org.springframework.stereotype.Service;
|
||||
{{/useSpringAnnotationConfig}}
|
||||
|
1
modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/paramDoc.mustache
vendored
Normal file
1
modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/paramDoc.mustache
vendored
Normal file
@ -0,0 +1 @@
|
||||
@Parameter(name = "{{{baseName}}}"{{#isDeprecated}}, deprecated = true{{/isDeprecated}}, description = "{{{description}}}"{{#required}}, required = true{{/required}}{{#isPathParam}}, in = ParameterIn.PATH{{/isPathParam}}{{#isQueryParam}}, in = ParameterIn.QUERY{{/isQueryParam}}{{#isCookieParam}}, in = ParameterIn.COOKIE{{/isCookieParam}}{{#isHeaderParam}}, in = ParameterIn.HEADER{{/isHeaderParam}})
|
@ -1,4 +1,12 @@
|
||||
{{#swagger1AnnotationLibrary}}
|
||||
{{#description}}
|
||||
import io.swagger.annotations.ApiModel;
|
||||
{{/description}}
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
{{/swagger1AnnotationLibrary}}
|
||||
{{#swagger2AnnotationLibrary}}
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
{{/swagger2AnnotationLibrary}}
|
||||
import java.util.Objects;
|
||||
{{#withXml}}
|
||||
import {{javaxPackage}}.xml.bind.annotation.XmlElement;
|
||||
@ -13,9 +21,14 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
{{#description}}
|
||||
/**
|
||||
* {{{description}}}
|
||||
**/
|
||||
* {{{description}}}
|
||||
*/
|
||||
{{#swagger1AnnotationLibrary}}
|
||||
@ApiModel(description="{{{description}}}")
|
||||
{{/swagger1AnnotationLibrary}}
|
||||
{{#swagger2AnnotationLibrary}}
|
||||
@Schema(description="{{{description}}}")
|
||||
{{/swagger2AnnotationLibrary}}
|
||||
{{/description}}
|
||||
{{>additionalModelTypeAnnotations}}{{>xmlPojoAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}
|
||||
{{#vendorExtensions.x-class-extra-annotation}}
|
||||
@ -25,16 +38,23 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensi
|
||||
{{#vars}}{{#isEnum}}{{^isContainer}}
|
||||
{{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}}
|
||||
{{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}}
|
||||
{{#description}}
|
||||
/**
|
||||
* {{{.}}}
|
||||
*/
|
||||
{{/description}}
|
||||
{{#withXml}}
|
||||
@XmlElement(name="{{baseName}}"{{#required}}, required = {{required}}{{/required}})
|
||||
{{/withXml}}
|
||||
@ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}"){{^isPrimitiveType}}{{^isDate}}{{^isDateTime}}{{^isString}}{{^isFile}}{{#useBeanValidation}}
|
||||
@Valid{{/useBeanValidation}}{{/isFile}}{{/isString}}{{/isDateTime}}{{/isDate}}{{/isPrimitiveType}}
|
||||
{{#description}}
|
||||
/**
|
||||
* {{{.}}}
|
||||
**/
|
||||
{{/description}}
|
||||
{{#swagger1AnnotationLibrary}}
|
||||
@ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
|
||||
{{/swagger1AnnotationLibrary}}
|
||||
{{#swagger2AnnotationLibrary}}
|
||||
@Schema(description = "{{{description}}}"{{#example}}, example = "{{{example}}}"{{/example}}{{#required}}, requiredMode = Schema.RequiredMode.REQUIRED{{/required}})
|
||||
{{/swagger2AnnotationLibrary}}
|
||||
{{^isPrimitiveType}}{{^isDate}}{{^isDateTime}}{{^isString}}{{^isFile}}{{#useBeanValidation}}
|
||||
@Valid
|
||||
{{/useBeanValidation}}{{/isFile}}{{/isString}}{{/isDateTime}}{{/isDate}}{{/isPrimitiveType}}
|
||||
{{#vendorExtensions.x-field-extra-annotation}}
|
||||
{{{vendorExtensions.x-field-extra-annotation}}}
|
||||
{{/vendorExtensions.x-field-extra-annotation}}
|
||||
|
@ -111,6 +111,7 @@
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<dependencies>
|
||||
{{#swagger1AnnotationLibrary}}
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-jaxrs</artifactId>
|
||||
@ -125,6 +126,14 @@ for this project used jakarta.validation-api -->
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
{{/swagger1AnnotationLibrary}}
|
||||
{{#swagger2AnnotationLibrary}}
|
||||
<dependency>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>${swagger-annotations-version}</version>
|
||||
</dependency>
|
||||
{{/swagger2AnnotationLibrary}}
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
@ -238,7 +247,12 @@ for this project used jakarta.validation-api -->
|
||||
<java.version>1.8</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<swagger-core-version>1.5.18</swagger-core-version>
|
||||
{{#swagger1AnnotationLibrary}}
|
||||
<swagger-core-version>1.6.6</swagger-core-version>
|
||||
{{/swagger1AnnotationLibrary}}
|
||||
{{#swagger2AnnotationLibrary}}
|
||||
<swagger-annotations-version>2.2.7</swagger-annotations-version>
|
||||
{{/swagger2AnnotationLibrary}}
|
||||
<jetty-version>9.2.9.v20150224</jetty-version>
|
||||
<junit-version>4.13.2</junit-version>
|
||||
<logback-version>1.5.13</logback-version>
|
||||
|
@ -34,6 +34,7 @@
|
||||
{{/useSpringAnnotationConfig}}
|
||||
|
||||
{{#useSwaggerFeature}}
|
||||
{{#swagger1AnnotationLibrary}}
|
||||
<!-- CXF Swagger2Feature -->
|
||||
{{! http://cxf.apache.org/docs/swagger2feature.html }}
|
||||
<bean id="swagger2Feature" class="org.apache.cxf.jaxrs.swagger.Swagger2Feature">
|
||||
@ -48,6 +49,7 @@
|
||||
<property name="license" value="${swagger.license}" />
|
||||
<property name="licenseUrl" value="${swagger.licenseUrl}" /-->
|
||||
</bean>
|
||||
{{/swagger1AnnotationLibrary}}
|
||||
{{/useSwaggerFeature}}
|
||||
|
||||
<cxf:bus>
|
||||
|
@ -120,6 +120,7 @@
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<dependencies>
|
||||
{{#swagger1AnnotationLibrary}}
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-jaxrs</artifactId>
|
||||
@ -134,6 +135,14 @@ for this project used jakarta.validation-api -->
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
{{/swagger1AnnotationLibrary}}
|
||||
{{#swagger2AnnotationLibrary}}
|
||||
<dependency>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>${swagger-annotations-version}</version>
|
||||
</dependency>
|
||||
{{/swagger2AnnotationLibrary}}
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
@ -184,7 +193,12 @@ for this project used jakarta.validation-api -->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
{{#swagger1AnnotationLibrary}}
|
||||
<artifactId>cxf-rt-rs-service-description-swagger</artifactId>
|
||||
{{/swagger1AnnotationLibrary}}
|
||||
{{#swagger2AnnotationLibrary}}
|
||||
<artifactId>cxf-rt-rs-service-description-openapi-v3</artifactId>
|
||||
{{/swagger2AnnotationLibrary}}
|
||||
<version>${cxf-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
@ -289,7 +303,12 @@ for this project used jakarta.validation-api -->
|
||||
<java.version>1.8</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<swagger-core-version>1.5.22</swagger-core-version>
|
||||
{{#swagger1AnnotationLibrary}}
|
||||
<swagger-core-version>1.6.6</swagger-core-version>
|
||||
{{/swagger1AnnotationLibrary}}
|
||||
{{#swagger2AnnotationLibrary}}
|
||||
<swagger-annotations-version>2.2.7</swagger-annotations-version>
|
||||
{{/swagger2AnnotationLibrary}}
|
||||
<jetty-version>9.2.9.v20150224</jetty-version>
|
||||
<junit-version>4.13.2</junit-version>
|
||||
<logback-version>1.5.13</logback-version>
|
||||
|
@ -194,7 +194,7 @@ for this project used jakarta.validation-api -->
|
||||
<java.version>1.8</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<swagger-core-version>1.5.18</swagger-core-version>
|
||||
<swagger-core-version>1.6.6</swagger-core-version>
|
||||
<jetty-version>9.2.9.v20150224</jetty-version>
|
||||
<junit-version>4.13.2</junit-version>
|
||||
<logback-version>1.5.13</logback-version>
|
||||
|
@ -4,13 +4,9 @@ import java.io.File;
|
||||
import org.openapitools.model.ModelApiResponse;
|
||||
import org.openapitools.model.Pet;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -2,13 +2,9 @@ package org.openapitools.api;
|
||||
|
||||
import org.openapitools.model.Order;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -3,13 +3,9 @@ package org.openapitools.api;
|
||||
import java.util.Date;
|
||||
import org.openapitools.model.User;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -1,22 +1,24 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* A category for a pet
|
||||
**/
|
||||
* A category for a pet
|
||||
*/
|
||||
@ApiModel(description="A category for a pet")
|
||||
|
||||
public class Category {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String name;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -1,26 +1,29 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* Describes the result of uploading an image resource
|
||||
**/
|
||||
* Describes the result of uploading an image resource
|
||||
*/
|
||||
@ApiModel(description="Describes the result of uploading an image resource")
|
||||
|
||||
public class ModelApiResponse {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Integer code;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String message;
|
||||
/**
|
||||
* Get code
|
||||
|
@ -2,30 +2,34 @@ package org.openapitools.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* An order for a pets from the pet store
|
||||
**/
|
||||
* An order for a pets from the pet store
|
||||
*/
|
||||
@ApiModel(description="An order for a pets from the pet store")
|
||||
|
||||
public class Order {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long petId;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Integer quantity;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Date shipDate;
|
||||
|
||||
public enum StatusEnum {
|
||||
@ -60,13 +64,15 @@ PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERE
|
||||
}
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "Order Status")
|
||||
/**
|
||||
* Order Status
|
||||
**/
|
||||
* Order Status
|
||||
*/
|
||||
@ApiModelProperty(value = "Order Status")
|
||||
|
||||
private StatusEnum status;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Boolean complete = false;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -2,37 +2,42 @@ package org.openapitools.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.openapitools.model.Category;
|
||||
import org.openapitools.model.Tag;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
**/
|
||||
* A pet for sale in the pet store
|
||||
*/
|
||||
@ApiModel(description="A pet for sale in the pet store")
|
||||
|
||||
public class Pet {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Category category;
|
||||
|
||||
@ApiModelProperty(example = "doggie", required = true, value = "")
|
||||
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
private List<String> photoUrls = new ArrayList<>();
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private List<Tag> tags = new ArrayList<>();
|
||||
|
||||
public enum StatusEnum {
|
||||
@ -67,10 +72,11 @@ AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD
|
||||
}
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "pet status in the store")
|
||||
/**
|
||||
* pet status in the store
|
||||
**/
|
||||
* pet status in the store
|
||||
*/
|
||||
@ApiModelProperty(value = "pet status in the store")
|
||||
|
||||
private StatusEnum status;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -1,22 +1,24 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* A tag for a pet
|
||||
**/
|
||||
* A tag for a pet
|
||||
*/
|
||||
@ApiModel(description="A tag for a pet")
|
||||
|
||||
public class Tag {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String name;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -1,43 +1,51 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* A User who is purchasing from the pet store
|
||||
**/
|
||||
* A User who is purchasing from the pet store
|
||||
*/
|
||||
@ApiModel(description="A User who is purchasing from the pet store")
|
||||
|
||||
public class User {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String firstName;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String lastName;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "User Status")
|
||||
/**
|
||||
* User Status
|
||||
**/
|
||||
* User Status
|
||||
*/
|
||||
@ApiModelProperty(value = "User Status")
|
||||
|
||||
private Integer userStatus;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -194,7 +194,7 @@ for this project used jakarta.validation-api -->
|
||||
<java.version>1.8</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<swagger-core-version>1.5.18</swagger-core-version>
|
||||
<swagger-core-version>1.6.6</swagger-core-version>
|
||||
<jetty-version>9.2.9.v20150224</jetty-version>
|
||||
<junit-version>4.13.2</junit-version>
|
||||
<logback-version>1.5.13</logback-version>
|
||||
|
@ -4,13 +4,9 @@ import java.io.File;
|
||||
import org.openapitools.model.ModelApiResponse;
|
||||
import org.openapitools.model.Pet;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -2,13 +2,9 @@ package org.openapitools.api;
|
||||
|
||||
import org.openapitools.model.Order;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -3,13 +3,9 @@ package org.openapitools.api;
|
||||
import java.util.Date;
|
||||
import org.openapitools.model.User;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -1,22 +1,24 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* A category for a pet
|
||||
**/
|
||||
* A category for a pet
|
||||
*/
|
||||
@ApiModel(description="A category for a pet")
|
||||
|
||||
public class Category {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String name;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -1,25 +1,28 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* Describes the result of uploading an image resource
|
||||
**/
|
||||
* Describes the result of uploading an image resource
|
||||
*/
|
||||
@ApiModel(description="Describes the result of uploading an image resource")
|
||||
|
||||
public class ModelApiResponse {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Integer code;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String message;
|
||||
/**
|
||||
* Get code
|
||||
|
@ -1,29 +1,33 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* An order for a pets from the pet store
|
||||
**/
|
||||
* An order for a pets from the pet store
|
||||
*/
|
||||
@ApiModel(description="An order for a pets from the pet store")
|
||||
|
||||
public class Order {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long petId;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Integer quantity;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Date shipDate;
|
||||
|
||||
public enum StatusEnum {
|
||||
@ -56,13 +60,15 @@ PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERE
|
||||
}
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "Order Status")
|
||||
/**
|
||||
* Order Status
|
||||
**/
|
||||
* Order Status
|
||||
*/
|
||||
@ApiModelProperty(value = "Order Status")
|
||||
|
||||
private StatusEnum status;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Boolean complete = false;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -1,36 +1,41 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.openapitools.model.Category;
|
||||
import org.openapitools.model.Tag;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
**/
|
||||
* A pet for sale in the pet store
|
||||
*/
|
||||
@ApiModel(description="A pet for sale in the pet store")
|
||||
|
||||
public class Pet {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Category category;
|
||||
|
||||
@ApiModelProperty(example = "doggie", required = true, value = "")
|
||||
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
private List<String> photoUrls = new ArrayList<>();
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private List<Tag> tags = new ArrayList<>();
|
||||
|
||||
public enum StatusEnum {
|
||||
@ -63,10 +68,11 @@ AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD
|
||||
}
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "pet status in the store")
|
||||
/**
|
||||
* pet status in the store
|
||||
**/
|
||||
* pet status in the store
|
||||
*/
|
||||
@ApiModelProperty(value = "pet status in the store")
|
||||
|
||||
private StatusEnum status;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -1,22 +1,24 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* A tag for a pet
|
||||
**/
|
||||
* A tag for a pet
|
||||
*/
|
||||
@ApiModel(description="A tag for a pet")
|
||||
|
||||
public class Tag {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String name;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -1,43 +1,51 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* A User who is purchasing from the pet store
|
||||
**/
|
||||
* A User who is purchasing from the pet store
|
||||
*/
|
||||
@ApiModel(description="A User who is purchasing from the pet store")
|
||||
|
||||
public class User {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String firstName;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String lastName;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "User Status")
|
||||
/**
|
||||
* User Status
|
||||
**/
|
||||
* User Status
|
||||
*/
|
||||
@ApiModelProperty(value = "User Status")
|
||||
|
||||
private Integer userStatus;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -223,7 +223,7 @@ for this project used jakarta.validation-api -->
|
||||
<java.version>1.8</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<swagger-core-version>1.5.22</swagger-core-version>
|
||||
<swagger-core-version>1.6.6</swagger-core-version>
|
||||
<jetty-version>9.2.9.v20150224</jetty-version>
|
||||
<junit-version>4.13.2</junit-version>
|
||||
<logback-version>1.5.13</logback-version>
|
||||
|
@ -4,13 +4,9 @@ import java.io.File;
|
||||
import org.openapitools.model.ModelApiResponse;
|
||||
import org.openapitools.model.Pet;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -3,13 +3,9 @@ package org.openapitools.api;
|
||||
import java.util.Map;
|
||||
import org.openapitools.model.Order;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -3,13 +3,9 @@ package org.openapitools.api;
|
||||
import java.util.Date;
|
||||
import org.openapitools.model.User;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -1,24 +1,26 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* A category for a pet
|
||||
**/
|
||||
* A category for a pet
|
||||
*/
|
||||
@ApiModel(description="A category for a pet")
|
||||
|
||||
public class Category {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String name;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -1,28 +1,31 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* Describes the result of uploading an image resource
|
||||
**/
|
||||
* Describes the result of uploading an image resource
|
||||
*/
|
||||
@ApiModel(description="Describes the result of uploading an image resource")
|
||||
|
||||
public class ModelApiResponse {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Integer code;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String message;
|
||||
/**
|
||||
* Get code
|
||||
|
@ -2,32 +2,36 @@ package org.openapitools.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import java.util.Date;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* An order for a pets from the pet store
|
||||
**/
|
||||
* An order for a pets from the pet store
|
||||
*/
|
||||
@ApiModel(description="An order for a pets from the pet store")
|
||||
|
||||
public class Order {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long petId;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Integer quantity;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Date shipDate;
|
||||
|
||||
public enum StatusEnum {
|
||||
@ -62,13 +66,15 @@ PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERE
|
||||
}
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "Order Status")
|
||||
/**
|
||||
* Order Status
|
||||
**/
|
||||
* Order Status
|
||||
*/
|
||||
@ApiModelProperty(value = "Order Status")
|
||||
|
||||
private StatusEnum status;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Boolean complete = false;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -2,7 +2,6 @@ package org.openapitools.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@ -11,32 +10,40 @@ import org.openapitools.model.Tag;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
**/
|
||||
* A pet for sale in the pet store
|
||||
*/
|
||||
@ApiModel(description="A pet for sale in the pet store")
|
||||
|
||||
public class Pet {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private Category category;
|
||||
|
||||
@ApiModelProperty(example = "doggie", required = true, value = "")
|
||||
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
private List<String> photoUrls = new ArrayList<>();
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private List<@Valid Tag> tags = new ArrayList<>();
|
||||
|
||||
public enum StatusEnum {
|
||||
@ -71,10 +78,11 @@ AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD
|
||||
}
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "pet status in the store")
|
||||
/**
|
||||
* pet status in the store
|
||||
**/
|
||||
* pet status in the store
|
||||
*/
|
||||
@ApiModelProperty(value = "pet status in the store")
|
||||
|
||||
private StatusEnum status;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -1,24 +1,26 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* A tag for a pet
|
||||
**/
|
||||
* A tag for a pet
|
||||
*/
|
||||
@ApiModel(description="A tag for a pet")
|
||||
|
||||
public class Tag {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String name;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -1,45 +1,53 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* A User who is purchasing from the pet store
|
||||
**/
|
||||
* A User who is purchasing from the pet store
|
||||
*/
|
||||
@ApiModel(description="A User who is purchasing from the pet store")
|
||||
|
||||
public class User {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String firstName;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String lastName;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "User Status")
|
||||
/**
|
||||
* User Status
|
||||
**/
|
||||
* User Status
|
||||
*/
|
||||
@ApiModelProperty(value = "User Status")
|
||||
|
||||
private Integer userStatus;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -223,7 +223,7 @@ for this project used jakarta.validation-api -->
|
||||
<java.version>1.8</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<swagger-core-version>1.5.22</swagger-core-version>
|
||||
<swagger-core-version>1.6.6</swagger-core-version>
|
||||
<jetty-version>9.2.9.v20150224</jetty-version>
|
||||
<junit-version>4.13.2</junit-version>
|
||||
<logback-version>1.5.13</logback-version>
|
||||
|
@ -4,13 +4,9 @@ import java.io.File;
|
||||
import org.openapitools.model.ModelApiResponse;
|
||||
import org.openapitools.model.Pet;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -3,13 +3,9 @@ package org.openapitools.api;
|
||||
import java.util.Map;
|
||||
import org.openapitools.model.Order;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -3,13 +3,9 @@ package org.openapitools.api;
|
||||
import java.util.Date;
|
||||
import org.openapitools.model.User;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -1,24 +1,26 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* A category for a pet
|
||||
**/
|
||||
* A category for a pet
|
||||
*/
|
||||
@ApiModel(description="A category for a pet")
|
||||
|
||||
public class Category {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String name;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -1,28 +1,31 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* Describes the result of uploading an image resource
|
||||
**/
|
||||
* Describes the result of uploading an image resource
|
||||
*/
|
||||
@ApiModel(description="Describes the result of uploading an image resource")
|
||||
|
||||
public class ModelApiResponse {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Integer code;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String message;
|
||||
/**
|
||||
* Get code
|
||||
|
@ -2,32 +2,36 @@ package org.openapitools.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import java.util.Date;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* An order for a pets from the pet store
|
||||
**/
|
||||
* An order for a pets from the pet store
|
||||
*/
|
||||
@ApiModel(description="An order for a pets from the pet store")
|
||||
|
||||
public class Order {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long petId;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Integer quantity;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Date shipDate;
|
||||
|
||||
public enum StatusEnum {
|
||||
@ -62,13 +66,15 @@ PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERE
|
||||
}
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "Order Status")
|
||||
/**
|
||||
* Order Status
|
||||
**/
|
||||
* Order Status
|
||||
*/
|
||||
@ApiModelProperty(value = "Order Status")
|
||||
|
||||
private StatusEnum status;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Boolean complete = false;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -2,7 +2,6 @@ package org.openapitools.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@ -11,32 +10,40 @@ import org.openapitools.model.Tag;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
**/
|
||||
* A pet for sale in the pet store
|
||||
*/
|
||||
@ApiModel(description="A pet for sale in the pet store")
|
||||
|
||||
public class Pet {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private Category category;
|
||||
|
||||
@ApiModelProperty(example = "doggie", required = true, value = "")
|
||||
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
private List<String> photoUrls = new ArrayList<>();
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private List<@Valid Tag> tags = new ArrayList<>();
|
||||
|
||||
public enum StatusEnum {
|
||||
@ -71,10 +78,11 @@ AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD
|
||||
}
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "pet status in the store")
|
||||
/**
|
||||
* pet status in the store
|
||||
**/
|
||||
* pet status in the store
|
||||
*/
|
||||
@ApiModelProperty(value = "pet status in the store")
|
||||
|
||||
private StatusEnum status;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -1,24 +1,26 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* A tag for a pet
|
||||
**/
|
||||
* A tag for a pet
|
||||
*/
|
||||
@ApiModel(description="A tag for a pet")
|
||||
|
||||
public class Tag {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String name;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -1,45 +1,53 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* A User who is purchasing from the pet store
|
||||
**/
|
||||
* A User who is purchasing from the pet store
|
||||
*/
|
||||
@ApiModel(description="A User who is purchasing from the pet store")
|
||||
|
||||
public class User {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String firstName;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String lastName;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "User Status")
|
||||
/**
|
||||
* User Status
|
||||
**/
|
||||
* User Status
|
||||
*/
|
||||
@ApiModelProperty(value = "User Status")
|
||||
|
||||
private Integer userStatus;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -223,7 +223,7 @@ for this project used jakarta.validation-api -->
|
||||
<java.version>1.8</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<swagger-core-version>1.5.22</swagger-core-version>
|
||||
<swagger-core-version>1.6.6</swagger-core-version>
|
||||
<jetty-version>9.2.9.v20150224</jetty-version>
|
||||
<junit-version>4.13.2</junit-version>
|
||||
<logback-version>1.5.13</logback-version>
|
||||
|
@ -3,13 +3,9 @@ package org.openapitools.api;
|
||||
import org.openapitools.model.Client;
|
||||
import java.util.UUID;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -11,13 +11,9 @@ import org.openapitools.model.OuterComposite;
|
||||
import org.openapitools.model.User;
|
||||
import org.openapitools.model.XmlItem;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -2,13 +2,9 @@ package org.openapitools.api;
|
||||
|
||||
import org.openapitools.model.Client;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -5,13 +5,9 @@ import org.openapitools.model.ModelApiResponse;
|
||||
import org.openapitools.model.Pet;
|
||||
import java.util.Set;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -3,13 +3,9 @@ package org.openapitools.api;
|
||||
import java.util.Map;
|
||||
import org.openapitools.model.Order;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -3,13 +3,9 @@ package org.openapitools.api;
|
||||
import java.util.Date;
|
||||
import org.openapitools.model.User;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -13,6 +13,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String name;
|
||||
/**
|
||||
* Get name
|
||||
|
@ -14,6 +14,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class AdditionalPropertiesArray extends HashMap<String, List> {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String name;
|
||||
/**
|
||||
* Get name
|
||||
|
@ -13,6 +13,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String name;
|
||||
/**
|
||||
* Get name
|
||||
|
@ -15,41 +15,57 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class AdditionalPropertiesClass {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Map<String, String> mapString = new HashMap<>();
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private Map<String, BigDecimal> mapNumber = new HashMap<>();
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Map<String, Integer> mapInteger = new HashMap<>();
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Map<String, Boolean> mapBoolean = new HashMap<>();
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private Map<String, List<Integer>> mapArrayInteger = new HashMap<>();
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private Map<String, List<Object>> mapArrayAnytype = new HashMap<>();
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private Map<String, Map<String, String>> mapMapString = new HashMap<>();
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private Map<String, Map<String, Object>> mapMapAnytype = new HashMap<>();
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Object anytype1;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Object anytype2;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Object anytype3;
|
||||
/**
|
||||
* Get mapString
|
||||
|
@ -13,6 +13,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class AdditionalPropertiesInteger extends HashMap<String, Integer> {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String name;
|
||||
/**
|
||||
* Get name
|
||||
|
@ -14,6 +14,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String name;
|
||||
/**
|
||||
* Get name
|
||||
|
@ -13,6 +13,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class AdditionalPropertiesObject extends HashMap<String, Map> {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String name;
|
||||
/**
|
||||
* Get name
|
||||
|
@ -13,6 +13,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class AdditionalPropertiesString extends HashMap<String, String> {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String name;
|
||||
/**
|
||||
* Get name
|
||||
|
@ -20,9 +20,11 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class Animal {
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
private String className;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String color = "red";
|
||||
/**
|
||||
* Get className
|
||||
|
@ -15,7 +15,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class ArrayOfArrayOfNumberOnly {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private List<List<BigDecimal>> arrayArrayNumber = new ArrayList<>();
|
||||
/**
|
||||
* Get arrayArrayNumber
|
||||
|
@ -15,7 +15,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class ArrayOfNumberOnly {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private List<BigDecimal> arrayNumber = new ArrayList<>();
|
||||
/**
|
||||
* Get arrayNumber
|
||||
|
@ -15,14 +15,19 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class ArrayTest {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private List<String> arrayOfString = new ArrayList<>();
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private List<List<Long>> arrayArrayOfInteger = new ArrayList<>();
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private List<List<@Valid ReadOnlyFirst>> arrayArrayOfModel = new ArrayList<>();
|
||||
/**
|
||||
* Get arrayOfString
|
||||
|
@ -46,6 +46,7 @@ LIONS(String.valueOf("lions")), TIGERS(String.valueOf("tigers")), LEOPARDS(Strin
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private KindEnum kind;
|
||||
/**
|
||||
* Get kind
|
||||
|
@ -11,24 +11,30 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class Capitalization {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String smallCamel;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String capitalCamel;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String smallSnake;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String capitalSnake;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String scAETHFlowPoints;
|
||||
|
||||
@ApiModelProperty(value = "Name of the pet ")
|
||||
/**
|
||||
* Name of the pet
|
||||
**/
|
||||
* Name of the pet
|
||||
*/
|
||||
@ApiModelProperty(value = "Name of the pet ")
|
||||
|
||||
private String ATT_NAME;
|
||||
/**
|
||||
* Get smallCamel
|
||||
|
@ -12,6 +12,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class Cat extends Animal {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Boolean declawed;
|
||||
/**
|
||||
* Get declawed
|
||||
|
@ -11,9 +11,11 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class Category {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
private String name = "default-name";
|
||||
/**
|
||||
* Get id
|
||||
|
@ -1,21 +1,22 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* Model for testing model with \"_class\" property
|
||||
**/
|
||||
* Model for testing model with \"_class\" property
|
||||
*/
|
||||
@ApiModel(description="Model for testing model with \"_class\" property")
|
||||
|
||||
public class ClassModel {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String propertyClass;
|
||||
/**
|
||||
* Get propertyClass
|
||||
|
@ -11,6 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class Client {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String client;
|
||||
/**
|
||||
* Get client
|
||||
|
@ -12,6 +12,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class Dog extends Animal {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String breed;
|
||||
/**
|
||||
* Get breed
|
||||
|
@ -48,6 +48,7 @@ GREATER_THAN_OR_EQUAL_TO(String.valueOf(">=")), DOLLAR(String.valueOf("$"));
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private JustSymbolEnum justSymbol;
|
||||
|
||||
public enum ArrayEnumEnum {
|
||||
@ -83,6 +84,7 @@ FISH(String.valueOf("fish")), CRAB(String.valueOf("crab"));
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private List<ArrayEnumEnum> arrayEnum = new ArrayList<>();
|
||||
/**
|
||||
* Get justSymbol
|
||||
|
@ -47,6 +47,7 @@ UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")), EMPTY(String.val
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private EnumStringEnum enumString;
|
||||
|
||||
public enum EnumStringRequiredEnum {
|
||||
@ -82,6 +83,7 @@ UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")), EMPTY(String.val
|
||||
}
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
private EnumStringRequiredEnum enumStringRequired;
|
||||
|
||||
public enum EnumIntegerEnum {
|
||||
@ -117,6 +119,7 @@ NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1));
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private EnumIntegerEnum enumInteger;
|
||||
|
||||
public enum EnumNumberEnum {
|
||||
@ -152,10 +155,13 @@ NUMBER_1_DOT_1(Double.valueOf(1.1)), NUMBER_MINUS_1_DOT_2(Double.valueOf(-1.2));
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private EnumNumberEnum enumNumber;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private OuterEnum outerEnum;
|
||||
/**
|
||||
* Get enumString
|
||||
|
@ -15,11 +15,15 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class FileSchemaTestClass {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private ModelFile _file;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private List<@Valid ModelFile> files = new ArrayList<>();
|
||||
/**
|
||||
* Get _file
|
||||
|
@ -17,47 +17,63 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class FormatTest {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Integer integer;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Integer int32;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long int64;
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private BigDecimal number;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Float _float;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Double _double;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String string;
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
private byte[] _byte;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private File binary;
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
private LocalDate date;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Date dateTime;
|
||||
|
||||
@ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "")
|
||||
|
||||
private UUID uuid;
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private BigDecimal bigDecimal;
|
||||
/**
|
||||
* Get integer
|
||||
|
@ -12,9 +12,11 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class HasOnlyReadOnly {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String bar;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String foo;
|
||||
/**
|
||||
* Get bar
|
||||
|
@ -15,7 +15,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MapTest {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private Map<String, Map<String, String>> mapMapOfString = new HashMap<>();
|
||||
|
||||
public enum InnerEnum {
|
||||
@ -51,12 +53,15 @@ UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower"));
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Map<String, InnerEnum> mapOfEnumString = new HashMap<>();
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Map<String, Boolean> directMap = new HashMap<>();
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Map<String, Boolean> indirectMap = new HashMap<>();
|
||||
/**
|
||||
* Get mapMapOfString
|
||||
|
@ -16,13 +16,17 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private UUID uuid;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Date dateTime;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private Map<String, Animal> map = new HashMap<>();
|
||||
/**
|
||||
* Get uuid
|
||||
|
@ -1,25 +1,27 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* Model for testing model name starting with number
|
||||
**/
|
||||
* Model for testing model name starting with number
|
||||
*/
|
||||
@ApiModel(description="Model for testing model name starting with number")
|
||||
|
||||
public class Model200Response {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Integer name;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String propertyClass;
|
||||
/**
|
||||
* Get name
|
||||
|
@ -12,12 +12,15 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class ModelApiResponse {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Integer code;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String message;
|
||||
/**
|
||||
* Get code
|
||||
|
@ -1,25 +1,26 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* Must be named `File` for test.
|
||||
**/
|
||||
* Must be named `File` for test.
|
||||
*/
|
||||
@ApiModel(description="Must be named `File` for test.")
|
||||
|
||||
public class ModelFile {
|
||||
|
||||
@ApiModelProperty(value = "Test capitalization")
|
||||
/**
|
||||
* Test capitalization
|
||||
**/
|
||||
* Test capitalization
|
||||
*/
|
||||
@ApiModelProperty(value = "Test capitalization")
|
||||
|
||||
private String sourceURI;
|
||||
/**
|
||||
* Test capitalization
|
||||
|
@ -12,6 +12,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class ModelList {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String _123list;
|
||||
/**
|
||||
* Get _123list
|
||||
|
@ -1,22 +1,23 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* Model for testing reserved words
|
||||
**/
|
||||
* Model for testing reserved words
|
||||
*/
|
||||
@ApiModel(description="Model for testing reserved words")
|
||||
|
||||
public class ModelReturn {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Integer _return;
|
||||
/**
|
||||
* Get _return
|
||||
|
@ -1,30 +1,34 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* Model for testing model name same as property name
|
||||
**/
|
||||
* Model for testing model name same as property name
|
||||
*/
|
||||
@ApiModel(description="Model for testing model name same as property name")
|
||||
|
||||
public class Name {
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
private Integer name;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Integer snakeCase;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String property;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Integer _123number;
|
||||
/**
|
||||
* Get name
|
||||
|
@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class NumberOnly {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private BigDecimal justNumber;
|
||||
/**
|
||||
* Get justNumber
|
||||
|
@ -14,15 +14,19 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class Order {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long petId;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Integer quantity;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Date shipDate;
|
||||
|
||||
public enum StatusEnum {
|
||||
@ -57,13 +61,15 @@ PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERE
|
||||
}
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "Order Status")
|
||||
/**
|
||||
* Order Status
|
||||
**/
|
||||
* Order Status
|
||||
*/
|
||||
@ApiModelProperty(value = "Order Status")
|
||||
|
||||
private StatusEnum status;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Boolean complete = false;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -12,13 +12,17 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class OuterComposite {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private BigDecimal myNumber;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String myString;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Boolean myBoolean;
|
||||
/**
|
||||
* Get myNumber
|
||||
|
@ -21,20 +21,27 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class Pet {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private Category category;
|
||||
|
||||
@ApiModelProperty(example = "doggie", required = true, value = "")
|
||||
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
private Set<String> photoUrls = new LinkedHashSet<>();
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private List<@Valid Tag> tags = new ArrayList<>();
|
||||
|
||||
public enum StatusEnum {
|
||||
@ -69,10 +76,11 @@ AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD
|
||||
}
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "pet status in the store")
|
||||
/**
|
||||
* pet status in the store
|
||||
**/
|
||||
* pet status in the store
|
||||
*/
|
||||
@ApiModelProperty(value = "pet status in the store")
|
||||
|
||||
private StatusEnum status;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -11,9 +11,11 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class ReadOnlyFirst {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String bar;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String baz;
|
||||
/**
|
||||
* Get bar
|
||||
|
@ -12,6 +12,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class SpecialModelName {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long $specialPropertyName;
|
||||
/**
|
||||
* Get $specialPropertyName
|
||||
|
@ -11,9 +11,11 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class Tag {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
private String name;
|
||||
/**
|
||||
* Get id
|
||||
|
@ -15,19 +15,25 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class TypeHolderDefault {
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
private String stringItem = "what";
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private BigDecimal numberItem;
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
private Integer integerItem;
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
private Boolean boolItem = true;
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
|
||||
private List<Integer> arrayItem = new ArrayList<>();
|
||||
/**
|
||||
* Get stringItem
|
||||
|
@ -15,22 +15,29 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class TypeHolderExample {
|
||||
|
||||
@ApiModelProperty(example = "what", required = true, value = "")
|
||||
|
||||
private String stringItem;
|
||||
|
||||
@ApiModelProperty(example = "1.234", required = true, value = "")
|
||||
|
||||
@Valid
|
||||
|
||||
private BigDecimal numberItem;
|
||||
|
||||
@ApiModelProperty(example = "1.234", required = true, value = "")
|
||||
|
||||
private Float floatItem;
|
||||
|
||||
@ApiModelProperty(example = "-2", required = true, value = "")
|
||||
|
||||
private Integer integerItem;
|
||||
|
||||
@ApiModelProperty(example = "true", required = true, value = "")
|
||||
|
||||
private Boolean boolItem;
|
||||
|
||||
@ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "")
|
||||
|
||||
private List<Integer> arrayItem = new ArrayList<>();
|
||||
/**
|
||||
* Get stringItem
|
||||
|
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