[JaxRS] Fix response annotation generation (fixes #2588) (#6373)

* [JaxRS] Fix response annotation generation (fixes #2588)

* [JaxRS] Fix jaxrs jersey1 usetags sample provider

* Revert "[JaxRS] Fix jaxrs jersey1 usetags sample provider"

This reverts commit 73fef2e451e376b23f6c1d43d8781f0b4a0bd1f5.

* [JaxRS] Fix jaxrs jersey1 sample generator

* [JaxRS] Fix samples for jersey1 and jersey2

* [Server: Java] Fix diamond operator defaultValue for Java < 1.7
This commit is contained in:
David Fischer 2017-08-29 18:31:56 +02:00 committed by wing328
parent b0db394855
commit 506c58ec74
80 changed files with 562 additions and 681 deletions

View File

@ -26,7 +26,7 @@ fi
# if you've executed sbt assembly previously it will use that instead. # if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -t modules/swagger-codegen/src/main/resources/JavaJaxRS/libraries/jersey1 -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l jaxrs -o samples/server/petstore/jaxrs/jersey1 -DhideGenerationTimestamp=true,serverPort=8080 --library=jersey1 --artifact-id=swagger-jaxrs-jersey1-server" ags="$@ generate -t modules/swagger-codegen/src/main/resources/JavaJaxRS -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l jaxrs -o samples/server/petstore/jaxrs/jersey1 -DhideGenerationTimestamp=true,serverPort=8080 --library=jersey1 --artifact-id=swagger-jaxrs-jersey1-server"
echo "Removing files and folders under samples/server/petstore/jaxrs/jersey1/src/main" echo "Removing files and folders under samples/server/petstore/jaxrs/jersey1/src/main"
rm -rf samples/server/petstore/jaxrs/jersey1/src/main rm -rf samples/server/petstore/jaxrs/jersey1/src/main

View File

@ -26,7 +26,7 @@ fi
# if you've executed sbt assembly previously it will use that instead. # if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -t modules/swagger-codegen/src/main/resources/JavaJaxRS/libraries/jersey1 -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l jaxrs -o samples/server/petstore/jaxrs/jersey1-useTags -DhideGenerationTimestamp=true,serverPort=8080 --library=jersey1 --artifact-id=swagger-jaxrs-jersey1-useTags --additional-properties useTags=true" ags="$@ generate -t modules/swagger-codegen/src/main/resources/JavaJaxRS -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l jaxrs -o samples/server/petstore/jaxrs/jersey1-useTags -DhideGenerationTimestamp=true,serverPort=8080 --library=jersey1 --artifact-id=swagger-jaxrs-jersey1-useTags --additional-properties useTags=true"
echo "Removing files and folders under samples/server/petstore/jaxrs/jersey1-useTags/src/main" echo "Removing files and folders under samples/server/petstore/jaxrs/jersey1-useTags/src/main"
rm -rf samples/server/petstore/jaxrs/jersey1-useTags/src/main rm -rf samples/server/petstore/jaxrs/jersey1-useTags/src/main

View File

@ -639,16 +639,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
return null; return null;
} }
String typeDeclaration = getTypeDeclaration(ap.getItems()); return String.format(pattern, getTypeDeclaration(ap.getItems()));
Object java8obj = additionalProperties.get("java8");
if (java8obj != null) {
Boolean java8 = Boolean.valueOf(java8obj.toString());
if (java8 != null && java8) {
typeDeclaration = "";
}
}
return String.format(pattern, typeDeclaration);
} else if (p instanceof MapProperty) { } else if (p instanceof MapProperty) {
final MapProperty ap = (MapProperty) p; final MapProperty ap = (MapProperty) p;
final String pattern; final String pattern;
@ -661,16 +652,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
return null; return null;
} }
String typeDeclaration = String.format("String, %s", getTypeDeclaration(ap.getAdditionalProperties())); return String.format(pattern, String.format("String, %s", getTypeDeclaration(ap.getAdditionalProperties())));
Object java8obj = additionalProperties.get("java8");
if (java8obj != null) {
Boolean java8 = Boolean.valueOf(java8obj.toString());
if (java8 != null && java8) {
typeDeclaration = "";
}
}
return String.format(pattern, typeDeclaration);
} else if (p instanceof IntegerProperty) { } else if (p instanceof IntegerProperty) {
IntegerProperty dp = (IntegerProperty) p; IntegerProperty dp = (IntegerProperty) p;
if (dp.getDefault() != null) { if (dp.getDefault() != null) {

View File

@ -140,6 +140,15 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
List<CodegenOperation> ops = (List<CodegenOperation>) operations.get("operation"); List<CodegenOperation> ops = (List<CodegenOperation>) operations.get("operation");
for ( CodegenOperation operation : ops ) { for ( CodegenOperation operation : ops ) {
if (operation.hasConsumes == Boolean.TRUE) {
Map<String, String> firstType = operation.consumes.get(0);
if (firstType != null) {
if ("multipart/form-data".equals(firstType.get("mediaType"))) {
operation.isMultipart = Boolean.TRUE;
}
}
}
boolean isMultipartPost = false; boolean isMultipartPost = false;
List<Map<String, String>> consumes = operation.consumes; List<Map<String, String>> consumes = operation.consumes;
if(consumes != null) { if(consumes != null) {
@ -166,40 +175,33 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
resp.code = "200"; resp.code = "200";
} }
// set vendorExtensions.x-java-is-response-void to true as dataType is set to "void" if (resp.baseType == null) {
if (resp.dataType == null) { resp.dataType = "void";
resp.baseType = "Void";
// set vendorExtensions.x-java-is-response-void to true as baseType is set to "Void"
resp.vendorExtensions.put("x-java-is-response-void", true); resp.vendorExtensions.put("x-java-is-response-void", true);
} }
if ("array".equals(resp.containerType)) {
resp.containerType = "List";
} else if ("map".equals(resp.containerType)) {
resp.containerType = "Map";
}
} }
} }
if ( operation.returnType == null ) { if ( operation.returnBaseType == null ) {
operation.returnType = "void"; operation.returnType = "void";
// set vendorExtensions.x-java-is-response-void to true as returnType is set to "void" operation.returnBaseType = "Void";
// set vendorExtensions.x-java-is-response-void to true as returnBaseType is set to "Void"
operation.vendorExtensions.put("x-java-is-response-void", true); operation.vendorExtensions.put("x-java-is-response-void", true);
} else if ( operation.returnType.startsWith("List") ) { }
String rt = operation.returnType;
int end = rt.lastIndexOf(">"); if ("array".equals(operation.returnContainer)) {
if ( end > 0 ) {
operation.returnType = rt.substring("List<".length(), end).trim();
operation.returnContainer = "List"; operation.returnContainer = "List";
} } else if ("map".equals(operation.returnContainer)) {
} else if ( operation.returnType.startsWith("Map") ) {
String rt = operation.returnType;
int end = rt.lastIndexOf(">");
if ( end > 0 ) {
operation.returnType = rt.substring("Map<".length(), end).split(",")[1].trim();
operation.returnContainer = "Map"; operation.returnContainer = "Map";
} }
} else if ( operation.returnType.startsWith("Set") ) {
String rt = operation.returnType;
int end = rt.lastIndexOf(">");
if ( end > 0 ) {
operation.returnType = rt.substring("Set<".length(), end).trim();
operation.returnContainer = "Set";
}
}
} }
} }
return objs; return objs;

View File

@ -133,54 +133,7 @@ public class JavaResteasyEapServerCodegen extends AbstractJavaJAXRSServerCodegen
@Override @Override
public Map<String, Object> postProcessOperations(Map<String, Object> objs) { public Map<String, Object> postProcessOperations(Map<String, Object> objs) {
return super.postProcessOperations(objs);
Map<String, Object> operations = (Map<String, Object>) objs.get("operations");
if (operations != null) {
List<CodegenOperation> ops = (List<CodegenOperation>) operations.get("operation");
for (CodegenOperation operation : ops) {
if (operation.hasConsumes == Boolean.TRUE) {
Map<String, String> firstType = operation.consumes.get(0);
if (firstType != null) {
if ("multipart/form-data".equals(firstType.get("mediaType"))) {
operation.isMultipart = Boolean.TRUE;
}
}
}
List<CodegenResponse> responses = operation.responses;
if (responses != null) {
for (CodegenResponse resp : responses) {
if ("0".equals(resp.code)) {
resp.code = "200";
}
}
}
if (operation.returnType == null) {
operation.returnType = "Void";
} else if (operation.returnType.startsWith("List")) {
String rt = operation.returnType;
int end = rt.lastIndexOf(">");
if (end > 0) {
operation.returnType = rt.substring("List<".length(), end).trim();
operation.returnContainer = "List";
}
} else if (operation.returnType.startsWith("Map")) {
String rt = operation.returnType;
int end = rt.lastIndexOf(">");
if (end > 0) {
operation.returnType = rt.substring("Map<".length(), end).split(",")[1].trim();
operation.returnContainer = "Map";
}
} else if (operation.returnType.startsWith("Set")) {
String rt = operation.returnType;
int end = rt.lastIndexOf(">");
if (end > 0) {
operation.returnType = rt.substring("Set<".length(), end).trim();
operation.returnContainer = "Set";
}
}
}
}
return objs;
} }
@Override @Override

View File

@ -132,54 +132,7 @@ public class JavaResteasyServerCodegen extends AbstractJavaJAXRSServerCodegen im
@Override @Override
public Map<String, Object> postProcessOperations(Map<String, Object> objs) { public Map<String, Object> postProcessOperations(Map<String, Object> objs) {
return super.postProcessOperations(objs);
Map<String, Object> operations = (Map<String, Object>) objs.get("operations");
if (operations != null) {
List<CodegenOperation> ops = (List<CodegenOperation>) operations.get("operation");
for (CodegenOperation operation : ops) {
if (operation.hasConsumes == Boolean.TRUE) {
Map<String, String> firstType = operation.consumes.get(0);
if (firstType != null) {
if ("multipart/form-data".equals(firstType.get("mediaType"))) {
operation.isMultipart = Boolean.TRUE;
}
}
}
List<CodegenResponse> responses = operation.responses;
if (responses != null) {
for (CodegenResponse resp : responses) {
if ("0".equals(resp.code)) {
resp.code = "200";
}
}
}
if (operation.returnType == null) {
operation.returnType = "Void";
} else if (operation.returnType.startsWith("List")) {
String rt = operation.returnType;
int end = rt.lastIndexOf(">");
if (end > 0) {
operation.returnType = rt.substring("List<".length(), end).trim();
operation.returnContainer = "List";
}
} else if (operation.returnType.startsWith("Map")) {
String rt = operation.returnType;
int end = rt.lastIndexOf(">");
if (end > 0) {
operation.returnType = rt.substring("Map<".length(), end).split(",")[1].trim();
operation.returnContainer = "Map";
}
} else if (operation.returnType.startsWith("Set")) {
String rt = operation.returnType;
int end = rt.lastIndexOf(">");
if (end > 0) {
operation.returnType = rt.substring("Set<".length(), end).trim();
operation.returnContainer = "Set";
}
}
}
}
return objs;
} }
@Override @Override

View File

@ -10,6 +10,7 @@ import io.swagger.jaxrs.*;
{{#imports}}import {{import}}; {{#imports}}import {{import}};
{{/imports}} {{/imports}}
import java.util.Map;
import java.util.List; import java.util.List;
import {{package}}.NotFoundException; import {{package}}.NotFoundException;
@ -62,7 +63,7 @@ public class {{classname}} {
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}} {{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}} {{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}} {{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
@io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { @io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = {
{{#authMethods}}@io.swagger.annotations.Authorization(value = "{{name}}"{{#isOAuth}}, scopes = { {{#authMethods}}@io.swagger.annotations.Authorization(value = "{{name}}"{{#isOAuth}}, scopes = {
{{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}}, {{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}},
{{/hasMore}}{{/scopes}} {{/hasMore}}{{/scopes}}
@ -70,7 +71,7 @@ public class {{classname}} {
{{/hasMore}}{{/authMethods}} {{/hasMore}}{{/authMethods}}
}{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} }) }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} })
@io.swagger.annotations.ApiResponses(value = { {{#responses}} @io.swagger.annotations.ApiResponses(value = { {{#responses}}
@io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}){{#hasMore}}, @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{#hasMore}},
{{/hasMore}}{{/responses}} }) {{/hasMore}}{{/responses}} })
public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}},{{/allParams}}@Context SecurityContext securityContext) public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}},{{/allParams}}@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {

View File

@ -17,6 +17,7 @@ import java.io.InputStream;
import org.apache.cxf.jaxrs.ext.multipart.Attachment; import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.Multipart; import org.apache.cxf.jaxrs.ext.multipart.Multipart;
import java.util.Map;
import java.util.List; import java.util.List;
{{#useBeanValidation}} {{#useBeanValidation}}
import javax.validation.constraints.*; import javax.validation.constraints.*;
@ -42,7 +43,7 @@ public class {{classname}} {
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}} {{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}} {{#hasConsumes}}@Consumes({ {{#consumes}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
{{#hasProduces}}@Produces({ {{#produces}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}} {{#hasProduces}}@Produces({ {{#produces}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
@ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { @ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = {
{{#authMethods}}@Authorization(value = "{{name}}"{{#isOAuth}}, scopes = { {{#authMethods}}@Authorization(value = "{{name}}"{{#isOAuth}}, scopes = {
{{#scopes}}@AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}}, {{#scopes}}@AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}},
{{/hasMore}}{{/scopes}} {{/hasMore}}{{/scopes}}
@ -50,7 +51,7 @@ public class {{classname}} {
{{/hasMore}}{{/authMethods}} {{/hasMore}}{{/authMethods}}
}{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{#hasMore}}, {{/hasMore}}{{/vendorExtensions.x-tags}} }) }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{#hasMore}}, {{/hasMore}}{{/vendorExtensions.x-tags}} })
@ApiResponses(value = { {{#responses}} @ApiResponses(value = { {{#responses}}
@ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}){{#hasMore}},{{/hasMore}}{{/responses}} }) @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{#hasMore}},{{/hasMore}}{{/responses}} })
public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) { public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) {
return delegate.{{nickname}}({{#allParams}}{{#isFile}}{{paramName}}InputStream, {{paramName}}Detail{{/isFile}}{{^isFile}}{{paramName}}{{/isFile}}, {{/allParams}}securityContext); return delegate.{{nickname}}({{#allParams}}{{#isFile}}{{paramName}}InputStream, {{paramName}}Detail{{/isFile}}{{^isFile}}{{paramName}}{{/isFile}}, {{/allParams}}securityContext);
} }

View File

@ -42,7 +42,7 @@ public interface {{classname}} {
{{/hasProduces}} {{/hasProduces}}
@ApiOperation(value = "{{{summary}}}", tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{#hasMore}}, {{/hasMore}}{{/vendorExtensions.x-tags}} }) @ApiOperation(value = "{{{summary}}}", tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{#hasMore}}, {{/hasMore}}{{/vendorExtensions.x-tags}} })
@ApiResponses(value = { {{#responses}} @ApiResponses(value = { {{#responses}}
@ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{^vendorExtensions.x-java-is-response-void}}, response = {{{baseType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{/vendorExtensions.x-java-is-response-void}}){{#hasMore}},{{/hasMore}}{{/responses}} }) @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{^vendorExtensions.x-java-is-response-void}}, response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}{{/vendorExtensions.x-java-is-response-void}}){{#hasMore}},{{/hasMore}}{{/responses}} })
public {{>returnTypes}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); public {{>returnTypes}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
{{/operation}} {{/operation}}
} }

View File

@ -1,4 +1,4 @@
{{#useGenericResponse}}Response{{/useGenericResponse}}{{! non-generic response: {{#useGenericResponse}}Response{{/useGenericResponse}}{{! non-generic response:
}}{{^useGenericResponse}}{{! }}{{^useGenericResponse}}{{!
}}{{#returnContainer}}{{#isMapContainer}}Map<String, {{{returnType}}}>{{/isMapContainer}}{{#isListContainer}}List<{{{returnType}}}>{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}{{! }}{{{returnType}}}{{!
}}{{/useGenericResponse}} }}{{/useGenericResponse}}

View File

@ -15,6 +15,7 @@ import javax.validation.constraints.*;
{{#imports}}import {{import}}; {{#imports}}import {{import}};
{{/imports}} {{/imports}}
import java.util.Map;
import java.util.List; import java.util.List;
import {{package}}.NotFoundException; import {{package}}.NotFoundException;
@ -42,7 +43,7 @@ public class {{classname}} {
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}} {{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}} {{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}} {{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
@io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { @io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = {
{{#authMethods}}@io.swagger.annotations.Authorization(value = "{{name}}"{{#isOAuth}}, scopes = { {{#authMethods}}@io.swagger.annotations.Authorization(value = "{{name}}"{{#isOAuth}}, scopes = {
{{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}}, {{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}},
{{/hasMore}}{{/scopes}} {{/hasMore}}{{/scopes}}
@ -50,7 +51,7 @@ public class {{classname}} {
{{/hasMore}}{{/authMethods}} {{/hasMore}}{{/authMethods}}
}{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{#hasMore}}, {{/hasMore}}{{/vendorExtensions.x-tags}} }) }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{#hasMore}}, {{/hasMore}}{{/vendorExtensions.x-tags}} })
@io.swagger.annotations.ApiResponses(value = { {{#responses}} @io.swagger.annotations.ApiResponses(value = { {{#responses}}
@io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}){{#hasMore}},{{/hasMore}}{{/responses}} }) @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{#hasMore}},{{/hasMore}}{{/responses}} })
public Response {{nickname}}( public Response {{nickname}}(
{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}, {{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}},
{{/allParams}}@Context SecurityContext securityContext) {{/allParams}}@Context SecurityContext securityContext)

View File

@ -10,6 +10,7 @@ import io.swagger.jaxrs.*;
{{#imports}}import {{import}}; {{#imports}}import {{import}};
{{/imports}} {{/imports}}
import java.util.Map;
import java.util.List; import java.util.List;
import {{package}}.NotFoundException; import {{package}}.NotFoundException;
@ -38,7 +39,7 @@ public class {{classname}} {
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}} {{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}} {{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}} {{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
@io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { @io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = {
{{#authMethods}}@io.swagger.annotations.Authorization(value = "{{name}}"{{#isOAuth}}, scopes = { {{#authMethods}}@io.swagger.annotations.Authorization(value = "{{name}}"{{#isOAuth}}, scopes = {
{{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}}, {{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}},
{{/hasMore}}{{/scopes}} {{/hasMore}}{{/scopes}}
@ -46,7 +47,7 @@ public class {{classname}} {
{{/hasMore}}{{/authMethods}} {{/hasMore}}{{/authMethods}}
}{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} }) }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} })
@io.swagger.annotations.ApiResponses(value = { {{#responses}} @io.swagger.annotations.ApiResponses(value = { {{#responses}}
@io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}){{#hasMore}}, @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{#hasMore}},
{{/hasMore}}{{/responses}} }) {{/hasMore}}{{/responses}} })
public Response {{nickname}}({{#isMultipart}}MultipartFormDataInput input,{{/isMultipart}}{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{^isMultipart}}{{>formParams}},{{/isMultipart}}{{#isMultipart}}{{^isFormParam}},{{/isFormParam}}{{/isMultipart}}{{/allParams}}@Context SecurityContext securityContext) public Response {{nickname}}({{#isMultipart}}MultipartFormDataInput input,{{/isMultipart}}{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{^isMultipart}}{{>formParams}},{{/isMultipart}}{{#isMultipart}}{{^isFormParam}},{{/isFormParam}}{{/isMultipart}}{{/allParams}}@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {

View File

@ -9,6 +9,7 @@ import io.swagger.jaxrs.*;
{{/imports}} {{/imports}}
import java.util.List; import java.util.List;
import java.util.Map;
import java.io.InputStream; import java.io.InputStream;
@ -34,7 +35,7 @@ public interface {{classname}} {
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}} {{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}} {{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}} {{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
@io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { @io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = {
{{#authMethods}}@io.swagger.annotations.Authorization(value = "{{name}}"{{#isOAuth}}, scopes = { {{#authMethods}}@io.swagger.annotations.Authorization(value = "{{name}}"{{#isOAuth}}, scopes = {
{{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}}, {{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}},
{{/hasMore}}{{/scopes}} {{/hasMore}}{{/scopes}}
@ -42,7 +43,7 @@ public interface {{classname}} {
{{/hasMore}}{{/authMethods}} {{/hasMore}}{{/authMethods}}
}{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} }) }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} })
@io.swagger.annotations.ApiResponses(value = { {{#responses}} @io.swagger.annotations.ApiResponses(value = { {{#responses}}
@io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}){{#hasMore}}, @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{#hasMore}},
{{/hasMore}}{{/responses}} }) {{/hasMore}}{{/responses}} })
public Response {{nickname}}({{#isMultipart}}MultipartFormDataInput input,{{/isMultipart}}{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{^isMultipart}}{{>formParams}},{{/isMultipart}}{{#isMultipart}}{{^isFormParam}},{{/isFormParam}}{{/isMultipart}}{{/allParams}}@Context SecurityContext securityContext); public Response {{nickname}}({{#isMultipart}}MultipartFormDataInput input,{{/isMultipart}}{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{^isMultipart}}{{>formParams}},{{/isMultipart}}{{#isMultipart}}{{^isFormParam}},{{/isFormParam}}{{/isMultipart}}{{/allParams}}@Context SecurityContext securityContext);
{{/operation}} {{/operation}}

View File

@ -8,6 +8,7 @@ import javax.ws.rs.core.Response;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import java.util.Map;
import java.util.List; import java.util.List;
{{#useBeanValidation}} {{#useBeanValidation}}
import javax.validation.constraints.*; import javax.validation.constraints.*;
@ -28,7 +29,7 @@ public class {{classname}} {
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}} {{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}} {{#hasConsumes}}@Consumes({ {{#consumes}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
{{#hasProduces}}@Produces({ {{#produces}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}} {{#hasProduces}}@Produces({ {{#produces}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
@ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { @ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = {
{{#authMethods}}@Authorization(value = "{{name}}"{{#isOAuth}}, scopes = { {{#authMethods}}@Authorization(value = "{{name}}"{{#isOAuth}}, scopes = {
{{#scopes}}@AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}}, {{#scopes}}@AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}},
{{/hasMore}}{{/scopes}} {{/hasMore}}{{/scopes}}
@ -36,7 +37,7 @@ public class {{classname}} {
{{/hasMore}}{{/authMethods}} {{/hasMore}}{{/authMethods}}
}{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{#hasMore}}, {{/hasMore}}{{/vendorExtensions.x-tags}} }) }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{#hasMore}}, {{/hasMore}}{{/vendorExtensions.x-tags}} })
@ApiResponses(value = { {{#responses}} @ApiResponses(value = { {{#responses}}
@ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}){{#hasMore}},{{/hasMore}}{{/responses}} }) @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{#hasMore}},{{/hasMore}}{{/responses}} })
public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}}) { public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}}) {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }

View File

@ -151,7 +151,7 @@ public enum StatusEnum {
* Get complete * Get complete
* @return complete * @return complete
**/ **/
public Boolean getComplete() { public Boolean isComplete() {
return complete; return complete;
} }

View File

@ -151,7 +151,7 @@ public enum StatusEnum {
* Get complete * Get complete
* @return complete * @return complete
**/ **/
public Boolean getComplete() { public Boolean isComplete() {
return complete; return complete;
} }

View File

@ -18,6 +18,7 @@ import java.io.InputStream;
import org.apache.cxf.jaxrs.ext.multipart.Attachment; import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.Multipart; import org.apache.cxf.jaxrs.ext.multipart.Multipart;
import java.util.Map;
import java.util.List; import java.util.List;
import javax.validation.constraints.*; import javax.validation.constraints.*;
@Path("/pet") @Path("/pet")
@ -39,14 +40,14 @@ public class PetApi {
@Consumes({ "application/json", "application/xml" }) @Consumes({ "application/json", "application/xml" })
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Add a new pet to the store", notes = "", response = void.class, authorizations = { @ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = { @Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@AuthorizationScope(scope = "read:pets", description = "read your pets") @AuthorizationScope(scope = "read:pets", description = "read your pets")
}) })
}, tags={ "pet", }) }, tags={ "pet", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input", response = void.class) }) @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" ,required=true) Pet body) {
return delegate.addPet(body, securityContext); return delegate.addPet(body, securityContext);
} }
@ -55,14 +56,14 @@ public class PetApi {
@Path("/{petId}") @Path("/{petId}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Deletes a pet", notes = "", response = void.class, authorizations = { @ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = { @Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@AuthorizationScope(scope = "read:pets", description = "read your pets") @AuthorizationScope(scope = "read:pets", description = "read your pets")
}) })
}, tags={ "pet", }) }, tags={ "pet", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid pet value", response = void.class) }) @ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId, @ApiParam(value = "" )@HeaderParam("api_key") String apiKey) { public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId, @ApiParam(value = "" )@HeaderParam("api_key") String apiKey) {
return delegate.deletePet(petId, apiKey, securityContext); return delegate.deletePet(petId, apiKey, securityContext);
} }
@ -79,7 +80,7 @@ public class PetApi {
}, tags={ "pet", }) }, tags={ "pet", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@ApiResponse(code = 400, message = "Invalid status value", response = Pet.class, responseContainer = "List") }) @ApiResponse(code = 400, message = "Invalid status value", response = Void.class) })
public Response findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter",required=true, allowableValues="available, pending, sold") @QueryParam("status") List<String> status) { public Response findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter",required=true, allowableValues="available, pending, sold") @QueryParam("status") List<String> status) {
return delegate.findPetsByStatus(status, securityContext); return delegate.findPetsByStatus(status, securityContext);
} }
@ -96,7 +97,7 @@ public class PetApi {
}, tags={ "pet", }) }, tags={ "pet", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class, responseContainer = "List") }) @ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) })
public Response findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List<String> tags) { public Response findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List<String> tags) {
return delegate.findPetsByTags(tags, securityContext); return delegate.findPetsByTags(tags, securityContext);
} }
@ -110,8 +111,8 @@ public class PetApi {
}, tags={ "pet", }) }, tags={ "pet", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class), @ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@ApiResponse(code = 404, message = "Pet not found", response = Pet.class) }) @ApiResponse(code = 404, message = "Pet not found", response = Void.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 to return",required=true) @PathParam("petId") Long petId) {
return delegate.getPetById(petId, securityContext); return delegate.getPetById(petId, securityContext);
} }
@ -120,16 +121,16 @@ public class PetApi {
@Consumes({ "application/json", "application/xml" }) @Consumes({ "application/json", "application/xml" })
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Update an existing pet", notes = "", response = void.class, authorizations = { @ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = { @Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@AuthorizationScope(scope = "read:pets", description = "read your pets") @AuthorizationScope(scope = "read:pets", description = "read your pets")
}) })
}, tags={ "pet", }) }, tags={ "pet", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@ApiResponse(code = 404, message = "Pet not found", response = void.class), @ApiResponse(code = 404, message = "Pet not found", response = Void.class),
@ApiResponse(code = 405, message = "Validation exception", response = void.class) }) @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" ,required=true) Pet body) {
return delegate.updatePet(body, securityContext); return delegate.updatePet(body, securityContext);
} }
@ -138,14 +139,14 @@ public class PetApi {
@Path("/{petId}") @Path("/{petId}")
@Consumes({ "application/x-www-form-urlencoded" }) @Consumes({ "application/x-www-form-urlencoded" })
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = void.class, authorizations = { @ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = { @Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@AuthorizationScope(scope = "read:pets", description = "read your pets") @AuthorizationScope(scope = "read:pets", description = "read your pets")
}) })
}, tags={ "pet", }) }, tags={ "pet", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input", response = void.class) }) @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, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) { public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status) {
return delegate.updatePetWithForm(petId, name, status, securityContext); return delegate.updatePetWithForm(petId, name, status, securityContext);
} }

View File

@ -17,6 +17,7 @@ import java.io.InputStream;
import org.apache.cxf.jaxrs.ext.multipart.Attachment; import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.Multipart; import org.apache.cxf.jaxrs.ext.multipart.Multipart;
import java.util.Map;
import java.util.List; import java.util.List;
import javax.validation.constraints.*; import javax.validation.constraints.*;
@Path("/store") @Path("/store")
@ -38,10 +39,10 @@ public class StoreApi {
@Path("/order/{orderId}") @Path("/order/{orderId}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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", }) @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", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@ApiResponse(code = 404, message = "Order not found", response = void.class) }) @ApiResponse(code = 404, message = "Order not found", response = Void.class) })
public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("orderId") String orderId) { public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("orderId") String orderId) {
return delegate.deleteOrder(orderId, securityContext); return delegate.deleteOrder(orderId, securityContext);
} }
@ -54,7 +55,7 @@ public class StoreApi {
@Authorization(value = "api_key") @Authorization(value = "api_key")
}, tags={ "store", }) }, tags={ "store", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") }) @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
public Response getInventory() { public Response getInventory() {
return delegate.getInventory(securityContext); return delegate.getInventory(securityContext);
} }
@ -66,8 +67,8 @@ public class StoreApi {
@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", }) @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", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@ApiResponse(code = 404, message = "Order not found", response = Order.class) }) @ApiResponse(code = 404, message = "Order not found", response = Void.class) })
public Response getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") Long orderId) { public Response getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") Long orderId) {
return delegate.getOrderById(orderId, securityContext); return delegate.getOrderById(orderId, securityContext);
} }
@ -79,7 +80,7 @@ public class StoreApi {
@ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store" }) @ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store" })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid Order", response = Order.class) }) @ApiResponse(code = 400, message = "Invalid Order", response = Void.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" ,required=true) Order body) {
return delegate.placeOrder(body, securityContext); return delegate.placeOrder(body, securityContext);
} }

View File

@ -17,6 +17,7 @@ import java.io.InputStream;
import org.apache.cxf.jaxrs.ext.multipart.Attachment; import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.Multipart; import org.apache.cxf.jaxrs.ext.multipart.Multipart;
import java.util.Map;
import java.util.List; import java.util.List;
import javax.validation.constraints.*; import javax.validation.constraints.*;
@Path("/user") @Path("/user")
@ -38,9 +39,9 @@ public class UserApi {
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", }) @ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = void.class) }) @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" ,required=true) User body) {
return delegate.createUser(body, securityContext); return delegate.createUser(body, securityContext);
} }
@ -49,9 +50,9 @@ public class UserApi {
@Path("/createWithArray") @Path("/createWithArray")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", }) @ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = void.class) }) @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" ,required=true) List<User> body) {
return delegate.createUsersWithArrayInput(body, securityContext); return delegate.createUsersWithArrayInput(body, securityContext);
} }
@ -60,9 +61,9 @@ public class UserApi {
@Path("/createWithList") @Path("/createWithList")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", }) @ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = void.class) }) @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" ,required=true) List<User> body) {
return delegate.createUsersWithListInput(body, securityContext); return delegate.createUsersWithListInput(body, securityContext);
} }
@ -71,10 +72,10 @@ public class UserApi {
@Path("/{username}") @Path("/{username}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", }) @ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid username supplied", response = void.class), @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@ApiResponse(code = 404, message = "User not found", response = void.class) }) @ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username) { public Response deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username) {
return delegate.deleteUser(username, securityContext); return delegate.deleteUser(username, securityContext);
} }
@ -86,8 +87,8 @@ public class UserApi {
@ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", }) @ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = User.class), @ApiResponse(code = 200, message = "successful operation", response = User.class),
@ApiResponse(code = 400, message = "Invalid username supplied", response = User.class), @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@ApiResponse(code = 404, message = "User not found", response = User.class) }) @ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathParam("username") String username) { public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathParam("username") String username) {
return delegate.getUserByName(username, securityContext); return delegate.getUserByName(username, securityContext);
} }
@ -99,7 +100,7 @@ public class UserApi {
@ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", }) @ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = String.class), @ApiResponse(code = 200, message = "successful operation", response = String.class),
@ApiResponse(code = 400, message = "Invalid username/password supplied", response = String.class) }) @ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) })
public Response loginUser( @NotNull @ApiParam(value = "The user name for login",required=true) @QueryParam("username") String username, @NotNull @ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password) { public Response loginUser( @NotNull @ApiParam(value = "The user name for login",required=true) @QueryParam("username") String username, @NotNull @ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password) {
return delegate.loginUser(username, password, securityContext); return delegate.loginUser(username, password, securityContext);
} }
@ -108,9 +109,9 @@ public class UserApi {
@Path("/logout") @Path("/logout")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Logs out current logged in user session", notes = "", response = void.class, tags={ "user", }) @ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = void.class) }) @ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response logoutUser() { public Response logoutUser() {
return delegate.logoutUser(securityContext); return delegate.logoutUser(securityContext);
} }
@ -119,10 +120,10 @@ public class UserApi {
@Path("/{username}") @Path("/{username}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user" }) @ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user" })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid user supplied", response = void.class), @ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class),
@ApiResponse(code = 404, message = "User not found", response = void.class) }) @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, @ApiParam(value = "Updated user object" ,required=true) User body) { 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) {
return delegate.updateUser(username, body, securityContext); return delegate.updateUser(username, body, securityContext);
} }

View File

@ -108,8 +108,8 @@
"type" : "array", "type" : "array",
"items" : { "items" : {
"type" : "string", "type" : "string",
"default" : "available", "enum" : [ "available", "pending", "sold" ],
"enum" : [ "available", "pending", "sold" ] "default" : "available"
}, },
"collectionFormat" : "csv" "collectionFormat" : "csv"
} ], } ],

View File

@ -151,7 +151,7 @@ public enum StatusEnum {
* Get complete * Get complete
* @return complete * @return complete
**/ **/
public Boolean getComplete() { public Boolean isComplete() {
return complete; return complete;
} }

View File

@ -11,6 +11,7 @@ import java.io.File;
import io.swagger.model.ModelApiResponse; import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet; import io.swagger.model.Pet;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -76,7 +77,7 @@ public class PetApi {
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@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 = Void.class) })
public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext) public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.findPetsByStatus(status,securityContext); return delegate.findPetsByStatus(status,securityContext);
@ -94,7 +95,7 @@ public class PetApi {
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@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 = Void.class) })
public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext) public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.findPetsByTags(tags,securityContext); return delegate.findPetsByTags(tags,securityContext);
@ -109,9 +110,9 @@ public class PetApi {
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.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 = Void.class) })
public Response getPetById( @PathParam("petId") Long petId,@Context SecurityContext securityContext) public Response getPetById( @PathParam("petId") Long petId,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.getPetById(petId,securityContext); return delegate.getPetById(petId,securityContext);

View File

@ -10,6 +10,7 @@ import io.swagger.jaxrs.*;
import java.util.Map; import java.util.Map;
import io.swagger.model.Order; import io.swagger.model.Order;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -50,7 +51,7 @@ public class StoreApi {
@io.swagger.annotations.Authorization(value = "api_key") @io.swagger.annotations.Authorization(value = "api_key")
}, tags={ "store", }) }, tags={ "store", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") }) @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
public Response getInventory(@Context SecurityContext securityContext) public Response getInventory(@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.getInventory(securityContext); return delegate.getInventory(securityContext);
@ -63,9 +64,9 @@ public class StoreApi {
@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 = Void.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 = Void.class) })
public Response getOrderById( @Min(1) @Max(5) @PathParam("orderId") Long orderId,@Context SecurityContext securityContext) public Response getOrderById( @Min(1) @Max(5) @PathParam("orderId") Long orderId,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.getOrderById(orderId,securityContext); return delegate.getOrderById(orderId,securityContext);
@ -78,7 +79,7 @@ public class StoreApi {
@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 = Void.class) })
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body,@Context SecurityContext securityContext) public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.placeOrder(body,securityContext); return delegate.placeOrder(body,securityContext);

View File

@ -10,6 +10,7 @@ import io.swagger.jaxrs.*;
import java.util.List; import java.util.List;
import io.swagger.model.User; import io.swagger.model.User;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -83,9 +84,9 @@ public class UserApi {
@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),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = User.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = User.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response getUserByName( @PathParam("username") String username,@Context SecurityContext securityContext) public Response getUserByName( @PathParam("username") String username,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.getUserByName(username,securityContext); return delegate.getUserByName(username,securityContext);
@ -98,7 +99,7 @@ public class UserApi {
@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 = Void.class) })
public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext) public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.loginUser(username,password,securityContext); return delegate.loginUser(username,password,securityContext);

View File

@ -110,7 +110,7 @@ public class Order {
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("complete") @JsonProperty("complete")
public Boolean getComplete() { public Boolean isComplete() {
return complete; return complete;
} }
public void setComplete(Boolean complete) { public void setComplete(Boolean complete) {

View File

@ -10,6 +10,7 @@ import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet; import io.swagger.model.Pet;
import java.util.List; import java.util.List;
import java.util.Map;
import java.io.InputStream; import java.io.InputStream;
@ -66,7 +67,7 @@ public interface PetApi {
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@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 = Void.class) })
public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext); public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext);
@GET @GET
@Path("/findByTags") @Path("/findByTags")
@ -81,7 +82,7 @@ public interface PetApi {
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@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 = Void.class) })
public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext); public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext);
@GET @GET
@Path("/{petId}") @Path("/{petId}")
@ -93,9 +94,9 @@ public interface PetApi {
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.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 = Void.class) })
public Response getPetById( @PathParam("petId") Long petId,@Context SecurityContext securityContext); public Response getPetById( @PathParam("petId") Long petId,@Context SecurityContext securityContext);
@PUT @PUT

View File

@ -9,6 +9,7 @@ import java.util.Map;
import io.swagger.model.Order; import io.swagger.model.Order;
import java.util.List; import java.util.List;
import java.util.Map;
import java.io.InputStream; import java.io.InputStream;
@ -43,7 +44,7 @@ public interface StoreApi {
@io.swagger.annotations.Authorization(value = "api_key") @io.swagger.annotations.Authorization(value = "api_key")
}, tags={ "store", }) }, tags={ "store", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") }) @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
public Response getInventory(@Context SecurityContext securityContext); public Response getInventory(@Context SecurityContext securityContext);
@GET @GET
@Path("/order/{orderId}") @Path("/order/{orderId}")
@ -53,9 +54,9 @@ public interface StoreApi {
@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 = Void.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 = Void.class) })
public Response getOrderById( @Min(1) @Max(5) @PathParam("orderId") Long orderId,@Context SecurityContext securityContext); public Response getOrderById( @Min(1) @Max(5) @PathParam("orderId") Long orderId,@Context SecurityContext securityContext);
@POST @POST
@Path("/order") @Path("/order")
@ -65,6 +66,6 @@ public interface StoreApi {
@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 = Void.class) })
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body,@Context SecurityContext securityContext); public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body,@Context SecurityContext securityContext);
} }

View File

@ -9,6 +9,7 @@ import java.util.List;
import io.swagger.model.User; import io.swagger.model.User;
import java.util.List; import java.util.List;
import java.util.Map;
import java.io.InputStream; import java.io.InputStream;
@ -67,9 +68,9 @@ public interface UserApi {
@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),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = User.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = User.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response getUserByName( @PathParam("username") String username,@Context SecurityContext securityContext); public Response getUserByName( @PathParam("username") String username,@Context SecurityContext securityContext);
@GET @GET
@Path("/login") @Path("/login")
@ -79,7 +80,7 @@ public interface UserApi {
@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 = Void.class) })
public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext); public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext);
@GET @GET
@Path("/logout") @Path("/logout")

View File

@ -110,7 +110,7 @@ public class Order {
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("complete") @JsonProperty("complete")
public Boolean getComplete() { public Boolean isComplete() {
return complete; return complete;
} }
public void setComplete(Boolean complete) { public void setComplete(Boolean complete) {

View File

@ -10,6 +10,7 @@ import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet; import io.swagger.model.Pet;
import java.util.List; import java.util.List;
import java.util.Map;
import java.io.InputStream; import java.io.InputStream;
@ -66,7 +67,7 @@ public interface PetApi {
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@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 = Void.class) })
public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext); public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext);
@GET @GET
@Path("/findByTags") @Path("/findByTags")
@ -81,7 +82,7 @@ public interface PetApi {
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@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 = Void.class) })
public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext); public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext);
@GET @GET
@Path("/{petId}") @Path("/{petId}")
@ -93,9 +94,9 @@ public interface PetApi {
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.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 = Void.class) })
public Response getPetById( @PathParam("petId") Long petId,@Context SecurityContext securityContext); public Response getPetById( @PathParam("petId") Long petId,@Context SecurityContext securityContext);
@PUT @PUT

View File

@ -9,6 +9,7 @@ import java.util.Map;
import io.swagger.model.Order; import io.swagger.model.Order;
import java.util.List; import java.util.List;
import java.util.Map;
import java.io.InputStream; import java.io.InputStream;
@ -43,7 +44,7 @@ public interface StoreApi {
@io.swagger.annotations.Authorization(value = "api_key") @io.swagger.annotations.Authorization(value = "api_key")
}, tags={ "store", }) }, tags={ "store", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") }) @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
public Response getInventory(@Context SecurityContext securityContext); public Response getInventory(@Context SecurityContext securityContext);
@GET @GET
@Path("/order/{orderId}") @Path("/order/{orderId}")
@ -53,9 +54,9 @@ public interface StoreApi {
@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 = Void.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 = Void.class) })
public Response getOrderById( @Min(1) @Max(5) @PathParam("orderId") Long orderId,@Context SecurityContext securityContext); public Response getOrderById( @Min(1) @Max(5) @PathParam("orderId") Long orderId,@Context SecurityContext securityContext);
@POST @POST
@Path("/order") @Path("/order")
@ -65,6 +66,6 @@ public interface StoreApi {
@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 = Void.class) })
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body,@Context SecurityContext securityContext); public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body,@Context SecurityContext securityContext);
} }

View File

@ -9,6 +9,7 @@ import java.util.List;
import io.swagger.model.User; import io.swagger.model.User;
import java.util.List; import java.util.List;
import java.util.Map;
import java.io.InputStream; import java.io.InputStream;
@ -67,9 +68,9 @@ public interface UserApi {
@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),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = User.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = User.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response getUserByName( @PathParam("username") String username,@Context SecurityContext securityContext); public Response getUserByName( @PathParam("username") String username,@Context SecurityContext securityContext);
@GET @GET
@Path("/login") @Path("/login")
@ -79,7 +80,7 @@ public interface UserApi {
@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 = Void.class) })
public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext); public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext);
@GET @GET
@Path("/logout") @Path("/logout")

View File

@ -110,7 +110,7 @@ public class Order {
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("complete") @JsonProperty("complete")
public Boolean getComplete() { public Boolean isComplete() {
return complete; return complete;
} }
public void setComplete(Boolean complete) { public void setComplete(Boolean complete) {

View File

@ -10,6 +10,7 @@ import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet; import io.swagger.model.Pet;
import java.util.List; import java.util.List;
import java.util.Map;
import java.io.InputStream; import java.io.InputStream;
@ -66,7 +67,7 @@ public interface PetApi {
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@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 = Void.class) })
public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext); public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext);
@GET @GET
@Path("/findByTags") @Path("/findByTags")
@ -81,7 +82,7 @@ public interface PetApi {
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@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 = Void.class) })
public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext); public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext);
@GET @GET
@Path("/{petId}") @Path("/{petId}")
@ -93,9 +94,9 @@ public interface PetApi {
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.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 = Void.class) })
public Response getPetById( @PathParam("petId") Long petId,@Context SecurityContext securityContext); public Response getPetById( @PathParam("petId") Long petId,@Context SecurityContext securityContext);
@PUT @PUT

View File

@ -9,6 +9,7 @@ import java.util.Map;
import io.swagger.model.Order; import io.swagger.model.Order;
import java.util.List; import java.util.List;
import java.util.Map;
import java.io.InputStream; import java.io.InputStream;
@ -43,7 +44,7 @@ public interface StoreApi {
@io.swagger.annotations.Authorization(value = "api_key") @io.swagger.annotations.Authorization(value = "api_key")
}, tags={ "store", }) }, tags={ "store", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") }) @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
public Response getInventory(@Context SecurityContext securityContext); public Response getInventory(@Context SecurityContext securityContext);
@GET @GET
@Path("/order/{orderId}") @Path("/order/{orderId}")
@ -53,9 +54,9 @@ public interface StoreApi {
@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 = Void.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 = Void.class) })
public Response getOrderById( @Min(1) @Max(5) @PathParam("orderId") Long orderId,@Context SecurityContext securityContext); public Response getOrderById( @Min(1) @Max(5) @PathParam("orderId") Long orderId,@Context SecurityContext securityContext);
@POST @POST
@Path("/order") @Path("/order")
@ -65,6 +66,6 @@ public interface StoreApi {
@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 = Void.class) })
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body,@Context SecurityContext securityContext); public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body,@Context SecurityContext securityContext);
} }

View File

@ -9,6 +9,7 @@ import java.util.List;
import io.swagger.model.User; import io.swagger.model.User;
import java.util.List; import java.util.List;
import java.util.Map;
import java.io.InputStream; import java.io.InputStream;
@ -67,9 +68,9 @@ public interface UserApi {
@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),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = User.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = User.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response getUserByName( @PathParam("username") String username,@Context SecurityContext securityContext); public Response getUserByName( @PathParam("username") String username,@Context SecurityContext securityContext);
@GET @GET
@Path("/login") @Path("/login")
@ -79,7 +80,7 @@ public interface UserApi {
@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 = Void.class) })
public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext); public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext);
@GET @GET
@Path("/logout") @Path("/logout")

View File

@ -110,7 +110,7 @@ public class Order {
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("complete") @JsonProperty("complete")
public Boolean getComplete() { public Boolean isComplete() {
return complete; return complete;
} }
public void setComplete(Boolean complete) { public void setComplete(Boolean complete) {

View File

@ -11,6 +11,7 @@ import java.io.File;
import io.swagger.model.ModelApiResponse; import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet; import io.swagger.model.Pet;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -76,7 +77,7 @@ public class PetApi {
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@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 = Void.class) })
public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext) public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.findPetsByStatus(status,securityContext); return delegate.findPetsByStatus(status,securityContext);
@ -94,7 +95,7 @@ public class PetApi {
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@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 = Void.class) })
public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext) public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.findPetsByTags(tags,securityContext); return delegate.findPetsByTags(tags,securityContext);
@ -109,9 +110,9 @@ public class PetApi {
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.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 = Void.class) })
public Response getPetById( @PathParam("petId") Long petId,@Context SecurityContext securityContext) public Response getPetById( @PathParam("petId") Long petId,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.getPetById(petId,securityContext); return delegate.getPetById(petId,securityContext);

View File

@ -10,6 +10,7 @@ import io.swagger.jaxrs.*;
import java.util.Map; import java.util.Map;
import io.swagger.model.Order; import io.swagger.model.Order;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -50,7 +51,7 @@ public class StoreApi {
@io.swagger.annotations.Authorization(value = "api_key") @io.swagger.annotations.Authorization(value = "api_key")
}, tags={ "store", }) }, tags={ "store", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") }) @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
public Response getInventory(@Context SecurityContext securityContext) public Response getInventory(@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.getInventory(securityContext); return delegate.getInventory(securityContext);
@ -63,9 +64,9 @@ public class StoreApi {
@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 = Void.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 = Void.class) })
public Response getOrderById( @Min(1) @Max(5) @PathParam("orderId") Long orderId,@Context SecurityContext securityContext) public Response getOrderById( @Min(1) @Max(5) @PathParam("orderId") Long orderId,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.getOrderById(orderId,securityContext); return delegate.getOrderById(orderId,securityContext);
@ -78,7 +79,7 @@ public class StoreApi {
@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 = Void.class) })
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body,@Context SecurityContext securityContext) public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.placeOrder(body,securityContext); return delegate.placeOrder(body,securityContext);

View File

@ -10,6 +10,7 @@ import io.swagger.jaxrs.*;
import java.util.List; import java.util.List;
import io.swagger.model.User; import io.swagger.model.User;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -83,9 +84,9 @@ public class UserApi {
@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),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = User.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = User.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response getUserByName( @PathParam("username") String username,@Context SecurityContext securityContext) public Response getUserByName( @PathParam("username") String username,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.getUserByName(username,securityContext); return delegate.getUserByName(username,securityContext);
@ -98,7 +99,7 @@ public class UserApi {
@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 = Void.class) })
public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext) public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.loginUser(username,password,securityContext); return delegate.loginUser(username,password,securityContext);

View File

@ -110,7 +110,7 @@ public class Order {
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty("complete") @JsonProperty("complete")
public Boolean getComplete() { public Boolean isComplete() {
return complete; return complete;
} }
public void setComplete(Boolean complete) { public void setComplete(Boolean complete) {

View File

@ -11,6 +11,7 @@ import javax.ws.rs.core.Response;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import java.util.Map;
import java.util.List; import java.util.List;
import javax.validation.constraints.*; import javax.validation.constraints.*;
@ -82,12 +83,12 @@ public class FakeApi {
@Consumes({ "application/xml; charset&#x3D;utf-8", "application/json; charset&#x3D;utf-8" }) @Consumes({ "application/xml; charset&#x3D;utf-8", "application/json; charset&#x3D;utf-8" })
@Produces({ "application/xml; charset&#x3D;utf-8", "application/json; charset&#x3D;utf-8" }) @Produces({ "application/xml; charset&#x3D;utf-8", "application/json; charset&#x3D;utf-8" })
@ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = void.class, authorizations = { @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = Void.class, authorizations = {
@Authorization(value = "http_basic_test") @Authorization(value = "http_basic_test")
}, tags={ "fake", }) }, tags={ "fake", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid username supplied", response = void.class), @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@ApiResponse(code = 404, message = "User not found", response = void.class) }) @ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "double") Double _double,@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter,@FormParam(value = "byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "float") Float _float,@FormParam(value = "string") String string,@FormParam(value = "binary") byte[] binary,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") Date dateTime,@FormParam(value = "password") String password,@FormParam(value = "callback") String paramCallback) { public Response testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "double") Double _double,@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter,@FormParam(value = "byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "float") Float _float,@FormParam(value = "string") String string,@FormParam(value = "binary") byte[] binary,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") Date dateTime,@FormParam(value = "password") String password,@FormParam(value = "callback") String paramCallback) {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }
@ -96,10 +97,10 @@ public class FakeApi {
@Consumes({ "*/*" }) @Consumes({ "*/*" })
@Produces({ "*/*" }) @Produces({ "*/*" })
@ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", response = void.class, tags={ "fake", }) @ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", response = Void.class, tags={ "fake", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid request", response = void.class), @ApiResponse(code = 400, message = "Invalid request", response = Void.class),
@ApiResponse(code = 404, message = "Not found", response = void.class) }) @ApiResponse(code = 404, message = "Not found", response = Void.class) })
public Response testEnumParameters(@FormParam(value = "enum_form_string_array") List<String> enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString,@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray,@HeaderParam("enum_header_string") String enumHeaderString,@QueryParam("enum_query_string_array") List<String> enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") String enumQueryString,@QueryParam("enum_query_integer") Integer enumQueryInteger,@FormParam(value = "enum_query_double") Double enumQueryDouble) { public Response testEnumParameters(@FormParam(value = "enum_form_string_array") List<String> enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString,@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray,@HeaderParam("enum_header_string") String enumHeaderString,@QueryParam("enum_query_string_array") List<String> enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") String enumQueryString,@QueryParam("enum_query_integer") Integer enumQueryInteger,@FormParam(value = "enum_query_double") Double enumQueryDouble) {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }
@ -108,9 +109,9 @@ public class FakeApi {
@Path("/jsonFormData") @Path("/jsonFormData")
@Consumes({ "application/json" }) @Consumes({ "application/json" })
@ApiOperation(value = "test json serialization of form data", notes = "", response = void.class, tags={ "fake" }) @ApiOperation(value = "test json serialization of form data", notes = "", response = Void.class, tags={ "fake" })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = void.class) }) @ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response testJsonFormData(@FormParam(value = "param") String param,@FormParam(value = "param2") String param2) { public Response testJsonFormData(@FormParam(value = "param") String param,@FormParam(value = "param2") String param2) {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }

View File

@ -7,6 +7,7 @@ import javax.ws.rs.core.Response;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import java.util.Map;
import java.util.List; import java.util.List;
import javax.validation.constraints.*; import javax.validation.constraints.*;
@ -23,7 +24,9 @@ public class FakeClassnameTestApi {
@Consumes({ "application/json" }) @Consumes({ "application/json" })
@Produces({ "application/json" }) @Produces({ "application/json" })
@ApiOperation(value = "To test class name in snake case", notes = "", response = Client.class, tags={ "fake_classname_tags 123#$%^" }) @ApiOperation(value = "To test class name in snake case", notes = "", response = Client.class, authorizations = {
@Authorization(value = "api_key_query")
}, tags={ "fake_classname_tags 123#$%^" })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response testClassname(Client body) { public Response testClassname(Client body) {

View File

@ -9,6 +9,7 @@ import javax.ws.rs.core.Response;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import java.util.Map;
import java.util.List; import java.util.List;
import javax.validation.constraints.*; import javax.validation.constraints.*;
@ -25,14 +26,14 @@ public class PetApi {
@Consumes({ "application/json", "application/xml" }) @Consumes({ "application/json", "application/xml" })
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Add a new pet to the store", notes = "", response = void.class, authorizations = { @ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = { @Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@AuthorizationScope(scope = "read:pets", description = "read your pets") @AuthorizationScope(scope = "read:pets", description = "read your pets")
}) })
}, tags={ "pet", }) }, tags={ "pet", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input", response = void.class) }) @ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
public Response addPet(Pet body) { public Response addPet(Pet body) {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }
@ -41,14 +42,14 @@ public class PetApi {
@Path("/{petId}") @Path("/{petId}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Deletes a pet", notes = "", response = void.class, authorizations = { @ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = { @Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@AuthorizationScope(scope = "read:pets", description = "read your pets") @AuthorizationScope(scope = "read:pets", description = "read your pets")
}) })
}, tags={ "pet", }) }, tags={ "pet", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid pet value", response = void.class) }) @ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
public Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId,@HeaderParam("api_key") String apiKey) { public Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId,@HeaderParam("api_key") String apiKey) {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }
@ -65,7 +66,7 @@ public class PetApi {
}, tags={ "pet", }) }, tags={ "pet", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@ApiResponse(code = 400, message = "Invalid status value", response = Pet.class, responseContainer = "List") }) @ApiResponse(code = 400, message = "Invalid status value", response = Void.class) })
public Response findPetsByStatus(@QueryParam("status") @NotNull List<String> status) { public Response findPetsByStatus(@QueryParam("status") @NotNull List<String> status) {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }
@ -82,7 +83,7 @@ public class PetApi {
}, tags={ "pet", }) }, tags={ "pet", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class, responseContainer = "List") }) @ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) })
public Response findPetsByTags(@QueryParam("tags") @NotNull List<String> tags) { public Response findPetsByTags(@QueryParam("tags") @NotNull List<String> tags) {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }
@ -96,8 +97,8 @@ public class PetApi {
}, tags={ "pet", }) }, tags={ "pet", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class), @ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@ApiResponse(code = 404, message = "Pet not found", response = Pet.class) }) @ApiResponse(code = 404, message = "Pet not found", response = Void.class) })
public Response getPetById(@PathParam("petId") @ApiParam("ID of pet to return") Long petId) { public Response getPetById(@PathParam("petId") @ApiParam("ID of pet to return") Long petId) {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }
@ -106,16 +107,16 @@ public class PetApi {
@Consumes({ "application/json", "application/xml" }) @Consumes({ "application/json", "application/xml" })
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Update an existing pet", notes = "", response = void.class, authorizations = { @ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = { @Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@AuthorizationScope(scope = "read:pets", description = "read your pets") @AuthorizationScope(scope = "read:pets", description = "read your pets")
}) })
}, tags={ "pet", }) }, tags={ "pet", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@ApiResponse(code = 404, message = "Pet not found", response = void.class), @ApiResponse(code = 404, message = "Pet not found", response = Void.class),
@ApiResponse(code = 405, message = "Validation exception", response = void.class) }) @ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
public Response updatePet(Pet body) { public Response updatePet(Pet body) {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }
@ -124,14 +125,14 @@ public class PetApi {
@Path("/{petId}") @Path("/{petId}")
@Consumes({ "application/x-www-form-urlencoded" }) @Consumes({ "application/x-www-form-urlencoded" })
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = void.class, authorizations = { @ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = { @Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@AuthorizationScope(scope = "read:pets", description = "read your pets") @AuthorizationScope(scope = "read:pets", description = "read your pets")
}) })
}, tags={ "pet", }) }, tags={ "pet", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input", response = void.class) }) @ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
public Response updatePetWithForm(@PathParam("petId") @ApiParam("ID of pet that needs to be updated") Long petId,@FormParam(value = "name") String name,@FormParam(value = "status") String status) { public Response updatePetWithForm(@PathParam("petId") @ApiParam("ID of pet that needs to be updated") Long petId,@FormParam(value = "name") String name,@FormParam(value = "status") String status) {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }

View File

@ -8,6 +8,7 @@ import javax.ws.rs.core.Response;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import java.util.Map;
import java.util.List; import java.util.List;
import javax.validation.constraints.*; import javax.validation.constraints.*;
@ -24,10 +25,10 @@ public class StoreApi {
@Path("/order/{order_id}") @Path("/order/{order_id}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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", }) @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", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@ApiResponse(code = 404, message = "Order not found", response = void.class) }) @ApiResponse(code = 404, message = "Order not found", response = Void.class) })
public Response deleteOrder(@PathParam("order_id") @ApiParam("ID of the order that needs to be deleted") String orderId) { public Response deleteOrder(@PathParam("order_id") @ApiParam("ID of the order that needs to be deleted") String orderId) {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }
@ -40,7 +41,7 @@ public class StoreApi {
@Authorization(value = "api_key") @Authorization(value = "api_key")
}, tags={ "store", }) }, tags={ "store", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") }) @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
public Response getInventory() { public Response getInventory() {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }
@ -52,8 +53,8 @@ public class StoreApi {
@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", }) @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", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@ApiResponse(code = 404, message = "Order not found", response = Order.class) }) @ApiResponse(code = 404, message = "Order not found", response = Void.class) })
public Response getOrderById(@PathParam("order_id") @Min(1) @Max(5) @ApiParam("ID of pet that needs to be fetched") Long orderId) { public Response getOrderById(@PathParam("order_id") @Min(1) @Max(5) @ApiParam("ID of pet that needs to be fetched") Long orderId) {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }
@ -65,7 +66,7 @@ public class StoreApi {
@ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store" }) @ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store" })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid Order", response = Order.class) }) @ApiResponse(code = 400, message = "Invalid Order", response = Void.class) })
public Response placeOrder(Order body) { public Response placeOrder(Order body) {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }

View File

@ -8,6 +8,7 @@ import javax.ws.rs.core.Response;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import java.util.Map;
import java.util.List; import java.util.List;
import javax.validation.constraints.*; import javax.validation.constraints.*;
@ -24,9 +25,9 @@ public class UserApi {
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", }) @ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = void.class) }) @ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUser(User body) { public Response createUser(User body) {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }
@ -35,9 +36,9 @@ public class UserApi {
@Path("/createWithArray") @Path("/createWithArray")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", }) @ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = void.class) }) @ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUsersWithArrayInput(List<User> body) { public Response createUsersWithArrayInput(List<User> body) {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }
@ -46,9 +47,9 @@ public class UserApi {
@Path("/createWithList") @Path("/createWithList")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", }) @ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = void.class) }) @ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUsersWithListInput(List<User> body) { public Response createUsersWithListInput(List<User> body) {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }
@ -57,10 +58,10 @@ public class UserApi {
@Path("/{username}") @Path("/{username}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", }) @ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid username supplied", response = void.class), @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@ApiResponse(code = 404, message = "User not found", response = void.class) }) @ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response deleteUser(@PathParam("username") @ApiParam("The name that needs to be deleted") String username) { public Response deleteUser(@PathParam("username") @ApiParam("The name that needs to be deleted") String username) {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }
@ -72,8 +73,8 @@ public class UserApi {
@ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", }) @ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = User.class), @ApiResponse(code = 200, message = "successful operation", response = User.class),
@ApiResponse(code = 400, message = "Invalid username supplied", response = User.class), @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@ApiResponse(code = 404, message = "User not found", response = User.class) }) @ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response getUserByName(@PathParam("username") @ApiParam("The name that needs to be fetched. Use user1 for testing. ") String username) { public Response getUserByName(@PathParam("username") @ApiParam("The name that needs to be fetched. Use user1 for testing. ") String username) {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }
@ -85,7 +86,7 @@ public class UserApi {
@ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", }) @ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = String.class), @ApiResponse(code = 200, message = "successful operation", response = String.class),
@ApiResponse(code = 400, message = "Invalid username/password supplied", response = String.class) }) @ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) })
public Response loginUser(@QueryParam("username") @NotNull String username,@QueryParam("password") @NotNull String password) { public Response loginUser(@QueryParam("username") @NotNull String username,@QueryParam("password") @NotNull String password) {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }
@ -94,9 +95,9 @@ public class UserApi {
@Path("/logout") @Path("/logout")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Logs out current logged in user session", notes = "", response = void.class, tags={ "user", }) @ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = void.class) }) @ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response logoutUser() { public Response logoutUser() {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }
@ -105,10 +106,10 @@ public class UserApi {
@Path("/{username}") @Path("/{username}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user" }) @ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user" })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid user supplied", response = void.class), @ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class),
@ApiResponse(code = 404, message = "User not found", response = void.class) }) @ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response updateUser(@PathParam("username") @ApiParam("name that need to be deleted") String username,User body) { public Response updateUser(@PathParam("username") @ApiParam("name that need to be deleted") String username,User body) {
return Response.ok().entity("magic!").build(); return Response.ok().entity("magic!").build();
} }

View File

@ -21,7 +21,7 @@ public class Cat extends Animal {
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Boolean getDeclawed() { public Boolean isDeclawed() {
return declawed; return declawed;
} }
public void setDeclawed(Boolean declawed) { public void setDeclawed(Boolean declawed) {

View File

@ -138,7 +138,7 @@ public enum StatusEnum {
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public Boolean getComplete() { public Boolean isComplete() {
return complete; return complete;
} }
public void setComplete(Boolean complete) { public void setComplete(Boolean complete) {

View File

@ -108,8 +108,8 @@
"type" : "array", "type" : "array",
"items" : { "items" : {
"type" : "string", "type" : "string",
"default" : "available", "enum" : [ "available", "pending", "sold" ],
"enum" : [ "available", "pending", "sold" ] "default" : "available"
}, },
"collectionFormat" : "csv" "collectionFormat" : "csv"
} ], } ],
@ -166,7 +166,8 @@
}, },
"security" : [ { "security" : [ {
"petstore_auth" : [ "write:pets", "read:pets" ] "petstore_auth" : [ "write:pets", "read:pets" ]
} ] } ],
"deprecated" : true
} }
}, },
"/pet/{petId}" : { "/pet/{petId}" : {
@ -657,7 +658,10 @@
"$ref" : "#/definitions/Client" "$ref" : "#/definitions/Client"
} }
} }
} },
"security" : [ {
"api_key_query" : [ ]
} ]
} }
}, },
"/fake" : { "/fake" : {
@ -676,8 +680,8 @@
"type" : "array", "type" : "array",
"items" : { "items" : {
"type" : "string", "type" : "string",
"default" : "$", "enum" : [ ">", "$" ],
"enum" : [ ">", "$" ] "default" : "$"
} }
}, { }, {
"name" : "enum_form_string", "name" : "enum_form_string",
@ -695,8 +699,8 @@
"type" : "array", "type" : "array",
"items" : { "items" : {
"type" : "string", "type" : "string",
"default" : "$", "enum" : [ ">", "$" ],
"enum" : [ ">", "$" ] "default" : "$"
} }
}, { }, {
"name" : "enum_header_string", "name" : "enum_header_string",
@ -714,8 +718,8 @@
"type" : "array", "type" : "array",
"items" : { "items" : {
"type" : "string", "type" : "string",
"default" : "$", "enum" : [ ">", "$" ],
"enum" : [ ">", "$" ] "default" : "$"
} }
}, { }, {
"name" : "enum_query_string", "name" : "enum_query_string",
@ -1042,6 +1046,11 @@
"name" : "api_key", "name" : "api_key",
"in" : "header" "in" : "header"
}, },
"api_key_query" : {
"type" : "apiKey",
"name" : "api_key_query",
"in" : "query"
},
"http_basic_test" : { "http_basic_test" : {
"type" : "basic" "type" : "basic"
} }

View File

@ -15,6 +15,7 @@ import io.swagger.model.Client;
import java.util.Date; import java.util.Date;
import io.swagger.model.OuterComposite; import io.swagger.model.OuterComposite;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -28,16 +29,16 @@ 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.*;
@Path("/fake") @Path("/Fake")
@io.swagger.annotations.Api(description = "the fake API") @io.swagger.annotations.Api(description = "the Fake API")
public class FakeApi { public class FakeApi {
private final FakeApiService delegate = FakeApiServiceFactory.getFakeApi(); private final FakeApiService delegate = FakeApiServiceFactory.getFakeApi();
@POST @POST
@Path("/outer/boolean")
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", })
@ -50,7 +51,7 @@ public class FakeApi {
return delegate.fakeOuterBooleanSerialize(body,securityContext); return delegate.fakeOuterBooleanSerialize(body,securityContext);
} }
@POST @POST
@Path("/outer/composite")
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", })
@ -63,7 +64,7 @@ public class FakeApi {
return delegate.fakeOuterCompositeSerialize(body,securityContext); return delegate.fakeOuterCompositeSerialize(body,securityContext);
} }
@POST @POST
@Path("/outer/number")
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", })
@ -76,7 +77,7 @@ public class FakeApi {
return delegate.fakeOuterNumberSerialize(body,securityContext); return delegate.fakeOuterNumberSerialize(body,securityContext);
} }
@POST @POST
@Path("/outer/string")
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", })
@ -105,12 +106,12 @@ public class FakeApi {
@Consumes({ "application/xml; charset=utf-8", "application/json; charset=utf-8" }) @Consumes({ "application/xml; charset=utf-8", "application/json; charset=utf-8" })
@Produces({ "application/xml; charset=utf-8", "application/json; charset=utf-8" }) @Produces({ "application/xml; charset=utf-8", "application/json; charset=utf-8" })
@io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = void.class, authorizations = { @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = Void.class, authorizations = {
@io.swagger.annotations.Authorization(value = "http_basic_test") @io.swagger.annotations.Authorization(value = "http_basic_test")
}, tags={ "fake", }) }, tags={ "fake", })
@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),
@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 testEndpointParameters( public Response testEndpointParameters(
@ApiParam(value = "None", required=true) @FormParam("number") BigDecimal number, @ApiParam(value = "None", required=true) @FormParam("number") BigDecimal number,
@ApiParam(value = "None", required=true) @FormParam("double") Double _double, @ApiParam(value = "None", required=true) @FormParam("double") Double _double,
@ -134,10 +135,10 @@ public class FakeApi {
@Consumes({ "*/*" }) @Consumes({ "*/*" })
@Produces({ "*/*" }) @Produces({ "*/*" })
@io.swagger.annotations.ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", response = void.class, tags={ "fake", }) @io.swagger.annotations.ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = void.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) })
public Response testEnumParameters( public Response testEnumParameters(
@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @FormParam("enum_form_string_array") List<String> enumFormStringArray, @ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @FormParam("enum_form_string_array") List<String> enumFormStringArray,
@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString, @ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,
@ -152,12 +153,12 @@ public class FakeApi {
return delegate.testEnumParameters(enumFormStringArray,enumFormString,enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,securityContext); return delegate.testEnumParameters(enumFormStringArray,enumFormString,enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,securityContext);
} }
@GET @GET
@Path("/jsonFormData")
@Consumes({ "application/json" }) @Consumes({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "test json serialization of form data", notes = "", response = void.class, tags={ "fake" }) @io.swagger.annotations.ApiOperation(value = "test json serialization of form data", notes = "", response = Void.class, tags={ "fake" })
@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 testJsonFormData( public Response testJsonFormData(
@ApiParam(value = "field1", required=true) @FormParam("param") String param, @ApiParam(value = "field1", required=true) @FormParam("param") String param,
@ApiParam(value = "field2", required=true) @FormParam("param2") String param2, @ApiParam(value = "field2", required=true) @FormParam("param2") String param2,

View File

@ -1,8 +1,8 @@
package io.swagger.api; package io.swagger.api;
import io.swagger.model.*; import io.swagger.model.*;
import io.swagger.api.FakeClassnameTestApiService; import io.swagger.api.FakeClassnameTags123ApiService;
import io.swagger.api.factories.FakeClassnameTestApiServiceFactory; import io.swagger.api.factories.FakeClassnameTags123ApiServiceFactory;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import io.swagger.jaxrs.*; import io.swagger.jaxrs.*;
@ -12,6 +12,7 @@ import javax.validation.constraints.*;
import io.swagger.model.Client; import io.swagger.model.Client;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -25,13 +26,13 @@ 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.*;
@Path("/fake_classname_test") @Path("/FakeClassnameTags123")
@io.swagger.annotations.Api(description = "the fake_classname_test API") @io.swagger.annotations.Api(description = "the FakeClassnameTags123 API")
public class FakeClassnameTestApi { public class FakeClassnameTags123Api {
private final FakeClassnameTestApiService delegate = FakeClassnameTestApiServiceFactory.getFakeClassnameTestApi(); private final FakeClassnameTags123ApiService delegate = FakeClassnameTags123ApiServiceFactory.getFakeClassnameTags123Api();
@PATCH @PATCH

View File

@ -19,7 +19,7 @@ import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext; import javax.ws.rs.core.SecurityContext;
import javax.validation.constraints.*; import javax.validation.constraints.*;
public abstract class FakeClassnameTestApiService { public abstract class FakeClassnameTags123ApiService {
public abstract Response testClassname(Client body,SecurityContext securityContext) public abstract Response testClassname(Client body,SecurityContext securityContext)
throws NotFoundException; throws NotFoundException;
} }

View File

@ -14,6 +14,7 @@ import java.io.File;
import io.swagger.model.ModelApiResponse; import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet; import io.swagger.model.Pet;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -27,10 +28,10 @@ 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.*;
@Path("/pet") @Path("/Pet")
@io.swagger.annotations.Api(description = "the pet API") @io.swagger.annotations.Api(description = "the Pet API")
public class PetApi { public class PetApi {
private final PetApiService delegate = PetApiServiceFactory.getPetApi(); private final PetApiService delegate = PetApiServiceFactory.getPetApi();
@ -39,14 +40,14 @@ public class PetApi {
@Consumes({ "application/json", "application/xml" }) @Consumes({ "application/json", "application/xml" })
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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"),
@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 = 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" ,required=true) Pet body,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -54,17 +55,17 @@ public class PetApi {
return delegate.addPet(body,securityContext); return delegate.addPet(body,securityContext);
} }
@DELETE @DELETE
@Path("/{petId}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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"),
@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 = 400, message = "Invalid pet value", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
public Response deletePet( public Response deletePet(
@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId, @ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId,
@ApiParam(value = "" )@HeaderParam("api_key") String apiKey, @ApiParam(value = "" )@HeaderParam("api_key") String apiKey,
@ -73,7 +74,7 @@ public class PetApi {
return delegate.deletePet(petId,apiKey,securityContext); return delegate.deletePet(petId,apiKey,securityContext);
} }
@GET @GET
@Path("/findByStatus")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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 = {
@ -84,7 +85,7 @@ public class PetApi {
}, tags={ "pet", }) }, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@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 = Void.class) })
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",required=true, allowableValues="available, pending, sold") @QueryParam("status") List<String> status,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -92,7 +93,7 @@ public class PetApi {
return delegate.findPetsByStatus(status,securityContext); return delegate.findPetsByStatus(status,securityContext);
} }
@GET @GET
@Path("/findByTags")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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 = {
@ -103,7 +104,7 @@ public class PetApi {
}, tags={ "pet", }) }, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@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 = Void.class) })
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",required=true) @QueryParam("tags") List<String> tags,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -111,7 +112,7 @@ public class PetApi {
return delegate.findPetsByTags(tags,securityContext); return delegate.findPetsByTags(tags,securityContext);
} }
@GET @GET
@Path("/{petId}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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 single pet", response = Pet.class, authorizations = {
@ -119,8 +120,8 @@ public class PetApi {
}, tags={ "pet", }) }, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.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 = Void.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 to return",required=true) @PathParam("petId") Long petId,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -131,16 +132,16 @@ public class PetApi {
@Consumes({ "application/json", "application/xml" }) @Consumes({ "application/json", "application/xml" })
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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"),
@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 = 400, message = "Invalid ID supplied", response = void.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@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" ,required=true) Pet body,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -148,17 +149,17 @@ public class PetApi {
return delegate.updatePet(body,securityContext); return delegate.updatePet(body,securityContext);
} }
@POST @POST
@Path("/{petId}")
@Consumes({ "application/x-www-form-urlencoded" }) @Consumes({ "application/x-www-form-urlencoded" })
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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"),
@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 = 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") Long petId,
@ApiParam(value = "Updated name of the pet") @FormParam("name") String name, @ApiParam(value = "Updated name of the pet") @FormParam("name") String name,
@ -168,7 +169,7 @@ public class PetApi {
return delegate.updatePetWithForm(petId,name,status,securityContext); return delegate.updatePetWithForm(petId,name,status,securityContext);
} }
@POST @POST
@Path("/{petId}/uploadImage")
@Consumes({ "multipart/form-data" }) @Consumes({ "multipart/form-data" })
@Produces({ "application/json" }) @Produces({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {

View File

@ -13,6 +13,7 @@ import javax.validation.constraints.*;
import java.util.Map; import java.util.Map;
import io.swagger.model.Order; import io.swagger.model.Order;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -26,22 +27,22 @@ 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.*;
@Path("/store") @Path("/Store")
@io.swagger.annotations.Api(description = "the store API") @io.swagger.annotations.Api(description = "the Store API")
public class StoreApi { public class StoreApi {
private final StoreApiService delegate = StoreApiServiceFactory.getStoreApi(); private final StoreApiService delegate = StoreApiServiceFactory.getStoreApi();
@DELETE @DELETE
@Path("/order/{order_id}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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),
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) })
public Response deleteOrder( public Response deleteOrder(
@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("order_id") String orderId, @ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("order_id") String orderId,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -49,28 +50,28 @@ public class StoreApi {
return delegate.deleteOrder(orderId,securityContext); return delegate.deleteOrder(orderId,securityContext);
} }
@GET @GET
@Path("/inventory")
@Produces({ "application/json" }) @Produces({ "application/json" })
@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", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") }) @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
public Response getInventory( public Response getInventory(
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.getInventory(securityContext); return delegate.getInventory(securityContext);
} }
@GET @GET
@Path("/order/{order_id}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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 = Void.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 = Void.class) })
public Response getOrderById( public Response getOrderById(
@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Long orderId, @ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Long orderId,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -78,13 +79,13 @@ public class StoreApi {
return delegate.getOrderById(orderId,securityContext); return delegate.getOrderById(orderId,securityContext);
} }
@POST @POST
@Path("/order")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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 = Void.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" ,required=true) Order body,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)

View File

@ -13,6 +13,7 @@ import javax.validation.constraints.*;
import java.util.List; import java.util.List;
import io.swagger.model.User; import io.swagger.model.User;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -26,10 +27,10 @@ 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.*;
@Path("/user") @Path("/User")
@io.swagger.annotations.Api(description = "the user API") @io.swagger.annotations.Api(description = "the User API")
public class UserApi { public class UserApi {
private final UserApiService delegate = UserApiServiceFactory.getUserApi(); private final UserApiService delegate = UserApiServiceFactory.getUserApi();
@ -38,9 +39,9 @@ public class UserApi {
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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" ,required=true) User body,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -48,12 +49,12 @@ public class UserApi {
return delegate.createUser(body,securityContext); return delegate.createUser(body,securityContext);
} }
@POST @POST
@Path("/createWithArray")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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" ,required=true) List<User> body,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -61,12 +62,12 @@ public class UserApi {
return delegate.createUsersWithArrayInput(body,securityContext); return delegate.createUsersWithArrayInput(body,securityContext);
} }
@POST @POST
@Path("/createWithList")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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" ,required=true) List<User> body,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -74,13 +75,13 @@ public class UserApi {
return delegate.createUsersWithListInput(body,securityContext); return delegate.createUsersWithListInput(body,securityContext);
} }
@DELETE @DELETE
@Path("/{username}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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),
@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 deleteUser( public Response deleteUser(
@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username, @ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -88,14 +89,14 @@ public class UserApi {
return delegate.deleteUser(username,securityContext); return delegate.deleteUser(username,securityContext);
} }
@GET @GET
@Path("/{username}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = User.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = User.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response getUserByName( public Response getUserByName(
@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathParam("username") String username, @ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathParam("username") String username,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -103,13 +104,13 @@ public class UserApi {
return delegate.getUserByName(username,securityContext); return delegate.getUserByName(username,securityContext);
} }
@GET @GET
@Path("/login")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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 = Void.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",required=true) @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",required=true) @QueryParam("password") String password,
@ -118,25 +119,25 @@ public class UserApi {
return delegate.loginUser(username,password,securityContext); return delegate.loginUser(username,password,securityContext);
} }
@GET @GET
@Path("/logout")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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) })
public Response logoutUser( public Response logoutUser(
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.logoutUser(securityContext); return delegate.logoutUser(securityContext);
} }
@PUT @PUT
@Path("/{username}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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" ,required=true) User body,

View File

@ -0,0 +1,13 @@
package io.swagger.api.factories;
import io.swagger.api.FakeClassnameTags123ApiService;
import io.swagger.api.impl.FakeClassnameTags123ApiServiceImpl;
public class FakeClassnameTags123ApiServiceFactory {
private final static FakeClassnameTags123ApiService service = new FakeClassnameTags123ApiServiceImpl();
public static FakeClassnameTags123ApiService getFakeClassnameTags123Api() {
return service;
}
}

View File

@ -1,13 +0,0 @@
package io.swagger.api.factories;
import io.swagger.api.FakeClassnameTestApiService;
import io.swagger.api.impl.FakeClassnameTestApiServiceImpl;
public class FakeClassnameTestApiServiceFactory {
private final static FakeClassnameTestApiService service = new FakeClassnameTestApiServiceImpl();
public static FakeClassnameTestApiService getFakeClassnameTestApi() {
return service;
}
}

View File

@ -19,7 +19,7 @@ import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext; import javax.ws.rs.core.SecurityContext;
import javax.validation.constraints.*; import javax.validation.constraints.*;
public class FakeClassnameTestApiServiceImpl extends FakeClassnameTestApiService { public class FakeClassnameTags123ApiServiceImpl extends FakeClassnameTags123ApiService {
@Override @Override
public Response testClassname(Client body, SecurityContext securityContext) public Response testClassname(Client body, SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {

View File

@ -1,4 +1,4 @@
# Swagger generated server # Swagger Jersey generated server
## Overview ## Overview
This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the

View File

@ -15,6 +15,7 @@ import io.swagger.model.Client;
import java.util.Date; import java.util.Date;
import io.swagger.model.OuterComposite; import io.swagger.model.OuterComposite;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -105,12 +106,12 @@ public class FakeApi {
@Consumes({ "application/xml; charset=utf-8", "application/json; charset=utf-8" }) @Consumes({ "application/xml; charset=utf-8", "application/json; charset=utf-8" })
@Produces({ "application/xml; charset=utf-8", "application/json; charset=utf-8" }) @Produces({ "application/xml; charset=utf-8", "application/json; charset=utf-8" })
@io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = void.class, authorizations = { @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = Void.class, authorizations = {
@io.swagger.annotations.Authorization(value = "http_basic_test") @io.swagger.annotations.Authorization(value = "http_basic_test")
}, tags={ "fake", }) }, tags={ "fake", })
@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),
@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 testEndpointParameters( public Response testEndpointParameters(
@ApiParam(value = "None", required=true) @FormParam("number") BigDecimal number, @ApiParam(value = "None", required=true) @FormParam("number") BigDecimal number,
@ApiParam(value = "None", required=true) @FormParam("double") Double _double, @ApiParam(value = "None", required=true) @FormParam("double") Double _double,
@ -134,10 +135,10 @@ public class FakeApi {
@Consumes({ "*/*" }) @Consumes({ "*/*" })
@Produces({ "*/*" }) @Produces({ "*/*" })
@io.swagger.annotations.ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", response = void.class, tags={ "fake", }) @io.swagger.annotations.ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = void.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) })
public Response testEnumParameters( public Response testEnumParameters(
@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @FormParam("enum_form_string_array") List<String> enumFormStringArray, @ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @FormParam("enum_form_string_array") List<String> enumFormStringArray,
@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString, @ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,
@ -155,9 +156,9 @@ public class FakeApi {
@Path("/jsonFormData") @Path("/jsonFormData")
@Consumes({ "application/json" }) @Consumes({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "test json serialization of form data", notes = "", response = void.class, tags={ "fake" }) @io.swagger.annotations.ApiOperation(value = "test json serialization of form data", notes = "", response = Void.class, tags={ "fake" })
@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 testJsonFormData( public Response testJsonFormData(
@ApiParam(value = "field1", required=true) @FormParam("param") String param, @ApiParam(value = "field1", required=true) @FormParam("param") String param,
@ApiParam(value = "field2", required=true) @FormParam("param2") String param2, @ApiParam(value = "field2", required=true) @FormParam("param2") String param2,

View File

@ -12,6 +12,7 @@ import javax.validation.constraints.*;
import io.swagger.model.Client; import io.swagger.model.Client;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;

View File

@ -14,6 +14,7 @@ import java.io.File;
import io.swagger.model.ModelApiResponse; import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet; import io.swagger.model.Pet;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -39,14 +40,14 @@ public class PetApi {
@Consumes({ "application/json", "application/xml" }) @Consumes({ "application/json", "application/xml" })
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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"),
@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 = 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" ,required=true) Pet body,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -57,14 +58,14 @@ public class PetApi {
@Path("/{petId}") @Path("/{petId}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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"),
@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 = 400, message = "Invalid pet value", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
public Response deletePet( public Response deletePet(
@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId, @ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId,
@ApiParam(value = "" )@HeaderParam("api_key") String apiKey, @ApiParam(value = "" )@HeaderParam("api_key") String apiKey,
@ -84,7 +85,7 @@ public class PetApi {
}, tags={ "pet", }) }, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@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 = Void.class) })
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",required=true, allowableValues="available, pending, sold") @QueryParam("status") List<String> status,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -103,7 +104,7 @@ public class PetApi {
}, tags={ "pet", }) }, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@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 = Void.class) })
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",required=true) @QueryParam("tags") List<String> tags,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -119,8 +120,8 @@ public class PetApi {
}, tags={ "pet", }) }, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.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 = Void.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 to return",required=true) @PathParam("petId") Long petId,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -131,16 +132,16 @@ public class PetApi {
@Consumes({ "application/json", "application/xml" }) @Consumes({ "application/json", "application/xml" })
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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"),
@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 = 400, message = "Invalid ID supplied", response = void.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@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" ,required=true) Pet body,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -151,14 +152,14 @@ public class PetApi {
@Path("/{petId}") @Path("/{petId}")
@Consumes({ "application/x-www-form-urlencoded" }) @Consumes({ "application/x-www-form-urlencoded" })
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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"),
@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 = 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") Long petId,
@ApiParam(value = "Updated name of the pet") @FormParam("name") String name, @ApiParam(value = "Updated name of the pet") @FormParam("name") String name,

View File

@ -13,6 +13,7 @@ import javax.validation.constraints.*;
import java.util.Map; import java.util.Map;
import io.swagger.model.Order; import io.swagger.model.Order;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -38,10 +39,10 @@ public class StoreApi {
@Path("/order/{order_id}") @Path("/order/{order_id}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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),
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) })
public Response deleteOrder( public Response deleteOrder(
@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("order_id") String orderId, @ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("order_id") String orderId,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -56,7 +57,7 @@ public class StoreApi {
@io.swagger.annotations.Authorization(value = "api_key") @io.swagger.annotations.Authorization(value = "api_key")
}, tags={ "store", }) }, tags={ "store", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") }) @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
public Response getInventory( public Response getInventory(
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
@ -69,8 +70,8 @@ public class StoreApi {
@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 = Void.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 = Void.class) })
public Response getOrderById( public Response getOrderById(
@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Long orderId, @ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Long orderId,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -84,7 +85,7 @@ public class StoreApi {
@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 = Void.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" ,required=true) Order body,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)

View File

@ -13,6 +13,7 @@ import javax.validation.constraints.*;
import java.util.List; import java.util.List;
import io.swagger.model.User; import io.swagger.model.User;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -38,9 +39,9 @@ public class UserApi {
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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" ,required=true) User body,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -51,9 +52,9 @@ public class UserApi {
@Path("/createWithArray") @Path("/createWithArray")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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" ,required=true) List<User> body,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -64,9 +65,9 @@ public class UserApi {
@Path("/createWithList") @Path("/createWithList")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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" ,required=true) List<User> body,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -77,10 +78,10 @@ public class UserApi {
@Path("/{username}") @Path("/{username}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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),
@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 deleteUser( public Response deleteUser(
@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username, @ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -94,8 +95,8 @@ public class UserApi {
@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),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = User.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = User.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response getUserByName( public Response getUserByName(
@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathParam("username") String username, @ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathParam("username") String username,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
@ -109,7 +110,7 @@ public class UserApi {
@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 = Void.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",required=true) @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",required=true) @QueryParam("password") String password,
@ -121,9 +122,9 @@ public class UserApi {
@Path("/logout") @Path("/logout")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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) })
public Response logoutUser( public Response logoutUser(
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
@ -133,10 +134,10 @@ public class UserApi {
@Path("/{username}") @Path("/{username}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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" ,required=true) User body,

View File

@ -12,6 +12,7 @@ import io.swagger.model.Client;
import java.util.Date; import java.util.Date;
import io.swagger.model.OuterComposite; import io.swagger.model.OuterComposite;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -27,10 +28,10 @@ import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.*; import javax.ws.rs.*;
import javax.validation.constraints.*; import javax.validation.constraints.*;
@Path("/fake") @Path("/Fake")
@io.swagger.annotations.Api(description = "the fake API") @io.swagger.annotations.Api(description = "the Fake API")
public class FakeApi { public class FakeApi {
private final FakeApiService delegate; private final FakeApiService delegate;
@ -57,7 +58,7 @@ public class FakeApi {
} }
@POST @POST
@Path("/outer/boolean")
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", })
@ -69,7 +70,7 @@ public class FakeApi {
return delegate.fakeOuterBooleanSerialize(body,securityContext); return delegate.fakeOuterBooleanSerialize(body,securityContext);
} }
@POST @POST
@Path("/outer/composite")
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", })
@ -81,7 +82,7 @@ public class FakeApi {
return delegate.fakeOuterCompositeSerialize(body,securityContext); return delegate.fakeOuterCompositeSerialize(body,securityContext);
} }
@POST @POST
@Path("/outer/number")
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", })
@ -93,7 +94,7 @@ public class FakeApi {
return delegate.fakeOuterNumberSerialize(body,securityContext); return delegate.fakeOuterNumberSerialize(body,securityContext);
} }
@POST @POST
@Path("/outer/string")
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", })
@ -120,13 +121,13 @@ public class FakeApi {
@Consumes({ "application/xml; charset=utf-8", "application/json; charset=utf-8" }) @Consumes({ "application/xml; charset=utf-8", "application/json; charset=utf-8" })
@Produces({ "application/xml; charset=utf-8", "application/json; charset=utf-8" }) @Produces({ "application/xml; charset=utf-8", "application/json; charset=utf-8" })
@io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = void.class, authorizations = { @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = Void.class, authorizations = {
@io.swagger.annotations.Authorization(value = "http_basic_test") @io.swagger.annotations.Authorization(value = "http_basic_test")
}, tags={ "fake", }) }, tags={ "fake", })
@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),
@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 testEndpointParameters(@ApiParam(value = "None", required=true) @FormParam("number") BigDecimal number public Response testEndpointParameters(@ApiParam(value = "None", required=true) @FormParam("number") BigDecimal number
,@ApiParam(value = "None", required=true) @FormParam("double") Double _double ,@ApiParam(value = "None", required=true) @FormParam("double") Double _double
,@ApiParam(value = "None", required=true) @FormParam("pattern_without_delimiter") String patternWithoutDelimiter ,@ApiParam(value = "None", required=true) @FormParam("pattern_without_delimiter") String patternWithoutDelimiter
@ -149,11 +150,11 @@ public class FakeApi {
@Consumes({ "*/*" }) @Consumes({ "*/*" })
@Produces({ "*/*" }) @Produces({ "*/*" })
@io.swagger.annotations.ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", response = void.class, tags={ "fake", }) @io.swagger.annotations.ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = void.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) })
public Response testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @FormParam("enum_form_string_array") List<String> enumFormStringArray public Response testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @FormParam("enum_form_string_array") List<String> enumFormStringArray
,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString ,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString
,@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray ,@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray
@ -167,12 +168,12 @@ public class FakeApi {
return delegate.testEnumParameters(enumFormStringArray,enumFormString,enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,securityContext); return delegate.testEnumParameters(enumFormStringArray,enumFormString,enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,securityContext);
} }
@GET @GET
@Path("/jsonFormData")
@Consumes({ "application/json" }) @Consumes({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "test json serialization of form data", notes = "", response = void.class, tags={ "fake", }) @io.swagger.annotations.ApiOperation(value = "test json serialization of form data", notes = "", response = Void.class, tags={ "fake", })
@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 testJsonFormData(@ApiParam(value = "field1", required=true) @FormParam("param") String param public Response testJsonFormData(@ApiParam(value = "field1", required=true) @FormParam("param") String param
,@ApiParam(value = "field2", required=true) @FormParam("param2") String param2 ,@ApiParam(value = "field2", required=true) @FormParam("param2") String param2
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)

View File

@ -1,14 +1,15 @@
package io.swagger.api; package io.swagger.api;
import io.swagger.model.*; import io.swagger.model.*;
import io.swagger.api.FakeClassnameTestApiService; import io.swagger.api.FakeClassnameTags123ApiService;
import io.swagger.api.factories.FakeClassnameTestApiServiceFactory; import io.swagger.api.factories.FakeClassnameTags123ApiServiceFactory;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import io.swagger.jaxrs.*; import io.swagger.jaxrs.*;
import io.swagger.model.Client; import io.swagger.model.Client;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -24,22 +25,22 @@ import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.*; import javax.ws.rs.*;
import javax.validation.constraints.*; import javax.validation.constraints.*;
@Path("/fake_classname_test") @Path("/FakeClassnameTags123")
@io.swagger.annotations.Api(description = "the fake_classname_test API") @io.swagger.annotations.Api(description = "the FakeClassnameTags123 API")
public class FakeClassnameTestApi { public class FakeClassnameTags123Api {
private final FakeClassnameTestApiService delegate; private final FakeClassnameTags123ApiService delegate;
public FakeClassnameTestApi(@Context ServletConfig servletContext) { public FakeClassnameTags123Api(@Context ServletConfig servletContext) {
FakeClassnameTestApiService delegate = null; FakeClassnameTags123ApiService delegate = null;
if (servletContext != null) { if (servletContext != null) {
String implClass = servletContext.getInitParameter("FakeClassnameTestApi.implementation"); String implClass = servletContext.getInitParameter("FakeClassnameTags123Api.implementation");
if (implClass != null && !"".equals(implClass.trim())) { if (implClass != null && !"".equals(implClass.trim())) {
try { try {
delegate = (FakeClassnameTestApiService) Class.forName(implClass).newInstance(); delegate = (FakeClassnameTags123ApiService) Class.forName(implClass).newInstance();
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
@ -47,7 +48,7 @@ public class FakeClassnameTestApi {
} }
if (delegate == null) { if (delegate == null) {
delegate = FakeClassnameTestApiServiceFactory.getFakeClassnameTestApi(); delegate = FakeClassnameTags123ApiServiceFactory.getFakeClassnameTags123Api();
} }
this.delegate = delegate; this.delegate = delegate;

View File

@ -16,6 +16,6 @@ import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext; import javax.ws.rs.core.SecurityContext;
import javax.validation.constraints.*; import javax.validation.constraints.*;
public abstract class FakeClassnameTestApiService { public abstract class FakeClassnameTags123ApiService {
public abstract Response testClassname(Client body,SecurityContext securityContext) throws NotFoundException; public abstract Response testClassname(Client body,SecurityContext securityContext) throws NotFoundException;
} }

View File

@ -11,6 +11,7 @@ import java.io.File;
import io.swagger.model.ModelApiResponse; import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet; import io.swagger.model.Pet;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -26,10 +27,10 @@ import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.*; import javax.ws.rs.*;
import javax.validation.constraints.*; import javax.validation.constraints.*;
@Path("/pet") @Path("/Pet")
@io.swagger.annotations.Api(description = "the pet API") @io.swagger.annotations.Api(description = "the Pet API")
public class PetApi { public class PetApi {
private final PetApiService delegate; private final PetApiService delegate;
@ -59,31 +60,31 @@ public class PetApi {
@Consumes({ "application/json", "application/xml" }) @Consumes({ "application/json", "application/xml" })
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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"),
@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 = 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" ,required=true) Pet body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.addPet(body,securityContext); return delegate.addPet(body,securityContext);
} }
@DELETE @DELETE
@Path("/{petId}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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"),
@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 = 400, message = "Invalid pet value", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId
,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey ,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
@ -91,7 +92,7 @@ public class PetApi {
return delegate.deletePet(petId,apiKey,securityContext); return delegate.deletePet(petId,apiKey,securityContext);
} }
@GET @GET
@Path("/findByStatus")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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 = {
@ -103,14 +104,14 @@ public class PetApi {
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@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 = Void.class) })
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",required=true, allowableValues="available, pending, sold") @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);
} }
@GET @GET
@Path("/findByTags")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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 = {
@ -122,14 +123,14 @@ public class PetApi {
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@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 = Void.class) })
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",required=true) @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);
} }
@GET @GET
@Path("/{petId}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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 single pet", response = Pet.class, authorizations = {
@ -138,9 +139,9 @@ public class PetApi {
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.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 = Void.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 to return",required=true) @PathParam("petId") Long petId
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
@ -150,35 +151,35 @@ public class PetApi {
@Consumes({ "application/json", "application/xml" }) @Consumes({ "application/json", "application/xml" })
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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"),
@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 = 400, message = "Invalid ID supplied", response = void.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@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" ,required=true) Pet body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.updatePet(body,securityContext); return delegate.updatePet(body,securityContext);
} }
@POST @POST
@Path("/{petId}")
@Consumes({ "application/x-www-form-urlencoded" }) @Consumes({ "application/x-www-form-urlencoded" })
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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"),
@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 = 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") Long 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
@ -187,7 +188,7 @@ public class PetApi {
return delegate.updatePetWithForm(petId,name,status,securityContext); return delegate.updatePetWithForm(petId,name,status,securityContext);
} }
@POST @POST
@Path("/{petId}/uploadImage")
@Consumes({ "multipart/form-data" }) @Consumes({ "multipart/form-data" })
@Produces({ "application/json" }) @Produces({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {

View File

@ -10,6 +10,7 @@ import io.swagger.jaxrs.*;
import java.util.Map; import java.util.Map;
import io.swagger.model.Order; import io.swagger.model.Order;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -25,10 +26,10 @@ import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.*; import javax.ws.rs.*;
import javax.validation.constraints.*; import javax.validation.constraints.*;
@Path("/store") @Path("/Store")
@io.swagger.annotations.Api(description = "the store API") @io.swagger.annotations.Api(description = "the Store API")
public class StoreApi { public class StoreApi {
private final StoreApiService delegate; private final StoreApiService delegate;
@ -55,57 +56,57 @@ public class StoreApi {
} }
@DELETE @DELETE
@Path("/order/{order_id}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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),
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) })
public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("order_id") String orderId public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("order_id") String orderId
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.deleteOrder(orderId,securityContext); return delegate.deleteOrder(orderId,securityContext);
} }
@GET @GET
@Path("/inventory")
@Produces({ "application/json" }) @Produces({ "application/json" })
@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", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") }) @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
public Response getInventory(@Context SecurityContext securityContext) public Response getInventory(@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.getInventory(securityContext); return delegate.getInventory(securityContext);
} }
@GET @GET
@Path("/order/{order_id}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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 = Void.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 = Void.class) })
public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Long orderId public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Long orderId
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.getOrderById(orderId,securityContext); return delegate.getOrderById(orderId,securityContext);
} }
@POST @POST
@Path("/order")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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 = Void.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" ,required=true) Order body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {

View File

@ -10,6 +10,7 @@ import io.swagger.jaxrs.*;
import java.util.List; import java.util.List;
import io.swagger.model.User; import io.swagger.model.User;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -25,10 +26,10 @@ import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.*; import javax.ws.rs.*;
import javax.validation.constraints.*; import javax.validation.constraints.*;
@Path("/user") @Path("/User")
@io.swagger.annotations.Api(description = "the user API") @io.swagger.annotations.Api(description = "the User API")
public class UserApi { public class UserApi {
private final UserApiService delegate; private final UserApiService delegate;
@ -58,77 +59,77 @@ public class UserApi {
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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" ,required=true) User body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.createUser(body,securityContext); return delegate.createUser(body,securityContext);
} }
@POST @POST
@Path("/createWithArray")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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" ,required=true) List<User> body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.createUsersWithArrayInput(body,securityContext); return delegate.createUsersWithArrayInput(body,securityContext);
} }
@POST @POST
@Path("/createWithList")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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" ,required=true) List<User> body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.createUsersWithListInput(body,securityContext); return delegate.createUsersWithListInput(body,securityContext);
} }
@DELETE @DELETE
@Path("/{username}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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),
@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 deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username public Response deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.deleteUser(username,securityContext); return delegate.deleteUser(username,securityContext);
} }
@GET @GET
@Path("/{username}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = User.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = User.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathParam("username") String username public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathParam("username") String username
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.getUserByName(username,securityContext); return delegate.getUserByName(username,securityContext);
} }
@GET @GET
@Path("/login")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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 = Void.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",required=true) @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",required=true) @QueryParam("password") String password
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
@ -136,25 +137,25 @@ public class UserApi {
return delegate.loginUser(username,password,securityContext); return delegate.loginUser(username,password,securityContext);
} }
@GET @GET
@Path("/logout")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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) })
public Response logoutUser(@Context SecurityContext securityContext) public Response logoutUser(@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.logoutUser(securityContext); return delegate.logoutUser(securityContext);
} }
@PUT @PUT
@Path("/{username}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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" ,required=true) User body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)

View File

@ -0,0 +1,13 @@
package io.swagger.api.factories;
import io.swagger.api.FakeClassnameTags123ApiService;
import io.swagger.api.impl.FakeClassnameTags123ApiServiceImpl;
public class FakeClassnameTags123ApiServiceFactory {
private final static FakeClassnameTags123ApiService service = new FakeClassnameTags123ApiServiceImpl();
public static FakeClassnameTags123ApiService getFakeClassnameTags123Api() {
return service;
}
}

View File

@ -1,13 +0,0 @@
package io.swagger.api.factories;
import io.swagger.api.FakeClassnameTestApiService;
import io.swagger.api.impl.FakeClassnameTestApiServiceImpl;
public class FakeClassnameTestApiServiceFactory {
private final static FakeClassnameTestApiService service = new FakeClassnameTestApiServiceImpl();
public static FakeClassnameTestApiService getFakeClassnameTestApi() {
return service;
}
}

View File

@ -16,7 +16,7 @@ import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext; import javax.ws.rs.core.SecurityContext;
import javax.validation.constraints.*; import javax.validation.constraints.*;
public class FakeClassnameTestApiServiceImpl extends FakeClassnameTestApiService { public class FakeClassnameTags123ApiServiceImpl extends FakeClassnameTags123ApiService {
@Override @Override
public Response testClassname(Client body, SecurityContext securityContext) throws NotFoundException { public Response testClassname(Client body, SecurityContext securityContext) throws NotFoundException {
// do some magic! // do some magic!

View File

@ -1,4 +1,4 @@
# Swagger Jersey 2 generated server # Swagger Jersey generated server
## Overview ## Overview
This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the

View File

@ -12,6 +12,7 @@ import io.swagger.model.Client;
import java.util.Date; import java.util.Date;
import io.swagger.model.OuterComposite; import io.swagger.model.OuterComposite;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -120,13 +121,13 @@ public class FakeApi {
@Consumes({ "application/xml; charset=utf-8", "application/json; charset=utf-8" }) @Consumes({ "application/xml; charset=utf-8", "application/json; charset=utf-8" })
@Produces({ "application/xml; charset=utf-8", "application/json; charset=utf-8" }) @Produces({ "application/xml; charset=utf-8", "application/json; charset=utf-8" })
@io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = void.class, authorizations = { @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = Void.class, authorizations = {
@io.swagger.annotations.Authorization(value = "http_basic_test") @io.swagger.annotations.Authorization(value = "http_basic_test")
}, tags={ "fake", }) }, tags={ "fake", })
@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),
@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 testEndpointParameters(@ApiParam(value = "None", required=true) @FormParam("number") BigDecimal number public Response testEndpointParameters(@ApiParam(value = "None", required=true) @FormParam("number") BigDecimal number
,@ApiParam(value = "None", required=true) @FormParam("double") Double _double ,@ApiParam(value = "None", required=true) @FormParam("double") Double _double
,@ApiParam(value = "None", required=true) @FormParam("pattern_without_delimiter") String patternWithoutDelimiter ,@ApiParam(value = "None", required=true) @FormParam("pattern_without_delimiter") String patternWithoutDelimiter
@ -149,11 +150,11 @@ public class FakeApi {
@Consumes({ "*/*" }) @Consumes({ "*/*" })
@Produces({ "*/*" }) @Produces({ "*/*" })
@io.swagger.annotations.ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", response = void.class, tags={ "fake", }) @io.swagger.annotations.ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = void.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) })
public Response testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @FormParam("enum_form_string_array") List<String> enumFormStringArray public Response testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @FormParam("enum_form_string_array") List<String> enumFormStringArray
,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString ,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString
,@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray ,@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray
@ -170,9 +171,9 @@ public class FakeApi {
@Path("/jsonFormData") @Path("/jsonFormData")
@Consumes({ "application/json" }) @Consumes({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "test json serialization of form data", notes = "", response = void.class, tags={ "fake", }) @io.swagger.annotations.ApiOperation(value = "test json serialization of form data", notes = "", response = Void.class, tags={ "fake", })
@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 testJsonFormData(@ApiParam(value = "field1", required=true) @FormParam("param") String param public Response testJsonFormData(@ApiParam(value = "field1", required=true) @FormParam("param") String param
,@ApiParam(value = "field2", required=true) @FormParam("param2") String param2 ,@ApiParam(value = "field2", required=true) @FormParam("param2") String param2
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)

View File

@ -9,6 +9,7 @@ import io.swagger.jaxrs.*;
import io.swagger.model.Client; import io.swagger.model.Client;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;

View File

@ -11,6 +11,7 @@ import java.io.File;
import io.swagger.model.ModelApiResponse; import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet; import io.swagger.model.Pet;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -59,14 +60,14 @@ public class PetApi {
@Consumes({ "application/json", "application/xml" }) @Consumes({ "application/json", "application/xml" })
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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"),
@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 = 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" ,required=true) Pet body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
@ -76,14 +77,14 @@ public class PetApi {
@Path("/{petId}") @Path("/{petId}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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"),
@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 = 400, message = "Invalid pet value", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId
,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey ,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
@ -103,7 +104,7 @@ public class PetApi {
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@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 = Void.class) })
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",required=true, allowableValues="available, pending, sold") @QueryParam("status") List<String> status
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
@ -122,7 +123,7 @@ public class PetApi {
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@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 = Void.class) })
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",required=true) @QueryParam("tags") List<String> tags
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
@ -138,9 +139,9 @@ public class PetApi {
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.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 = Void.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 to return",required=true) @PathParam("petId") Long petId
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
@ -150,18 +151,18 @@ public class PetApi {
@Consumes({ "application/json", "application/xml" }) @Consumes({ "application/json", "application/xml" })
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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"),
@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 = 400, message = "Invalid ID supplied", response = void.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@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" ,required=true) Pet body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
@ -171,14 +172,14 @@ public class PetApi {
@Path("/{petId}") @Path("/{petId}")
@Consumes({ "application/x-www-form-urlencoded" }) @Consumes({ "application/x-www-form-urlencoded" })
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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"),
@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 = 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") Long 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

View File

@ -10,6 +10,7 @@ import io.swagger.jaxrs.*;
import java.util.Map; import java.util.Map;
import io.swagger.model.Order; import io.swagger.model.Order;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -58,11 +59,11 @@ public class StoreApi {
@Path("/order/{order_id}") @Path("/order/{order_id}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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),
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) })
public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("order_id") String orderId public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("order_id") String orderId
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
@ -76,7 +77,7 @@ public class StoreApi {
@io.swagger.annotations.Authorization(value = "api_key") @io.swagger.annotations.Authorization(value = "api_key")
}, tags={ "store", }) }, tags={ "store", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") }) @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
public Response getInventory(@Context SecurityContext securityContext) public Response getInventory(@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.getInventory(securityContext); return delegate.getInventory(securityContext);
@ -89,9 +90,9 @@ public class StoreApi {
@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 = Void.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 = Void.class) })
public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Long orderId public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Long orderId
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
@ -105,7 +106,7 @@ public class StoreApi {
@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 = Void.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" ,required=true) Order body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {

View File

@ -10,6 +10,7 @@ import io.swagger.jaxrs.*;
import java.util.List; import java.util.List;
import io.swagger.model.User; import io.swagger.model.User;
import java.util.Map;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
@ -58,9 +59,9 @@ public class UserApi {
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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" ,required=true) User body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
@ -70,9 +71,9 @@ public class UserApi {
@Path("/createWithArray") @Path("/createWithArray")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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" ,required=true) List<User> body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
@ -82,9 +83,9 @@ public class UserApi {
@Path("/createWithList") @Path("/createWithList")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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" ,required=true) List<User> body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
@ -94,11 +95,11 @@ public class UserApi {
@Path("/{username}") @Path("/{username}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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),
@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 deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username public Response deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
@ -112,9 +113,9 @@ public class UserApi {
@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),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = User.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = User.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathParam("username") String username public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathParam("username") String username
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
@ -128,7 +129,7 @@ public class UserApi {
@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 = Void.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",required=true) @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",required=true) @QueryParam("password") String password
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
@ -139,9 +140,9 @@ public class UserApi {
@Path("/logout") @Path("/logout")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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) })
public Response logoutUser(@Context SecurityContext securityContext) public Response logoutUser(@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.logoutUser(securityContext); return delegate.logoutUser(securityContext);
@ -150,11 +151,11 @@ public class UserApi {
@Path("/{username}") @Path("/{username}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@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" ,required=true) User body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)

View File

@ -1,69 +0,0 @@
package io.swagger.model;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import org.junit.Before;
import org.junit.Test;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
/**
* Tests JSON representation of
*/
public class CapitalizationTest {
private static final String SMALL_CAMEL = "smallCamel";
private static final String SMALL_SNAKE = "small_Snake";
private static final String CAPITAL_CAMEL = "CapitalCamel";
private static final String CAPITAL_SNAKE = "Capital_Snake";
private static final String SCA_ETH_FLOW_POINTS = "SCA_ETH_Flow_Points";
private static final String ATT_NAME = "ATT_NAME";
private static final ObjectMapper MAPPER = new ObjectMapper();
private static final Set<String> EXPECTED
= new HashSet<>(Arrays.asList(SMALL_CAMEL,
SMALL_SNAKE,
CAPITAL_CAMEL,
CAPITAL_SNAKE,
SCA_ETH_FLOW_POINTS,
ATT_NAME));
private Capitalization sut;
@Before
public void setUp() {
sut = new Capitalization();
sut.smallCamel(SMALL_CAMEL);
sut.smallSnake(SMALL_SNAKE);
sut.capitalCamel(CAPITAL_CAMEL);
sut.capitalSnake(CAPITAL_SNAKE);
sut.setScAETHFlowPoints(SCA_ETH_FLOW_POINTS);
sut.setATTNAME(ATT_NAME);
}
@Test
public void test() throws JsonProcessingException {
JsonNode json = MAPPER.valueToTree(sut);
Set<String> fields = new HashSet<>();
Iterator<String> it = json.fieldNames();
while (it.hasNext()) {
fields.add(it.next());
}
assertThat(fields, is(equalTo(EXPECTED)));
}
}