forked from loafle/openapi-generator-original
add beanvalidation to jersey1 and jersey2 #4091
This commit is contained in:
parent
c94e18abd8
commit
1a1d0aebc8
@ -2242,7 +2242,7 @@ public class DefaultCodegen {
|
|||||||
p.jsonSchema = Json.pretty(param);
|
p.jsonSchema = Json.pretty(param);
|
||||||
|
|
||||||
if (System.getProperty("debugParser") != null) {
|
if (System.getProperty("debugParser") != null) {
|
||||||
LOGGER.info("working on Parameter " + param);
|
LOGGER.info("working on Parameter " + param.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
// move the defaultValue for headers, forms and params
|
// move the defaultValue for headers, forms and params
|
||||||
@ -2271,7 +2271,7 @@ public class DefaultCodegen {
|
|||||||
String collectionFormat = null;
|
String collectionFormat = null;
|
||||||
String type = qp.getType();
|
String type = qp.getType();
|
||||||
if (null == type) {
|
if (null == type) {
|
||||||
LOGGER.warn("Type is NULL for Serializable Parameter: " + param);
|
LOGGER.warn("Type is NULL for Serializable Parameter: " + param.getName());
|
||||||
}
|
}
|
||||||
if ("array".equals(type)) { // for array parameter
|
if ("array".equals(type)) { // for array parameter
|
||||||
Property inner = qp.getItems();
|
Property inner = qp.getItems();
|
||||||
|
@ -1000,5 +1000,18 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
|||||||
public String toRegularExpression(String pattern) {
|
public String toRegularExpression(String pattern) {
|
||||||
return escapeText(pattern);
|
return escapeText(pattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean convertPropertyToBoolean(String propertyKey) {
|
||||||
|
boolean booleanValue = false;
|
||||||
|
if (additionalProperties.containsKey(propertyKey)) {
|
||||||
|
booleanValue = Boolean.valueOf(additionalProperties.get(propertyKey).toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
return booleanValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void writePropertyBack(String propertyKey, boolean value) {
|
||||||
|
additionalProperties.put(propertyKey, value);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package io.swagger.codegen.languages;
|
package io.swagger.codegen.languages;
|
||||||
|
|
||||||
import io.swagger.codegen.*;
|
import io.swagger.codegen.*;
|
||||||
|
import io.swagger.codegen.languages.features.BeanValidationFeatures;
|
||||||
import io.swagger.models.Operation;
|
import io.swagger.models.Operation;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -8,11 +9,12 @@ import java.util.*;
|
|||||||
import org.apache.commons.lang3.BooleanUtils;
|
import org.apache.commons.lang3.BooleanUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
public class JavaJerseyServerCodegen extends AbstractJavaJAXRSServerCodegen {
|
public class JavaJerseyServerCodegen extends AbstractJavaJAXRSServerCodegen implements BeanValidationFeatures {
|
||||||
|
|
||||||
protected static final String LIBRARY_JERSEY1 = "jersey1";
|
protected static final String LIBRARY_JERSEY1 = "jersey1";
|
||||||
protected static final String LIBRARY_JERSEY2 = "jersey2";
|
protected static final String LIBRARY_JERSEY2 = "jersey2";
|
||||||
|
protected boolean useBeanValidation = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default library template to use. (Default:{@value #DEFAULT_LIBRARY})
|
* Default library template to use. (Default:{@value #DEFAULT_LIBRARY})
|
||||||
*/
|
*/
|
||||||
@ -45,6 +47,7 @@ public class JavaJerseyServerCodegen extends AbstractJavaJAXRSServerCodegen {
|
|||||||
|
|
||||||
cliOptions.add(library);
|
cliOptions.add(library);
|
||||||
cliOptions.add(CliOption.newBoolean(SUPPORT_JAVA6, "Whether to support Java6 with the Jersey1/2 library."));
|
cliOptions.add(CliOption.newBoolean(SUPPORT_JAVA6, "Whether to support Java6 with the Jersey1/2 library."));
|
||||||
|
cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -84,6 +87,14 @@ public class JavaJerseyServerCodegen extends AbstractJavaJAXRSServerCodegen {
|
|||||||
if (StringUtils.isEmpty(library)) {
|
if (StringUtils.isEmpty(library)) {
|
||||||
setLibrary(DEFAULT_LIBRARY);
|
setLibrary(DEFAULT_LIBRARY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (additionalProperties.containsKey(USE_BEANVALIDATION)) {
|
||||||
|
this.setUseBeanValidation(convertPropertyToBoolean(USE_BEANVALIDATION));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (useBeanValidation) {
|
||||||
|
writePropertyBack(USE_BEANVALIDATION, useBeanValidation);
|
||||||
|
}
|
||||||
|
|
||||||
if ( additionalProperties.containsKey(CodegenConstants.IMPL_FOLDER)) {
|
if ( additionalProperties.containsKey(CodegenConstants.IMPL_FOLDER)) {
|
||||||
implFolder = (String) additionalProperties.get(CodegenConstants.IMPL_FOLDER);
|
implFolder = (String) additionalProperties.get(CodegenConstants.IMPL_FOLDER);
|
||||||
@ -160,5 +171,9 @@ public class JavaJerseyServerCodegen extends AbstractJavaJAXRSServerCodegen {
|
|||||||
opList.add(co);
|
opList.add(co);
|
||||||
co.baseName = basePath;
|
co.baseName = basePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setUseBeanValidation(boolean useBeanValidation) {
|
||||||
|
this.useBeanValidation = useBeanValidation;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,9 @@ import javax.ws.rs.core.Context;
|
|||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.SecurityContext;
|
import javax.ws.rs.core.SecurityContext;
|
||||||
import javax.ws.rs.*;
|
import javax.ws.rs.*;
|
||||||
|
{{#useBeanValidation}}
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
{{/useBeanValidation}}
|
||||||
|
|
||||||
@Path("/{{baseName}}")
|
@Path("/{{baseName}}")
|
||||||
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
|
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
|
||||||
|
@ -0,0 +1,42 @@
|
|||||||
|
{{#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}}
|
||||||
|
{{#minimum}}
|
||||||
|
@Min({{minimum}})
|
||||||
|
{{/minimum}}
|
||||||
|
{{#maximum}}
|
||||||
|
@Max({{maximum}})
|
||||||
|
{{/maximum}}
|
@ -0,0 +1 @@
|
|||||||
|
{{! PathParam is always required, no @NotNull necessary }}{{#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}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}}
|
@ -0,0 +1 @@
|
|||||||
|
{{#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}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}}
|
@ -8,6 +8,9 @@ import io.swagger.annotations.ApiParam;
|
|||||||
import io.swagger.jaxrs.*;
|
import io.swagger.jaxrs.*;
|
||||||
|
|
||||||
import com.sun.jersey.multipart.FormDataParam;
|
import com.sun.jersey.multipart.FormDataParam;
|
||||||
|
{{#useBeanValidation}}
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
{{/useBeanValidation}}
|
||||||
|
|
||||||
{{#imports}}import {{import}};
|
{{#imports}}import {{import}};
|
||||||
{{/imports}}
|
{{/imports}}
|
||||||
|
@ -158,6 +158,15 @@
|
|||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</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>
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
|
@ -13,6 +13,9 @@ import org.apache.commons.lang3.ObjectUtils;
|
|||||||
{{#serializableModel}}
|
{{#serializableModel}}
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
{{/serializableModel}}
|
{{/serializableModel}}
|
||||||
|
{{#useBeanValidation}}
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
{{/useBeanValidation}}
|
||||||
|
|
||||||
{{#models}}
|
{{#models}}
|
||||||
{{#model}}
|
{{#model}}
|
||||||
|
@ -67,7 +67,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
|
|||||||
{{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}}}")
|
||||||
public {{{datatypeWithEnum}}} {{getter}}() {
|
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() {
|
||||||
return {{name}};
|
return {{name}};
|
||||||
}
|
}
|
||||||
{{^isReadOnly}}
|
{{^isReadOnly}}
|
||||||
|
@ -153,6 +153,16 @@
|
|||||||
<version>${commons_io_version}</version>
|
<version>${commons_io_version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
{{/supportJava6}}
|
{{/supportJava6}}
|
||||||
|
|
||||||
|
{{#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>
|
||||||
<repositories>
|
<repositories>
|
||||||
|
@ -1 +1 @@
|
|||||||
{{#isPathParam}}{{{dataType}}} {{paramName}}{{/isPathParam}}
|
{{#isPathParam}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{/isPathParam}}
|
@ -1 +1 @@
|
|||||||
{{#isQueryParam}}{{{dataType}}} {{paramName}}{{/isQueryParam}}
|
{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{/isQueryParam}}
|
@ -47,7 +47,7 @@
|
|||||||
{{#hasOnlyReadOnly}}
|
{{#hasOnlyReadOnly}}
|
||||||
[JsonConstructorAttribute]
|
[JsonConstructorAttribute]
|
||||||
{{/hasOnlyReadOnly}}
|
{{/hasOnlyReadOnly}}
|
||||||
public {{classname}}({{#readWriteVars}}{{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}?{{/isContainer}}{{/isEnum}} {{name}} = null{{^-last}}, {{/-last}}{{/readWriteVars}})
|
public {{classname}}({{#readWriteVars}}{{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}?{{/isContainer}}{{/isEnum}} {{name}} = {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}default({{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}?{{/isContainer}}{{/isEnum}}){{/defaultValue}}{{^-last}}, {{/-last}}{{/readWriteVars}})
|
||||||
{
|
{
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
{{^isReadOnly}}
|
{{^isReadOnly}}
|
||||||
|
@ -8,9 +8,9 @@ import io.swagger.annotations.ApiParam;
|
|||||||
import io.swagger.jaxrs.*;
|
import io.swagger.jaxrs.*;
|
||||||
|
|
||||||
import com.sun.jersey.multipart.FormDataParam;
|
import com.sun.jersey.multipart.FormDataParam;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import io.swagger.model.ModelApiResponse;
|
|
||||||
import io.swagger.model.Pet;
|
import io.swagger.model.Pet;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -37,7 +37,7 @@ public class PetApi {
|
|||||||
@POST
|
@POST
|
||||||
|
|
||||||
@Consumes({ "application/json", "application/xml" })
|
@Consumes({ "application/json", "application/xml" })
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = void.class, authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = void.class, authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@ -47,7 +47,7 @@ public class PetApi {
|
|||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = void.class) })
|
||||||
public Response addPet(
|
public Response addPet(
|
||||||
@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body,
|
@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body,
|
||||||
@Context SecurityContext securityContext)
|
@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.addPet(body,securityContext);
|
return delegate.addPet(body,securityContext);
|
||||||
@ -55,7 +55,7 @@ public class PetApi {
|
|||||||
@DELETE
|
@DELETE
|
||||||
@Path("/{petId}")
|
@Path("/{petId}")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = void.class, authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = void.class, authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@ -74,7 +74,7 @@ public class PetApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/findByStatus")
|
@Path("/findByStatus")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@ -85,7 +85,7 @@ public class PetApi {
|
|||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Pet.class, responseContainer = "List") })
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Pet.class, responseContainer = "List") })
|
||||||
public Response findPetsByStatus(
|
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,
|
@ApiParam(value = "Status values that need to be considered for filter", allowableValues="available, pending, sold", defaultValue="available") @DefaultValue("available") @QueryParam("status") List<String> status,
|
||||||
@Context SecurityContext securityContext)
|
@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.findPetsByStatus(status,securityContext);
|
return delegate.findPetsByStatus(status,securityContext);
|
||||||
@ -93,7 +93,7 @@ public class PetApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/findByTags")
|
@Path("/findByTags")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@ -104,7 +104,7 @@ public class PetApi {
|
|||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class, responseContainer = "List") })
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class, responseContainer = "List") })
|
||||||
public Response findPetsByTags(
|
public Response findPetsByTags(
|
||||||
@ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List<String> tags,
|
@ApiParam(value = "Tags to filter by") @QueryParam("tags") List<String> tags,
|
||||||
@Context SecurityContext securityContext)
|
@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.findPetsByTags(tags,securityContext);
|
return delegate.findPetsByTags(tags,securityContext);
|
||||||
@ -112,8 +112,12 @@ public class PetApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/{petId}")
|
@Path("/{petId}")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions", response = Pet.class, authorizations = {
|
||||||
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
|
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||||
|
}),
|
||||||
@io.swagger.annotations.Authorization(value = "api_key")
|
@io.swagger.annotations.Authorization(value = "api_key")
|
||||||
}, tags={ "pet", })
|
}, tags={ "pet", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@ -121,7 +125,7 @@ public class PetApi {
|
|||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class),
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class),
|
||||||
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Pet.class) })
|
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Pet.class) })
|
||||||
public Response getPetById(
|
public Response getPetById(
|
||||||
@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId,
|
@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("petId") Long petId,
|
||||||
@Context SecurityContext securityContext)
|
@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.getPetById(petId,securityContext);
|
return delegate.getPetById(petId,securityContext);
|
||||||
@ -129,7 +133,7 @@ public class PetApi {
|
|||||||
@PUT
|
@PUT
|
||||||
|
|
||||||
@Consumes({ "application/json", "application/xml" })
|
@Consumes({ "application/json", "application/xml" })
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = void.class, authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = void.class, authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@ -141,7 +145,7 @@ public class PetApi {
|
|||||||
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = void.class),
|
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = void.class),
|
||||||
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = void.class) })
|
||||||
public Response updatePet(
|
public Response updatePet(
|
||||||
@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body,
|
@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body,
|
||||||
@Context SecurityContext securityContext)
|
@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.updatePet(body,securityContext);
|
return delegate.updatePet(body,securityContext);
|
||||||
@ -149,7 +153,7 @@ public class PetApi {
|
|||||||
@POST
|
@POST
|
||||||
@Path("/{petId}")
|
@Path("/{petId}")
|
||||||
@Consumes({ "application/x-www-form-urlencoded" })
|
@Consumes({ "application/x-www-form-urlencoded" })
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = void.class, authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = void.class, authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@ -159,7 +163,7 @@ public class PetApi {
|
|||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = void.class) })
|
||||||
public Response updatePetWithForm(
|
public Response updatePetWithForm(
|
||||||
@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId,
|
@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") String petId,
|
||||||
@ApiParam(value = "Updated name of the pet") @FormParam("name") String name,
|
@ApiParam(value = "Updated name of the pet") @FormParam("name") String name,
|
||||||
@ApiParam(value = "Updated status of the pet") @FormParam("status") String status,
|
@ApiParam(value = "Updated status of the pet") @FormParam("status") String status,
|
||||||
@Context SecurityContext securityContext)
|
@Context SecurityContext securityContext)
|
||||||
@ -169,15 +173,15 @@ public class PetApi {
|
|||||||
@POST
|
@POST
|
||||||
@Path("/{petId}/uploadImage")
|
@Path("/{petId}/uploadImage")
|
||||||
@Consumes({ "multipart/form-data" })
|
@Consumes({ "multipart/form-data" })
|
||||||
@Produces({ "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = void.class, authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||||
})
|
})
|
||||||
}, tags={ "pet" })
|
}, tags={ "pet" })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
||||||
public Response uploadFile(
|
public Response uploadFile(
|
||||||
@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId,
|
@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId,
|
||||||
@FormDataParam("additionalMetadata") String additionalMetadata,
|
@FormDataParam("additionalMetadata") String additionalMetadata,
|
||||||
|
@ -6,7 +6,6 @@ import io.swagger.model.*;
|
|||||||
import com.sun.jersey.multipart.FormDataParam;
|
import com.sun.jersey.multipart.FormDataParam;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import io.swagger.model.ModelApiResponse;
|
|
||||||
import io.swagger.model.Pet;
|
import io.swagger.model.Pet;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -26,15 +25,15 @@ public abstract class PetApiService {
|
|||||||
throws NotFoundException;
|
throws NotFoundException;
|
||||||
public abstract Response deletePet(Long petId,String apiKey,SecurityContext securityContext)
|
public abstract Response deletePet(Long petId,String apiKey,SecurityContext securityContext)
|
||||||
throws NotFoundException;
|
throws NotFoundException;
|
||||||
public abstract Response findPetsByStatus(List<String> status,SecurityContext securityContext)
|
public abstract Response findPetsByStatus( List<String> status,SecurityContext securityContext)
|
||||||
throws NotFoundException;
|
throws NotFoundException;
|
||||||
public abstract Response findPetsByTags(List<String> tags,SecurityContext securityContext)
|
public abstract Response findPetsByTags( List<String> tags,SecurityContext securityContext)
|
||||||
throws NotFoundException;
|
throws NotFoundException;
|
||||||
public abstract Response getPetById(Long petId,SecurityContext securityContext)
|
public abstract Response getPetById(Long petId,SecurityContext securityContext)
|
||||||
throws NotFoundException;
|
throws NotFoundException;
|
||||||
public abstract Response updatePet(Pet body,SecurityContext securityContext)
|
public abstract Response updatePet(Pet body,SecurityContext securityContext)
|
||||||
throws NotFoundException;
|
throws NotFoundException;
|
||||||
public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext)
|
public abstract Response updatePetWithForm(String petId,String name,String status,SecurityContext securityContext)
|
||||||
throws NotFoundException;
|
throws NotFoundException;
|
||||||
public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext)
|
public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext)
|
||||||
throws NotFoundException;
|
throws NotFoundException;
|
||||||
|
@ -8,6 +8,7 @@ import io.swagger.annotations.ApiParam;
|
|||||||
import io.swagger.jaxrs.*;
|
import io.swagger.jaxrs.*;
|
||||||
|
|
||||||
import com.sun.jersey.multipart.FormDataParam;
|
import com.sun.jersey.multipart.FormDataParam;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import io.swagger.model.Order;
|
import io.swagger.model.Order;
|
||||||
@ -36,7 +37,7 @@ public class StoreApi {
|
|||||||
@DELETE
|
@DELETE
|
||||||
@Path("/order/{orderId}")
|
@Path("/order/{orderId}")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = void.class, tags={ "store", })
|
@io.swagger.annotations.ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = void.class, tags={ "store", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class),
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class),
|
||||||
@ -50,7 +51,7 @@ public class StoreApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/inventory")
|
@Path("/inventory")
|
||||||
|
|
||||||
@Produces({ "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "api_key")
|
@io.swagger.annotations.Authorization(value = "api_key")
|
||||||
}, tags={ "store", })
|
}, tags={ "store", })
|
||||||
@ -64,14 +65,14 @@ public class StoreApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/order/{orderId}")
|
@Path("/order/{orderId}")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", })
|
@io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class),
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class),
|
||||||
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Order.class) })
|
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Order.class) })
|
||||||
public Response getOrderById(
|
public Response getOrderById(
|
||||||
@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") Long orderId,
|
@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") String orderId,
|
||||||
@Context SecurityContext securityContext)
|
@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.getOrderById(orderId,securityContext);
|
return delegate.getOrderById(orderId,securityContext);
|
||||||
@ -79,13 +80,13 @@ public class StoreApi {
|
|||||||
@POST
|
@POST
|
||||||
@Path("/order")
|
@Path("/order")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store" })
|
@io.swagger.annotations.ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store" })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Order.class) })
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Order.class) })
|
||||||
public Response placeOrder(
|
public Response placeOrder(
|
||||||
@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body,
|
@ApiParam(value = "order placed for purchasing the pet" ) Order body,
|
||||||
@Context SecurityContext securityContext)
|
@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.placeOrder(body,securityContext);
|
return delegate.placeOrder(body,securityContext);
|
||||||
|
@ -25,7 +25,7 @@ public abstract class StoreApiService {
|
|||||||
throws NotFoundException;
|
throws NotFoundException;
|
||||||
public abstract Response getInventory(SecurityContext securityContext)
|
public abstract Response getInventory(SecurityContext securityContext)
|
||||||
throws NotFoundException;
|
throws NotFoundException;
|
||||||
public abstract Response getOrderById(Long orderId,SecurityContext securityContext)
|
public abstract Response getOrderById(String orderId,SecurityContext securityContext)
|
||||||
throws NotFoundException;
|
throws NotFoundException;
|
||||||
public abstract Response placeOrder(Order body,SecurityContext securityContext)
|
public abstract Response placeOrder(Order body,SecurityContext securityContext)
|
||||||
throws NotFoundException;
|
throws NotFoundException;
|
||||||
|
@ -8,6 +8,7 @@ import io.swagger.annotations.ApiParam;
|
|||||||
import io.swagger.jaxrs.*;
|
import io.swagger.jaxrs.*;
|
||||||
|
|
||||||
import com.sun.jersey.multipart.FormDataParam;
|
import com.sun.jersey.multipart.FormDataParam;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import io.swagger.model.User;
|
import io.swagger.model.User;
|
||||||
@ -36,12 +37,12 @@ public class UserApi {
|
|||||||
@POST
|
@POST
|
||||||
|
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
||||||
public Response createUser(
|
public Response createUser(
|
||||||
@ApiParam(value = "Created user object" ,required=true) User body,
|
@ApiParam(value = "Created user object" ) User body,
|
||||||
@Context SecurityContext securityContext)
|
@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.createUser(body,securityContext);
|
return delegate.createUser(body,securityContext);
|
||||||
@ -49,12 +50,12 @@ public class UserApi {
|
|||||||
@POST
|
@POST
|
||||||
@Path("/createWithArray")
|
@Path("/createWithArray")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
||||||
public Response createUsersWithArrayInput(
|
public Response createUsersWithArrayInput(
|
||||||
@ApiParam(value = "List of user object" ,required=true) List<User> body,
|
@ApiParam(value = "List of user object" ) List<User> body,
|
||||||
@Context SecurityContext securityContext)
|
@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.createUsersWithArrayInput(body,securityContext);
|
return delegate.createUsersWithArrayInput(body,securityContext);
|
||||||
@ -62,12 +63,12 @@ public class UserApi {
|
|||||||
@POST
|
@POST
|
||||||
@Path("/createWithList")
|
@Path("/createWithList")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
||||||
public Response createUsersWithListInput(
|
public Response createUsersWithListInput(
|
||||||
@ApiParam(value = "List of user object" ,required=true) List<User> body,
|
@ApiParam(value = "List of user object" ) List<User> body,
|
||||||
@Context SecurityContext securityContext)
|
@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.createUsersWithListInput(body,securityContext);
|
return delegate.createUsersWithListInput(body,securityContext);
|
||||||
@ -75,7 +76,7 @@ public class UserApi {
|
|||||||
@DELETE
|
@DELETE
|
||||||
@Path("/{username}")
|
@Path("/{username}")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = void.class),
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = void.class),
|
||||||
@ -89,7 +90,7 @@ public class UserApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/{username}")
|
@Path("/{username}")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = User.class),
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = User.class),
|
||||||
@ -104,14 +105,14 @@ public class UserApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/login")
|
@Path("/login")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class),
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class),
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = String.class) })
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = String.class) })
|
||||||
public Response loginUser(
|
public Response loginUser(
|
||||||
@ApiParam(value = "The user name for login",required=true) @QueryParam("username") String username,
|
@ApiParam(value = "The user name for login") @QueryParam("username") String username,
|
||||||
@ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password,
|
@ApiParam(value = "The password for login in clear text") @QueryParam("password") String password,
|
||||||
@Context SecurityContext securityContext)
|
@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.loginUser(username,password,securityContext);
|
return delegate.loginUser(username,password,securityContext);
|
||||||
@ -119,7 +120,7 @@ public class UserApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/logout")
|
@Path("/logout")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Logs out current logged in user session", notes = "", response = void.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Logs out current logged in user session", notes = "", response = void.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
||||||
@ -131,14 +132,14 @@ public class UserApi {
|
|||||||
@PUT
|
@PUT
|
||||||
@Path("/{username}")
|
@Path("/{username}")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user" })
|
@io.swagger.annotations.ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user" })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = void.class),
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = void.class),
|
||||||
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = void.class) })
|
||||||
public Response updateUser(
|
public Response updateUser(
|
||||||
@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username,
|
@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username,
|
||||||
@ApiParam(value = "Updated user object" ,required=true) User body,
|
@ApiParam(value = "Updated user object" ) User body,
|
||||||
@Context SecurityContext securityContext)
|
@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.updateUser(username,body,securityContext);
|
return delegate.updateUser(username,body,securityContext);
|
||||||
|
@ -31,7 +31,7 @@ public abstract class UserApiService {
|
|||||||
throws NotFoundException;
|
throws NotFoundException;
|
||||||
public abstract Response getUserByName(String username,SecurityContext securityContext)
|
public abstract Response getUserByName(String username,SecurityContext securityContext)
|
||||||
throws NotFoundException;
|
throws NotFoundException;
|
||||||
public abstract Response loginUser(String username,String password,SecurityContext securityContext)
|
public abstract Response loginUser( String username, String password,SecurityContext securityContext)
|
||||||
throws NotFoundException;
|
throws NotFoundException;
|
||||||
public abstract Response logoutUser(SecurityContext securityContext)
|
public abstract Response logoutUser(SecurityContext securityContext)
|
||||||
throws NotFoundException;
|
throws NotFoundException;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Swagger Petstore
|
* Swagger Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@wordnik.com
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -18,6 +18,7 @@ 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 io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Category
|
* Category
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Swagger Petstore
|
* Swagger Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@wordnik.com
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -20,6 +20,7 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Order
|
* Order
|
||||||
@ -75,7 +76,7 @@ public class Order {
|
|||||||
private StatusEnum status = null;
|
private StatusEnum status = null;
|
||||||
|
|
||||||
@JsonProperty("complete")
|
@JsonProperty("complete")
|
||||||
private Boolean complete = false;
|
private Boolean complete = null;
|
||||||
|
|
||||||
public Order id(Long id) {
|
public Order id(Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Swagger Petstore
|
* Swagger Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@wordnik.com
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -23,6 +23,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.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pet
|
* Pet
|
||||||
@ -126,6 +127,7 @@ public class Pet {
|
|||||||
* @return name
|
* @return name
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(example = "doggie", required = true, value = "")
|
@ApiModelProperty(example = "doggie", required = true, value = "")
|
||||||
|
@NotNull
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
@ -149,6 +151,7 @@ public class Pet {
|
|||||||
* @return photoUrls
|
* @return photoUrls
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
|
@NotNull
|
||||||
public List<String> getPhotoUrls() {
|
public List<String> getPhotoUrls() {
|
||||||
return photoUrls;
|
return photoUrls;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Swagger Petstore
|
* Swagger Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@wordnik.com
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -18,6 +18,7 @@ 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 io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tag
|
* Tag
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Swagger Petstore
|
* Swagger Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@wordnik.com
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -18,6 +18,7 @@ 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 io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User
|
* User
|
||||||
|
@ -6,7 +6,6 @@ import io.swagger.model.*;
|
|||||||
import com.sun.jersey.multipart.FormDataParam;
|
import com.sun.jersey.multipart.FormDataParam;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import io.swagger.model.ModelApiResponse;
|
|
||||||
import io.swagger.model.Pet;
|
import io.swagger.model.Pet;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -35,13 +34,13 @@ public class PetApiServiceImpl extends PetApiService {
|
|||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Response findPetsByStatus(List<String> status, SecurityContext securityContext)
|
public Response findPetsByStatus( List<String> status, SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Response findPetsByTags(List<String> tags, SecurityContext securityContext)
|
public Response findPetsByTags( List<String> tags, SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
@ -59,7 +58,7 @@ public class PetApiServiceImpl extends PetApiService {
|
|||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Response updatePetWithForm(Long petId, String name, String status, SecurityContext securityContext)
|
public Response updatePetWithForm(String petId, String name, String status, SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
|
@ -34,7 +34,7 @@ public class StoreApiServiceImpl extends StoreApiService {
|
|||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Response getOrderById(Long orderId, SecurityContext securityContext)
|
public Response getOrderById(String orderId, SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
|
@ -52,7 +52,7 @@ public class UserApiServiceImpl extends UserApiService {
|
|||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Response loginUser(String username, String password, SecurityContext securityContext)
|
public Response loginUser( String username, String password, SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
|
@ -8,7 +8,6 @@ import io.swagger.annotations.ApiParam;
|
|||||||
import io.swagger.jaxrs.*;
|
import io.swagger.jaxrs.*;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import io.swagger.model.ModelApiResponse;
|
|
||||||
import io.swagger.model.Pet;
|
import io.swagger.model.Pet;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -23,6 +22,7 @@ import javax.ws.rs.core.Context;
|
|||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.SecurityContext;
|
import javax.ws.rs.core.SecurityContext;
|
||||||
import javax.ws.rs.*;
|
import javax.ws.rs.*;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
@Path("/pet")
|
@Path("/pet")
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ public class PetApi {
|
|||||||
@POST
|
@POST
|
||||||
|
|
||||||
@Consumes({ "application/json", "application/xml" })
|
@Consumes({ "application/json", "application/xml" })
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = void.class, authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = void.class, authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@ -44,7 +44,7 @@ public class PetApi {
|
|||||||
}, tags={ "pet", })
|
}, tags={ "pet", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = void.class) })
|
||||||
public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body
|
public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.addPet(body,securityContext);
|
return delegate.addPet(body,securityContext);
|
||||||
@ -52,7 +52,7 @@ public class PetApi {
|
|||||||
@DELETE
|
@DELETE
|
||||||
@Path("/{petId}")
|
@Path("/{petId}")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = void.class, authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = void.class, authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@ -70,7 +70,7 @@ public class PetApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/findByStatus")
|
@Path("/findByStatus")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@ -81,7 +81,7 @@ public class PetApi {
|
|||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
||||||
|
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Pet.class, responseContainer = "List") })
|
@io.swagger.annotations.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(@ApiParam(value = "Status values that need to be considered for filter", allowableValues="available, pending, sold", defaultValue="available") @DefaultValue("available") @QueryParam("status") List<String> status
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.findPetsByStatus(status,securityContext);
|
return delegate.findPetsByStatus(status,securityContext);
|
||||||
@ -89,7 +89,7 @@ public class PetApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/findByTags")
|
@Path("/findByTags")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@ -100,7 +100,7 @@ public class PetApi {
|
|||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
||||||
|
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class, responseContainer = "List") })
|
@io.swagger.annotations.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(@ApiParam(value = "Tags to filter by") @QueryParam("tags") List<String> tags
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.findPetsByTags(tags,securityContext);
|
return delegate.findPetsByTags(tags,securityContext);
|
||||||
@ -108,8 +108,12 @@ public class PetApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/{petId}")
|
@Path("/{petId}")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions", response = Pet.class, authorizations = {
|
||||||
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
|
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||||
|
}),
|
||||||
@io.swagger.annotations.Authorization(value = "api_key")
|
@io.swagger.annotations.Authorization(value = "api_key")
|
||||||
}, tags={ "pet", })
|
}, tags={ "pet", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@ -118,7 +122,7 @@ public class PetApi {
|
|||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class),
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class),
|
||||||
|
|
||||||
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Pet.class) })
|
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Pet.class) })
|
||||||
public Response getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId
|
public Response getPetById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("petId") Long petId
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.getPetById(petId,securityContext);
|
return delegate.getPetById(petId,securityContext);
|
||||||
@ -126,7 +130,7 @@ public class PetApi {
|
|||||||
@PUT
|
@PUT
|
||||||
|
|
||||||
@Consumes({ "application/json", "application/xml" })
|
@Consumes({ "application/json", "application/xml" })
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = void.class, authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = void.class, authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@ -139,7 +143,7 @@ public class PetApi {
|
|||||||
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = void.class),
|
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = void.class),
|
||||||
|
|
||||||
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = void.class) })
|
||||||
public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body
|
public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.updatePet(body,securityContext);
|
return delegate.updatePet(body,securityContext);
|
||||||
@ -147,7 +151,7 @@ public class PetApi {
|
|||||||
@POST
|
@POST
|
||||||
@Path("/{petId}")
|
@Path("/{petId}")
|
||||||
@Consumes({ "application/x-www-form-urlencoded" })
|
@Consumes({ "application/x-www-form-urlencoded" })
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = void.class, authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = void.class, authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@ -156,7 +160,7 @@ public class PetApi {
|
|||||||
}, tags={ "pet", })
|
}, tags={ "pet", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = void.class) })
|
||||||
public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId
|
public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") String petId
|
||||||
,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name
|
,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name
|
||||||
,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status
|
,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
@ -166,15 +170,15 @@ public class PetApi {
|
|||||||
@POST
|
@POST
|
||||||
@Path("/{petId}/uploadImage")
|
@Path("/{petId}/uploadImage")
|
||||||
@Consumes({ "multipart/form-data" })
|
@Consumes({ "multipart/form-data" })
|
||||||
@Produces({ "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = void.class, authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||||
})
|
})
|
||||||
}, tags={ "pet", })
|
}, tags={ "pet", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
||||||
public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId
|
public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId
|
||||||
,@ApiParam(value = "Additional data to pass to server")@FormDataParam("additionalMetadata") String additionalMetadata
|
,@ApiParam(value = "Additional data to pass to server")@FormDataParam("additionalMetadata") String additionalMetadata
|
||||||
,
|
,
|
||||||
|
@ -6,7 +6,6 @@ import io.swagger.model.*;
|
|||||||
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
|
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import io.swagger.model.ModelApiResponse;
|
|
||||||
import io.swagger.model.Pet;
|
import io.swagger.model.Pet;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -21,10 +20,10 @@ import javax.ws.rs.core.SecurityContext;
|
|||||||
public abstract class PetApiService {
|
public abstract class PetApiService {
|
||||||
public abstract Response addPet(Pet body,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response addPet(Pet body,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response deletePet(Long petId,String apiKey,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response deletePet(Long petId,String apiKey,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response findPetsByStatus(List<String> status,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response findPetsByStatus( List<String> status,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response findPetsByTags(List<String> tags,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response findPetsByTags( List<String> tags,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response getPetById(Long petId,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response getPetById(Long petId,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response updatePet(Pet body,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response updatePet(Pet body,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response updatePetWithForm(String petId,String name,String status,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException;
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ import javax.ws.rs.core.Context;
|
|||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.SecurityContext;
|
import javax.ws.rs.core.SecurityContext;
|
||||||
import javax.ws.rs.*;
|
import javax.ws.rs.*;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
@Path("/store")
|
@Path("/store")
|
||||||
|
|
||||||
@ -34,7 +35,7 @@ public class StoreApi {
|
|||||||
@DELETE
|
@DELETE
|
||||||
@Path("/order/{orderId}")
|
@Path("/order/{orderId}")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = void.class, tags={ "store", })
|
@io.swagger.annotations.ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = void.class, tags={ "store", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class),
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class),
|
||||||
@ -48,7 +49,7 @@ public class StoreApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/inventory")
|
@Path("/inventory")
|
||||||
|
|
||||||
@Produces({ "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "api_key")
|
@io.swagger.annotations.Authorization(value = "api_key")
|
||||||
}, tags={ "store", })
|
}, tags={ "store", })
|
||||||
@ -61,7 +62,7 @@ public class StoreApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/order/{orderId}")
|
@Path("/order/{orderId}")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", })
|
@io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||||
@ -69,7 +70,7 @@ public class StoreApi {
|
|||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class),
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class),
|
||||||
|
|
||||||
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Order.class) })
|
@io.swagger.annotations.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(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") String orderId
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.getOrderById(orderId,securityContext);
|
return delegate.getOrderById(orderId,securityContext);
|
||||||
@ -77,13 +78,13 @@ public class StoreApi {
|
|||||||
@POST
|
@POST
|
||||||
@Path("/order")
|
@Path("/order")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", })
|
@io.swagger.annotations.ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||||
|
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Order.class) })
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Order.class) })
|
||||||
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body
|
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ) Order body
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.placeOrder(body,securityContext);
|
return delegate.placeOrder(body,securityContext);
|
||||||
|
@ -20,6 +20,6 @@ import javax.ws.rs.core.SecurityContext;
|
|||||||
public abstract class StoreApiService {
|
public abstract class StoreApiService {
|
||||||
public abstract Response deleteOrder(String orderId,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response deleteOrder(String orderId,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response getInventory(SecurityContext securityContext) throws NotFoundException;
|
public abstract Response getInventory(SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response getOrderById(Long orderId,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response getOrderById(String orderId,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response placeOrder(Order body,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response placeOrder(Order body,SecurityContext securityContext) throws NotFoundException;
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ import javax.ws.rs.core.Context;
|
|||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.SecurityContext;
|
import javax.ws.rs.core.SecurityContext;
|
||||||
import javax.ws.rs.*;
|
import javax.ws.rs.*;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
@Path("/user")
|
@Path("/user")
|
||||||
|
|
||||||
@ -34,11 +35,11 @@ public class UserApi {
|
|||||||
@POST
|
@POST
|
||||||
|
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
||||||
public Response createUser(@ApiParam(value = "Created user object" ,required=true) User body
|
public Response createUser(@ApiParam(value = "Created user object" ) User body
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.createUser(body,securityContext);
|
return delegate.createUser(body,securityContext);
|
||||||
@ -46,11 +47,11 @@ public class UserApi {
|
|||||||
@POST
|
@POST
|
||||||
@Path("/createWithArray")
|
@Path("/createWithArray")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
||||||
public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) List<User> body
|
public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ) List<User> body
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.createUsersWithArrayInput(body,securityContext);
|
return delegate.createUsersWithArrayInput(body,securityContext);
|
||||||
@ -58,11 +59,11 @@ public class UserApi {
|
|||||||
@POST
|
@POST
|
||||||
@Path("/createWithList")
|
@Path("/createWithList")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
||||||
public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) List<User> body
|
public Response createUsersWithListInput(@ApiParam(value = "List of user object" ) List<User> body
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.createUsersWithListInput(body,securityContext);
|
return delegate.createUsersWithListInput(body,securityContext);
|
||||||
@ -70,7 +71,7 @@ public class UserApi {
|
|||||||
@DELETE
|
@DELETE
|
||||||
@Path("/{username}")
|
@Path("/{username}")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = void.class),
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = void.class),
|
||||||
@ -84,7 +85,7 @@ public class UserApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/{username}")
|
@Path("/{username}")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = User.class),
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = User.class),
|
||||||
@ -100,14 +101,14 @@ public class UserApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/login")
|
@Path("/login")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class),
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class),
|
||||||
|
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = String.class) })
|
@io.swagger.annotations.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
|
public Response loginUser(@ApiParam(value = "The user name for login") @QueryParam("username") String username
|
||||||
,@ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password
|
,@ApiParam(value = "The password for login in clear text") @QueryParam("password") String password
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.loginUser(username,password,securityContext);
|
return delegate.loginUser(username,password,securityContext);
|
||||||
@ -115,7 +116,7 @@ public class UserApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/logout")
|
@Path("/logout")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Logs out current logged in user session", notes = "", response = void.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Logs out current logged in user session", notes = "", response = void.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
||||||
@ -126,14 +127,14 @@ public class UserApi {
|
|||||||
@PUT
|
@PUT
|
||||||
@Path("/{username}")
|
@Path("/{username}")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/json", "application/xml" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = void.class),
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = void.class),
|
||||||
|
|
||||||
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = void.class) })
|
||||||
public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username
|
public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username
|
||||||
,@ApiParam(value = "Updated user object" ,required=true) User body
|
,@ApiParam(value = "Updated user object" ) User body
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.updateUser(username,body,securityContext);
|
return delegate.updateUser(username,body,securityContext);
|
||||||
|
@ -23,7 +23,7 @@ public abstract class UserApiService {
|
|||||||
public abstract Response createUsersWithListInput(List<User> body,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response createUsersWithListInput(List<User> body,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response deleteUser(String username,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response deleteUser(String username,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response getUserByName(String username,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response getUserByName(String username,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response loginUser(String username,String password,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response loginUser( String username, String password,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response logoutUser(SecurityContext securityContext) throws NotFoundException;
|
public abstract Response logoutUser(SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response updateUser(String username,User body,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response updateUser(String username,User body,SecurityContext securityContext) throws NotFoundException;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Swagger Petstore
|
* Swagger Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@wordnik.com
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -18,6 +18,7 @@ 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 io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Category
|
* Category
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Swagger Petstore
|
* Swagger Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@wordnik.com
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -20,6 +20,7 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Order
|
* Order
|
||||||
@ -75,7 +76,7 @@ public class Order {
|
|||||||
private StatusEnum status = null;
|
private StatusEnum status = null;
|
||||||
|
|
||||||
@JsonProperty("complete")
|
@JsonProperty("complete")
|
||||||
private Boolean complete = false;
|
private Boolean complete = null;
|
||||||
|
|
||||||
public Order id(Long id) {
|
public Order id(Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Swagger Petstore
|
* Swagger Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@wordnik.com
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -23,6 +23,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.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pet
|
* Pet
|
||||||
@ -126,6 +127,7 @@ public class Pet {
|
|||||||
* @return name
|
* @return name
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(example = "doggie", required = true, value = "")
|
@ApiModelProperty(example = "doggie", required = true, value = "")
|
||||||
|
@NotNull
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
@ -149,6 +151,7 @@ public class Pet {
|
|||||||
* @return photoUrls
|
* @return photoUrls
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
|
@NotNull
|
||||||
public List<String> getPhotoUrls() {
|
public List<String> getPhotoUrls() {
|
||||||
return photoUrls;
|
return photoUrls;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Swagger Petstore
|
* Swagger Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@wordnik.com
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -18,6 +18,7 @@ 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 io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tag
|
* Tag
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Swagger Petstore
|
* Swagger Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@wordnik.com
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -18,6 +18,7 @@ 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 io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User
|
* User
|
||||||
|
@ -4,7 +4,6 @@ import io.swagger.api.*;
|
|||||||
import io.swagger.model.*;
|
import io.swagger.model.*;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import io.swagger.model.ModelApiResponse;
|
|
||||||
import io.swagger.model.Pet;
|
import io.swagger.model.Pet;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -30,12 +29,12 @@ public class PetApiServiceImpl extends PetApiService {
|
|||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Response findPetsByStatus(List<String> status, SecurityContext securityContext) throws NotFoundException {
|
public Response findPetsByStatus( List<String> status, SecurityContext securityContext) throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Response findPetsByTags(List<String> tags, SecurityContext securityContext) throws NotFoundException {
|
public Response findPetsByTags( List<String> tags, SecurityContext securityContext) throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
@ -50,7 +49,7 @@ public class PetApiServiceImpl extends PetApiService {
|
|||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Response updatePetWithForm(Long petId, String name, String status, SecurityContext securityContext) throws NotFoundException {
|
public Response updatePetWithForm(String petId, String name, String status, SecurityContext securityContext) throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ public class StoreApiServiceImpl extends StoreApiService {
|
|||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Response getOrderById(Long orderId, SecurityContext securityContext) throws NotFoundException {
|
public Response getOrderById(String orderId, SecurityContext securityContext) throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ public class UserApiServiceImpl extends UserApiService {
|
|||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Response loginUser(String username, String password, SecurityContext securityContext) throws NotFoundException {
|
public Response loginUser( String username, String password, SecurityContext securityContext) throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user