mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-04 06:30:52 +00:00
[Jaxrs-cxf-cdi] Add beanvalidation annotations updated (#4615)
* add check for hideGenerationTimestamp #4091 * update generated sample with no generated timestamps #4091 * add beanvalidation to jaxrs-cxf-cdi #4091 * add beanvalidation to jaxrs-cxf-cdi #4091 * update crlf * replace tabs * add check for hideGenerationTimestamp #4091 * update generated sample with no generated timestamps #4091 * add beanvalidation to jaxrs-cxf-cdi #4091 * add beanvalidation to jaxrs-cxf-cdi #4091 * update crlf * replace tabs * re-generate samples after rebasing #4091 * fix handling of inner enum templates #4091 * fix InputStream/Multipart imports and fileInputStream variable #4091 * fix paramName for files #4091 * consolidate beanValidationParams #4091 * add paramNameDetail #4615 * fix indentation and regenerate samples #4615 * reset samples jaxrs-spec to master * update generated samples * adapt Min/Max/DecimalMin/DecimalMax handling for int/long/else * add ModelApiResponse
This commit is contained in:
parent
a83f8d0449
commit
38c879683a
@ -1,8 +1,10 @@
|
|||||||
package io.swagger.codegen.languages;
|
package io.swagger.codegen.languages;
|
||||||
|
|
||||||
|
import io.swagger.codegen.CliOption;
|
||||||
import io.swagger.codegen.CodegenModel;
|
import io.swagger.codegen.CodegenModel;
|
||||||
import io.swagger.codegen.CodegenProperty;
|
import io.swagger.codegen.CodegenProperty;
|
||||||
import io.swagger.codegen.SupportingFile;
|
import io.swagger.codegen.SupportingFile;
|
||||||
|
import io.swagger.codegen.languages.features.BeanValidationFeatures;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
@ -13,7 +15,10 @@ import java.io.File;
|
|||||||
* in /src/gen/java and a sample ServiceImpl in /src/main/java. The API uses CDI
|
* in /src/gen/java and a sample ServiceImpl in /src/main/java. The API uses CDI
|
||||||
* to get an instance of ServiceImpl that implements the Service interface.
|
* to get an instance of ServiceImpl that implements the Service interface.
|
||||||
*/
|
*/
|
||||||
public class JavaJAXRSCXFCDIServerCodegen extends JavaJAXRSSpecServerCodegen {
|
public class JavaJAXRSCXFCDIServerCodegen extends JavaJAXRSSpecServerCodegen implements BeanValidationFeatures {
|
||||||
|
|
||||||
|
protected boolean useBeanValidation = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default constructor
|
* Default constructor
|
||||||
*/
|
*/
|
||||||
@ -32,6 +37,8 @@ public class JavaJAXRSCXFCDIServerCodegen extends JavaJAXRSSpecServerCodegen {
|
|||||||
// Updated template directory
|
// Updated template directory
|
||||||
embeddedTemplateDir = templateDir = JAXRS_TEMPLATE_DIRECTORY_NAME
|
embeddedTemplateDir = templateDir = JAXRS_TEMPLATE_DIRECTORY_NAME
|
||||||
+ File.separator + "cxf-cdi";
|
+ File.separator + "cxf-cdi";
|
||||||
|
|
||||||
|
cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -43,6 +50,14 @@ public class JavaJAXRSCXFCDIServerCodegen extends JavaJAXRSSpecServerCodegen {
|
|||||||
public void processOpts() {
|
public void processOpts() {
|
||||||
super.processOpts();
|
super.processOpts();
|
||||||
|
|
||||||
|
if (additionalProperties.containsKey(USE_BEANVALIDATION)) {
|
||||||
|
this.setUseBeanValidation(convertPropertyToBoolean(USE_BEANVALIDATION));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (useBeanValidation) {
|
||||||
|
writePropertyBack(USE_BEANVALIDATION, useBeanValidation);
|
||||||
|
}
|
||||||
|
|
||||||
supportingFiles.clear(); // Don't need extra files provided by AbstractJAX-RS & Java Codegen
|
supportingFiles.clear(); // Don't need extra files provided by AbstractJAX-RS & Java Codegen
|
||||||
|
|
||||||
// writeOptional means these files are only written if they don't already exist
|
// writeOptional means these files are only written if they don't already exist
|
||||||
@ -73,4 +88,7 @@ public class JavaJAXRSCXFCDIServerCodegen extends JavaJAXRSSpecServerCodegen {
|
|||||||
+ "Apache CXF runtime and a Java EE runtime with CDI enabled.";
|
+ "Apache CXF runtime and a Java EE runtime with CDI enabled.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setUseBeanValidation(boolean useBeanValidation) {
|
||||||
|
this.useBeanValidation = useBeanValidation;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,11 +12,15 @@ import javax.enterprise.context.RequestScoped;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
import java.io.InputStream;
|
||||||
|
|
||||||
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
||||||
|
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
{{#useBeanValidation}}
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
{{/useBeanValidation}}
|
||||||
@Path("/{{baseName}}")
|
@Path("/{{baseName}}")
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
|
|
||||||
@ -48,7 +52,7 @@ public class {{classname}} {
|
|||||||
@ApiResponses(value = { {{#responses}}
|
@ApiResponses(value = { {{#responses}}
|
||||||
@ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}){{#hasMore}},{{/hasMore}}{{/responses}} })
|
@ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}){{#hasMore}},{{/hasMore}}{{/responses}} })
|
||||||
public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) {
|
public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) {
|
||||||
return delegate.{{nickname}}({{#allParams}}{{#isFile}}inputStream, fileDetail{{/isFile}}{{^isFile}}{{paramName}}{{/isFile}}, {{/allParams}}securityContext);
|
return delegate.{{nickname}}({{#allParams}}{{#isFile}}{{paramName}}InputStream, {{paramName}}Detail{{/isFile}}{{^isFile}}{{paramName}}{{/isFile}}, {{/allParams}}securityContext);
|
||||||
}
|
}
|
||||||
{{/operation}}
|
{{/operation}}
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import {{package}}.*;
|
|||||||
import {{modelPackage}}.*;
|
import {{modelPackage}}.*;
|
||||||
|
|
||||||
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
||||||
|
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
|
||||||
|
|
||||||
{{#imports}}import {{import}};
|
{{#imports}}import {{import}};
|
||||||
{{/imports}}
|
{{/imports}}
|
||||||
|
@ -0,0 +1,63 @@
|
|||||||
|
{{#required}}
|
||||||
|
@NotNull
|
||||||
|
{{/required}}
|
||||||
|
{{#pattern}}
|
||||||
|
@Pattern(regexp="{{pattern}}")
|
||||||
|
{{/pattern}}
|
||||||
|
{{#minLength}}
|
||||||
|
{{#maxLength}}
|
||||||
|
@Size(min={{minLength}},max={{maxLength}})
|
||||||
|
{{/maxLength}}
|
||||||
|
{{/minLength}}
|
||||||
|
{{#minLength}}
|
||||||
|
{{^maxLength}}
|
||||||
|
@Size(min={{minLength}})
|
||||||
|
{{/maxLength}}
|
||||||
|
{{/minLength}}
|
||||||
|
{{^minLength}}
|
||||||
|
{{#maxLength}}
|
||||||
|
@Size(max={{maxLength}})
|
||||||
|
{{/maxLength}}
|
||||||
|
{{/minLength}}
|
||||||
|
{{#minItems}}
|
||||||
|
{{#maxItems}}
|
||||||
|
@Size(min={{minItems}},max={{maxItems}})
|
||||||
|
{{/maxItems}}
|
||||||
|
{{/minItems}}
|
||||||
|
{{#minItems}}
|
||||||
|
{{^maxItems}}
|
||||||
|
@Size(min={{minItems}})
|
||||||
|
{{/maxItems}}
|
||||||
|
{{/minItems}}
|
||||||
|
{{^minItems}}
|
||||||
|
{{#maxItems}}
|
||||||
|
@Size(max={{maxItems}})
|
||||||
|
{{/maxItems}}
|
||||||
|
{{/minItems}}
|
||||||
|
{{! check for integer or long / all others=decimal type with @Decimal*}}
|
||||||
|
{{#isInteger}}
|
||||||
|
{{#minimum}}
|
||||||
|
@Min({{minimum}})
|
||||||
|
{{/minimum}}
|
||||||
|
{{#maximum}}
|
||||||
|
@Max({{maximum}})
|
||||||
|
{{/maximum}}
|
||||||
|
{{/isInteger}}
|
||||||
|
{{#isLong}}
|
||||||
|
{{#minimum}}
|
||||||
|
@Min({{minimum}})
|
||||||
|
{{/minimum}}
|
||||||
|
{{#maximum}}
|
||||||
|
@Max({{maximum}})
|
||||||
|
{{/maximum}}
|
||||||
|
{{/isLong}}
|
||||||
|
{{^isInteger}}
|
||||||
|
{{^isLong}}
|
||||||
|
{{#minimum}}
|
||||||
|
@DecimalMin("{{minimum}}")
|
||||||
|
{{/minimum}}
|
||||||
|
{{#maximum}}
|
||||||
|
@DecimalMax("{{maximum}}")
|
||||||
|
{{/maximum}}
|
||||||
|
{{/isLong}}
|
||||||
|
{{/isInteger}}
|
@ -0,0 +1,3 @@
|
|||||||
|
{{#pattern}} @Pattern(regexp="{{pattern}}"){{/pattern}}{{#minLength}}{{#maxLength}} @Size(min={{minLength}},max={{maxLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} @Size(max={{maxLength}}){{/maxLength}}{{/minLength}}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{^minItems}}{{#maxItems}} @Size(max={{maxItems}}){{/maxItems}}{{/minItems}}{{!
|
||||||
|
check for integer or long / all others=decimal type with @Decimal*
|
||||||
|
}}{{#isInteger}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}}{{/isInteger}}{{#isLong}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}}{{/isLong}}{{^isInteger}}{{^isLong}}{{#minimum}} @DecimalMin("{{minimum}}"){{/minimum}}{{#maximum}} @DecimalMax("{{maximum}}"){{/maximum}}{{/isLong}}{{/isInteger}}
|
@ -0,0 +1 @@
|
|||||||
|
{{! PathParam is always required, no @NotNull necessary }}{{>beanValidationParams}}
|
@ -0,0 +1 @@
|
|||||||
|
{{#required}} @NotNull{{/required}}{{>beanValidationParams}}
|
@ -1,16 +1,33 @@
|
|||||||
import javax.xml.bind.annotation.XmlEnum;
|
@XmlType(name="{{datatypeWithEnum}}")
|
||||||
import javax.xml.bind.annotation.XmlType;
|
@XmlEnum({{datatype}}.class)
|
||||||
|
public enum {{datatypeWithEnum}} {
|
||||||
|
|
||||||
@XmlType(name="{{classname}}")
|
{{#allowableValues}}
|
||||||
@XmlEnum
|
{{#enumVars}}@XmlEnumValue({{{value}}}) {{name}}({{datatype}}.valueOf({{{value}}})){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}
|
||||||
public enum {{classname}} {
|
{{/allowableValues}}
|
||||||
{{#allowableValues}}{{.}}{{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/allowableValues}}
|
|
||||||
|
|
||||||
|
private {{datatype}} value;
|
||||||
|
|
||||||
|
{{datatypeWithEnum}} ({{datatype}} v) {
|
||||||
|
value = v;
|
||||||
|
}
|
||||||
|
|
||||||
public String value() {
|
public String value() {
|
||||||
return name();
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static {{classname}} fromValue(String v) {
|
@Override
|
||||||
return valueOf(v);
|
public String toString() {
|
||||||
|
return String.valueOf(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static {{datatypeWithEnum}} fromValue(String v) {
|
||||||
|
for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) {
|
||||||
|
if (String.valueOf(b.value).equals(v)) {
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1 +1 @@
|
|||||||
@javax.annotation.Generated(value = "{{generatorClass}}", date = "{{generatedDate}}")
|
{{^hideGenerationTimestamp}}@javax.annotation.Generated(value = "{{generatorClass}}", date = "{{generatedDate}}"){{/hideGenerationTimestamp}}
|
@ -2,7 +2,9 @@ package {{package}};
|
|||||||
|
|
||||||
{{#imports}}import {{import}};
|
{{#imports}}import {{import}};
|
||||||
{{/imports}}
|
{{/imports}}
|
||||||
|
{{#useBeanValidation}}
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
{{/useBeanValidation}}
|
||||||
{{#models}}
|
{{#models}}
|
||||||
{{#model}}{{#description}}
|
{{#model}}{{#description}}
|
||||||
/**
|
/**
|
||||||
|
@ -1 +1 @@
|
|||||||
{{#isPathParam}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @PathParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isPathParam}}
|
{{#isPathParam}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @PathParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isPathParam}}
|
@ -1,5 +1,8 @@
|
|||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.*;
|
||||||
|
|
||||||
{{#description}}@ApiModel(description = "{{{description}}}"){{/description}}
|
{{#description}}@ApiModel(description = "{{{description}}}"){{/description}}
|
||||||
|
|
||||||
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
|
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
|
||||||
@ -24,7 +27,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
|
|||||||
{{#vendorExtensions.extraAnnotation}}{{{vendorExtensions.extraAnnotation}}}{{/vendorExtensions.extraAnnotation}}
|
{{#vendorExtensions.extraAnnotation}}{{{vendorExtensions.extraAnnotation}}}{{/vendorExtensions.extraAnnotation}}
|
||||||
@ApiModelProperty({{#example}}example = "{{example}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
|
@ApiModelProperty({{#example}}example = "{{example}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
|
||||||
@JsonProperty("{{baseName}}")
|
@JsonProperty("{{baseName}}")
|
||||||
public {{{datatypeWithEnum}}} {{getter}}() {
|
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() {
|
||||||
return {{name}};
|
return {{name}};
|
||||||
}
|
}
|
||||||
public void {{setter}}({{{datatypeWithEnum}}} {{name}}) {
|
public void {{setter}}({{{datatypeWithEnum}}} {{name}}) {
|
||||||
|
@ -77,6 +77,16 @@
|
|||||||
<version>[1.5.3,2)</version>
|
<version>[1.5.3,2)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
{{#useBeanValidation}}
|
||||||
|
<!-- Bean Validation API support -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.validation</groupId>
|
||||||
|
<artifactId>validation-api</artifactId>
|
||||||
|
<version>1.1.0.Final</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
{{/useBeanValidation}}
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
@ -1 +1 @@
|
|||||||
{{#isQueryParam}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{#defaultValue}}@DefaultValue("{{{defaultValue}}}"){{/defaultValue}} @QueryParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isQueryParam}}
|
{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{#defaultValue}}@DefaultValue("{{{defaultValue}}}"){{/defaultValue}} @QueryParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isQueryParam}}
|
@ -77,6 +77,14 @@
|
|||||||
<version>[1.5.3,2)</version>
|
<version>[1.5.3,2)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Bean Validation API support -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.validation</groupId>
|
||||||
|
<artifactId>validation-api</artifactId>
|
||||||
|
<version>1.1.0.Final</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
@ -13,18 +13,20 @@ import javax.enterprise.context.RequestScoped;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
import java.io.InputStream;
|
||||||
|
|
||||||
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
||||||
|
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
@Path("/pet")
|
@Path("/pet")
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
|
|
||||||
@Api(description = "the pet API")
|
@Api(description = "the pet API")
|
||||||
|
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJAXRSCXFCDIServerCodegen", date = "2016-11-17T08:53:42.205Z")
|
|
||||||
|
|
||||||
public class PetApi {
|
public class PetApi {
|
||||||
|
|
||||||
@ -78,7 +80,7 @@ public class PetApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
||||||
@ApiResponse(code = 400, message = "Invalid status value", response = Pet.class, responseContainer = "List") })
|
@ApiResponse(code = 400, message = "Invalid status value", response = Pet.class, responseContainer = "List") })
|
||||||
public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter",required=true, allowableValues="available, pending, sold") @QueryParam("status") List<String> status) {
|
public Response findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter",required=true, allowableValues="available, pending, sold") @QueryParam("status") List<String> status) {
|
||||||
return delegate.findPetsByStatus(status, securityContext);
|
return delegate.findPetsByStatus(status, securityContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,7 +97,7 @@ public class PetApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
||||||
@ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class, responseContainer = "List") })
|
@ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class, responseContainer = "List") })
|
||||||
public Response findPetsByTags(@ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List<String> tags) {
|
public Response findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List<String> tags) {
|
||||||
return delegate.findPetsByTags(tags, securityContext);
|
return delegate.findPetsByTags(tags, securityContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,6 +163,6 @@ public class PetApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||||
public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file", required = false) InputStream fileInputStream, @Multipart(value = "file" , required = false) Attachment fileDetail) {
|
public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file", required = false) InputStream fileInputStream, @Multipart(value = "file" , required = false) Attachment fileDetail) {
|
||||||
return delegate.uploadFile(petId, additionalMetadata, inputStream, fileDetail, securityContext);
|
return delegate.uploadFile(petId, additionalMetadata, fileInputStream, fileDetail, securityContext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import io.swagger.api.*;
|
|||||||
import io.swagger.model.*;
|
import io.swagger.model.*;
|
||||||
|
|
||||||
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
||||||
|
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import io.swagger.model.ModelApiResponse;
|
import io.swagger.model.ModelApiResponse;
|
||||||
@ -16,7 +17,7 @@ import java.io.InputStream;
|
|||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.SecurityContext;
|
import javax.ws.rs.core.SecurityContext;
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJAXRSCXFCDIServerCodegen", date = "2016-11-17T08:53:42.205Z")
|
|
||||||
public interface PetApiService {
|
public interface PetApiService {
|
||||||
public Response addPet(Pet body, SecurityContext securityContext);
|
public Response addPet(Pet body, SecurityContext securityContext);
|
||||||
public Response deletePet(Long petId, String apiKey, SecurityContext securityContext);
|
public Response deletePet(Long petId, String apiKey, SecurityContext securityContext);
|
||||||
|
@ -12,18 +12,20 @@ import javax.enterprise.context.RequestScoped;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
import java.io.InputStream;
|
||||||
|
|
||||||
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
||||||
|
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
@Path("/store")
|
@Path("/store")
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
|
|
||||||
@Api(description = "the store API")
|
@Api(description = "the store API")
|
||||||
|
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJAXRSCXFCDIServerCodegen", date = "2016-11-17T08:53:42.205Z")
|
|
||||||
|
|
||||||
public class StoreApi {
|
public class StoreApi {
|
||||||
|
|
||||||
@ -66,7 +68,7 @@ public class StoreApi {
|
|||||||
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class),
|
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class),
|
||||||
@ApiResponse(code = 404, message = "Order not found", response = Order.class) })
|
@ApiResponse(code = 404, message = "Order not found", response = Order.class) })
|
||||||
public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") Long orderId) {
|
public Response getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") Long orderId) {
|
||||||
return delegate.getOrderById(orderId, securityContext);
|
return delegate.getOrderById(orderId, securityContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import io.swagger.api.*;
|
|||||||
import io.swagger.model.*;
|
import io.swagger.model.*;
|
||||||
|
|
||||||
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
||||||
|
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import io.swagger.model.Order;
|
import io.swagger.model.Order;
|
||||||
@ -15,7 +16,7 @@ import java.io.InputStream;
|
|||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.SecurityContext;
|
import javax.ws.rs.core.SecurityContext;
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJAXRSCXFCDIServerCodegen", date = "2016-11-17T08:53:42.205Z")
|
|
||||||
public interface StoreApiService {
|
public interface StoreApiService {
|
||||||
public Response deleteOrder(String orderId, SecurityContext securityContext);
|
public Response deleteOrder(String orderId, SecurityContext securityContext);
|
||||||
public Response getInventory(SecurityContext securityContext);
|
public Response getInventory(SecurityContext securityContext);
|
||||||
|
@ -12,18 +12,20 @@ import javax.enterprise.context.RequestScoped;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
import java.io.InputStream;
|
||||||
|
|
||||||
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
||||||
|
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
@Path("/user")
|
@Path("/user")
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
|
|
||||||
@Api(description = "the user API")
|
@Api(description = "the user API")
|
||||||
|
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJAXRSCXFCDIServerCodegen", date = "2016-11-17T08:53:42.205Z")
|
|
||||||
|
|
||||||
public class UserApi {
|
public class UserApi {
|
||||||
|
|
||||||
@ -98,7 +100,7 @@ public class UserApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = String.class),
|
@ApiResponse(code = 200, message = "successful operation", response = String.class),
|
||||||
@ApiResponse(code = 400, message = "Invalid username/password supplied", response = String.class) })
|
@ApiResponse(code = 400, message = "Invalid username/password supplied", response = String.class) })
|
||||||
public Response loginUser(@ApiParam(value = "The user name for login",required=true) @QueryParam("username") String username, @ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password) {
|
public Response loginUser( @NotNull @ApiParam(value = "The user name for login",required=true) @QueryParam("username") String username, @NotNull @ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password) {
|
||||||
return delegate.loginUser(username, password, securityContext);
|
return delegate.loginUser(username, password, securityContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import io.swagger.api.*;
|
|||||||
import io.swagger.model.*;
|
import io.swagger.model.*;
|
||||||
|
|
||||||
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
||||||
|
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import io.swagger.model.User;
|
import io.swagger.model.User;
|
||||||
@ -15,7 +16,7 @@ import java.io.InputStream;
|
|||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.SecurityContext;
|
import javax.ws.rs.core.SecurityContext;
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJAXRSCXFCDIServerCodegen", date = "2016-11-17T08:53:42.205Z")
|
|
||||||
public interface UserApiService {
|
public interface UserApiService {
|
||||||
public Response createUser(User body, SecurityContext securityContext);
|
public Response createUser(User body, SecurityContext securityContext);
|
||||||
public Response createUsersWithArrayInput(List<User> body, SecurityContext securityContext);
|
public Response createUsersWithArrayInput(List<User> body, SecurityContext securityContext);
|
||||||
|
@ -3,7 +3,7 @@ package io.swagger.model;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A category for a pet
|
* A category for a pet
|
||||||
@ -11,6 +11,9 @@ import io.swagger.annotations.ApiModel;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.*;
|
||||||
|
|
||||||
@ApiModel(description = "A category for a pet")
|
@ApiModel(description = "A category for a pet")
|
||||||
|
|
||||||
public class Category {
|
public class Category {
|
||||||
|
@ -3,7 +3,7 @@ package io.swagger.model;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Describes the result of uploading an image resource
|
* Describes the result of uploading an image resource
|
||||||
@ -11,6 +11,9 @@ import io.swagger.annotations.ApiModel;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.*;
|
||||||
|
|
||||||
@ApiModel(description = "Describes the result of uploading an image resource")
|
@ApiModel(description = "Describes the result of uploading an image resource")
|
||||||
|
|
||||||
public class ModelApiResponse {
|
public class ModelApiResponse {
|
||||||
|
@ -3,7 +3,7 @@ package io.swagger.model;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An order for a pets from the pet store
|
* An order for a pets from the pet store
|
||||||
@ -11,6 +11,9 @@ import io.swagger.annotations.ApiModel;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.*;
|
||||||
|
|
||||||
@ApiModel(description = "An order for a pets from the pet store")
|
@ApiModel(description = "An order for a pets from the pet store")
|
||||||
|
|
||||||
public class Order {
|
public class Order {
|
||||||
@ -20,22 +23,38 @@ public class Order {
|
|||||||
private Integer quantity = null;
|
private Integer quantity = null;
|
||||||
private java.util.Date shipDate = null;
|
private java.util.Date shipDate = null;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlEnum;
|
@XmlType(name="StatusEnum")
|
||||||
import javax.xml.bind.annotation.XmlType;
|
@XmlEnum(String.class)
|
||||||
|
public enum StatusEnum {
|
||||||
|
|
||||||
@XmlType(name="Order")
|
@XmlEnumValue("placed") PLACED(String.valueOf("placed")), @XmlEnumValue("approved") APPROVED(String.valueOf("approved")), @XmlEnumValue("delivered") DELIVERED(String.valueOf("delivered"));
|
||||||
@XmlEnum
|
|
||||||
public enum Order {
|
|
||||||
{values=[placed, approved, delivered], enumVars=[{name=PLACED, value="placed"}, {name=APPROVED, value="approved"}, {name=DELIVERED, value="delivered"}]},
|
private String value;
|
||||||
|
|
||||||
|
StatusEnum (String v) {
|
||||||
|
value = v;
|
||||||
|
}
|
||||||
|
|
||||||
public String value() {
|
public String value() {
|
||||||
return name();
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Order fromValue(String v) {
|
@Override
|
||||||
return valueOf(v);
|
public String toString() {
|
||||||
|
return String.valueOf(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static StatusEnum fromValue(String v) {
|
||||||
|
for (StatusEnum b : StatusEnum.values()) {
|
||||||
|
if (String.valueOf(b.value).equals(v)) {
|
||||||
|
return b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private StatusEnum status = null;
|
private StatusEnum status = null;
|
||||||
private Boolean complete = false;
|
private Boolean complete = false;
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import io.swagger.model.Category;
|
|||||||
import io.swagger.model.Tag;
|
import io.swagger.model.Tag;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A pet for sale in the pet store
|
* A pet for sale in the pet store
|
||||||
@ -15,6 +15,9 @@ import java.util.List;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.*;
|
||||||
|
|
||||||
@ApiModel(description = "A pet for sale in the pet store")
|
@ApiModel(description = "A pet for sale in the pet store")
|
||||||
|
|
||||||
public class Pet {
|
public class Pet {
|
||||||
@ -25,22 +28,38 @@ public class Pet {
|
|||||||
private List<String> photoUrls = new ArrayList<String>();
|
private List<String> photoUrls = new ArrayList<String>();
|
||||||
private List<Tag> tags = new ArrayList<Tag>();
|
private List<Tag> tags = new ArrayList<Tag>();
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlEnum;
|
@XmlType(name="StatusEnum")
|
||||||
import javax.xml.bind.annotation.XmlType;
|
@XmlEnum(String.class)
|
||||||
|
public enum StatusEnum {
|
||||||
|
|
||||||
@XmlType(name="Pet")
|
@XmlEnumValue("available") AVAILABLE(String.valueOf("available")), @XmlEnumValue("pending") PENDING(String.valueOf("pending")), @XmlEnumValue("sold") SOLD(String.valueOf("sold"));
|
||||||
@XmlEnum
|
|
||||||
public enum Pet {
|
|
||||||
{values=[available, pending, sold], enumVars=[{name=AVAILABLE, value="available"}, {name=PENDING, value="pending"}, {name=SOLD, value="sold"}]},
|
private String value;
|
||||||
|
|
||||||
|
StatusEnum (String v) {
|
||||||
|
value = v;
|
||||||
|
}
|
||||||
|
|
||||||
public String value() {
|
public String value() {
|
||||||
return name();
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Pet fromValue(String v) {
|
@Override
|
||||||
return valueOf(v);
|
public String toString() {
|
||||||
|
return String.valueOf(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static StatusEnum fromValue(String v) {
|
||||||
|
for (StatusEnum b : StatusEnum.values()) {
|
||||||
|
if (String.valueOf(b.value).equals(v)) {
|
||||||
|
return b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private StatusEnum status = null;
|
private StatusEnum status = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -87,6 +106,7 @@ public enum Pet {
|
|||||||
|
|
||||||
@ApiModelProperty(example = "doggie", required = true, value = "")
|
@ApiModelProperty(example = "doggie", required = true, value = "")
|
||||||
@JsonProperty("name")
|
@JsonProperty("name")
|
||||||
|
@NotNull
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
@ -104,6 +124,7 @@ public enum Pet {
|
|||||||
|
|
||||||
@ApiModelProperty(example = "null", required = true, value = "")
|
@ApiModelProperty(example = "null", required = true, value = "")
|
||||||
@JsonProperty("photoUrls")
|
@JsonProperty("photoUrls")
|
||||||
|
@NotNull
|
||||||
public List<String> getPhotoUrls() {
|
public List<String> getPhotoUrls() {
|
||||||
return photoUrls;
|
return photoUrls;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ package io.swagger.model;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A tag for a pet
|
* A tag for a pet
|
||||||
@ -11,6 +11,9 @@ import io.swagger.annotations.ApiModel;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.*;
|
||||||
|
|
||||||
@ApiModel(description = "A tag for a pet")
|
@ApiModel(description = "A tag for a pet")
|
||||||
|
|
||||||
public class Tag {
|
public class Tag {
|
||||||
|
@ -3,7 +3,7 @@ package io.swagger.model;
|
|||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A User who is purchasing from the pet store
|
* A User who is purchasing from the pet store
|
||||||
@ -11,6 +11,9 @@ import io.swagger.annotations.ApiModel;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.*;
|
||||||
|
|
||||||
@ApiModel(description = "A User who is purchasing from the pet store")
|
@ApiModel(description = "A User who is purchasing from the pet store")
|
||||||
|
|
||||||
public class User {
|
public class User {
|
||||||
|
@ -18,7 +18,7 @@ import javax.ws.rs.core.Response;
|
|||||||
import javax.ws.rs.core.SecurityContext;
|
import javax.ws.rs.core.SecurityContext;
|
||||||
|
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJAXRSCXFCDIServerCodegen", date = "2016-11-17T08:53:42.205Z")
|
|
||||||
public class PetApiServiceImpl implements PetApiService {
|
public class PetApiServiceImpl implements PetApiService {
|
||||||
@Override
|
@Override
|
||||||
public Response addPet(Pet body, SecurityContext securityContext) {
|
public Response addPet(Pet body, SecurityContext securityContext) {
|
||||||
|
@ -17,7 +17,7 @@ import javax.ws.rs.core.Response;
|
|||||||
import javax.ws.rs.core.SecurityContext;
|
import javax.ws.rs.core.SecurityContext;
|
||||||
|
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJAXRSCXFCDIServerCodegen", date = "2016-11-17T08:53:42.205Z")
|
|
||||||
public class StoreApiServiceImpl implements StoreApiService {
|
public class StoreApiServiceImpl implements StoreApiService {
|
||||||
@Override
|
@Override
|
||||||
public Response deleteOrder(String orderId, SecurityContext securityContext) {
|
public Response deleteOrder(String orderId, SecurityContext securityContext) {
|
||||||
|
@ -17,7 +17,7 @@ import javax.ws.rs.core.Response;
|
|||||||
import javax.ws.rs.core.SecurityContext;
|
import javax.ws.rs.core.SecurityContext;
|
||||||
|
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJAXRSCXFCDIServerCodegen", date = "2016-11-17T08:53:42.205Z")
|
|
||||||
public class UserApiServiceImpl implements UserApiService {
|
public class UserApiServiceImpl implements UserApiService {
|
||||||
@Override
|
@Override
|
||||||
public Response createUser(User body, SecurityContext securityContext) {
|
public Response createUser(User body, SecurityContext securityContext) {
|
||||||
|
@ -375,8 +375,8 @@
|
|||||||
"description" : "ID of pet that needs to be fetched",
|
"description" : "ID of pet that needs to be fetched",
|
||||||
"required" : true,
|
"required" : true,
|
||||||
"type" : "integer",
|
"type" : "integer",
|
||||||
"maximum" : 5.0,
|
"maximum" : 5,
|
||||||
"minimum" : 1.0,
|
"minimum" : 1,
|
||||||
"format" : "int64"
|
"format" : "int64"
|
||||||
} ],
|
} ],
|
||||||
"responses" : {
|
"responses" : {
|
||||||
@ -405,8 +405,7 @@
|
|||||||
"in" : "path",
|
"in" : "path",
|
||||||
"description" : "ID of the order that needs to be deleted",
|
"description" : "ID of the order that needs to be deleted",
|
||||||
"required" : true,
|
"required" : true,
|
||||||
"type" : "string",
|
"type" : "string"
|
||||||
"minimum" : 1.0
|
|
||||||
} ],
|
} ],
|
||||||
"responses" : {
|
"responses" : {
|
||||||
"400" : {
|
"400" : {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user