forked from loafle/openapi-generator-original
* [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:
parent
b0db394855
commit
506c58ec74
@ -26,7 +26,7 @@ fi
|
||||
|
||||
# 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"
|
||||
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"
|
||||
rm -rf samples/server/petstore/jaxrs/jersey1/src/main
|
||||
|
@ -26,7 +26,7 @@ fi
|
||||
|
||||
# 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"
|
||||
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"
|
||||
rm -rf samples/server/petstore/jaxrs/jersey1-useTags/src/main
|
||||
|
@ -639,16 +639,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
return null;
|
||||
}
|
||||
|
||||
String typeDeclaration = 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);
|
||||
return String.format(pattern, getTypeDeclaration(ap.getItems()));
|
||||
} else if (p instanceof MapProperty) {
|
||||
final MapProperty ap = (MapProperty) p;
|
||||
final String pattern;
|
||||
@ -661,16 +652,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
return null;
|
||||
}
|
||||
|
||||
String typeDeclaration = 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);
|
||||
return String.format(pattern, String.format("String, %s", getTypeDeclaration(ap.getAdditionalProperties())));
|
||||
} else if (p instanceof IntegerProperty) {
|
||||
IntegerProperty dp = (IntegerProperty) p;
|
||||
if (dp.getDefault() != null) {
|
||||
|
@ -140,6 +140,15 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
|
||||
@SuppressWarnings("unchecked")
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
boolean isMultipartPost = false;
|
||||
List<Map<String, String>> consumes = operation.consumes;
|
||||
if(consumes != null) {
|
||||
@ -166,40 +175,33 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
|
||||
resp.code = "200";
|
||||
}
|
||||
|
||||
// set vendorExtensions.x-java-is-response-void to true as dataType is set to "void"
|
||||
if (resp.dataType == null) {
|
||||
if (resp.baseType == 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);
|
||||
}
|
||||
|
||||
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";
|
||||
// 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);
|
||||
} 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();
|
||||
}
|
||||
|
||||
if ("array".equals(operation.returnContainer)) {
|
||||
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();
|
||||
} else if ("map".equals(operation.returnContainer)) {
|
||||
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;
|
||||
|
@ -133,54 +133,7 @@ public class JavaResteasyEapServerCodegen extends AbstractJavaJAXRSServerCodegen
|
||||
|
||||
@Override
|
||||
public Map<String, Object> postProcessOperations(Map<String, Object> 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;
|
||||
return super.postProcessOperations(objs);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -132,54 +132,7 @@ public class JavaResteasyServerCodegen extends AbstractJavaJAXRSServerCodegen im
|
||||
|
||||
@Override
|
||||
public Map<String, Object> postProcessOperations(Map<String, Object> 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;
|
||||
return super.postProcessOperations(objs);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -10,6 +10,7 @@ import io.swagger.jaxrs.*;
|
||||
{{#imports}}import {{import}};
|
||||
{{/imports}}
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import {{package}}.NotFoundException;
|
||||
|
||||
@ -62,7 +63,7 @@ public class {{classname}} {
|
||||
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
|
||||
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
|
||||
{{#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 = {
|
||||
{{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}},
|
||||
{{/hasMore}}{{/scopes}}
|
||||
@ -70,7 +71,7 @@ public class {{classname}} {
|
||||
{{/hasMore}}{{/authMethods}}
|
||||
}{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} })
|
||||
@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}} })
|
||||
public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}},{{/allParams}}@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
|
@ -17,6 +17,7 @@ import java.io.InputStream;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
{{#useBeanValidation}}
|
||||
import javax.validation.constraints.*;
|
||||
@ -42,7 +43,7 @@ public class {{classname}} {
|
||||
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
|
||||
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
|
||||
{{#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 = {
|
||||
{{#scopes}}@AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}},
|
||||
{{/hasMore}}{{/scopes}}
|
||||
@ -50,7 +51,7 @@ public class {{classname}} {
|
||||
{{/hasMore}}{{/authMethods}}
|
||||
}{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{#hasMore}}, {{/hasMore}}{{/vendorExtensions.x-tags}} })
|
||||
@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}}) {
|
||||
return delegate.{{nickname}}({{#allParams}}{{#isFile}}{{paramName}}InputStream, {{paramName}}Detail{{/isFile}}{{^isFile}}{{paramName}}{{/isFile}}, {{/allParams}}securityContext);
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ public interface {{classname}} {
|
||||
{{/hasProduces}}
|
||||
@ApiOperation(value = "{{{summary}}}", tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{#hasMore}}, {{/hasMore}}{{/vendorExtensions.x-tags}} })
|
||||
@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}});
|
||||
{{/operation}}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{{#useGenericResponse}}Response{{/useGenericResponse}}{{! non-generic response:
|
||||
}}{{^useGenericResponse}}{{!
|
||||
}}{{#returnContainer}}{{#isMapContainer}}Map<String, {{{returnType}}}>{{/isMapContainer}}{{#isListContainer}}List<{{{returnType}}}>{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}{{!
|
||||
}}{{{returnType}}}{{!
|
||||
}}{{/useGenericResponse}}
|
@ -15,6 +15,7 @@ import javax.validation.constraints.*;
|
||||
{{#imports}}import {{import}};
|
||||
{{/imports}}
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import {{package}}.NotFoundException;
|
||||
|
||||
@ -42,7 +43,7 @@ public class {{classname}} {
|
||||
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
|
||||
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
|
||||
{{#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 = {
|
||||
{{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}},
|
||||
{{/hasMore}}{{/scopes}}
|
||||
@ -50,7 +51,7 @@ public class {{classname}} {
|
||||
{{/hasMore}}{{/authMethods}}
|
||||
}{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{#hasMore}}, {{/hasMore}}{{/vendorExtensions.x-tags}} })
|
||||
@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}}(
|
||||
{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}},
|
||||
{{/allParams}}@Context SecurityContext securityContext)
|
||||
|
@ -10,6 +10,7 @@ import io.swagger.jaxrs.*;
|
||||
{{#imports}}import {{import}};
|
||||
{{/imports}}
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import {{package}}.NotFoundException;
|
||||
|
||||
@ -38,7 +39,7 @@ public class {{classname}} {
|
||||
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
|
||||
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
|
||||
{{#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 = {
|
||||
{{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}},
|
||||
{{/hasMore}}{{/scopes}}
|
||||
@ -46,7 +47,7 @@ public class {{classname}} {
|
||||
{{/hasMore}}{{/authMethods}}
|
||||
}{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} })
|
||||
@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}} })
|
||||
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 {
|
||||
|
@ -9,6 +9,7 @@ import io.swagger.jaxrs.*;
|
||||
{{/imports}}
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
@ -34,7 +35,7 @@ public interface {{classname}} {
|
||||
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
|
||||
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
|
||||
{{#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 = {
|
||||
{{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}},
|
||||
{{/hasMore}}{{/scopes}}
|
||||
@ -42,7 +43,7 @@ public interface {{classname}} {
|
||||
{{/hasMore}}{{/authMethods}}
|
||||
}{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} })
|
||||
@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}} })
|
||||
public Response {{nickname}}({{#isMultipart}}MultipartFormDataInput input,{{/isMultipart}}{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{^isMultipart}}{{>formParams}},{{/isMultipart}}{{#isMultipart}}{{^isFormParam}},{{/isFormParam}}{{/isMultipart}}{{/allParams}}@Context SecurityContext securityContext);
|
||||
{{/operation}}
|
||||
|
@ -8,6 +8,7 @@ import javax.ws.rs.core.Response;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
{{#useBeanValidation}}
|
||||
import javax.validation.constraints.*;
|
||||
@ -28,7 +29,7 @@ public class {{classname}} {
|
||||
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
|
||||
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
|
||||
{{#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 = {
|
||||
{{#scopes}}@AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}},
|
||||
{{/hasMore}}{{/scopes}}
|
||||
@ -36,7 +37,7 @@ public class {{classname}} {
|
||||
{{/hasMore}}{{/authMethods}}
|
||||
}{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{#hasMore}}, {{/hasMore}}{{/vendorExtensions.x-tags}} })
|
||||
@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}}) {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ public enum StatusEnum {
|
||||
* Get complete
|
||||
* @return complete
|
||||
**/
|
||||
public Boolean getComplete() {
|
||||
public Boolean isComplete() {
|
||||
return complete;
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ public enum StatusEnum {
|
||||
* Get complete
|
||||
* @return complete
|
||||
**/
|
||||
public Boolean getComplete() {
|
||||
public Boolean isComplete() {
|
||||
return complete;
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@ import java.io.InputStream;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
@Path("/pet")
|
||||
@ -39,14 +40,14 @@ public class PetApi {
|
||||
|
||||
@Consumes({ "application/json", "application/xml" })
|
||||
@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 = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 405, message = "Invalid input", 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) {
|
||||
return delegate.addPet(body, securityContext);
|
||||
}
|
||||
@ -55,14 +56,14 @@ public class PetApi {
|
||||
@Path("/{petId}")
|
||||
|
||||
@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 = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 400, message = "Invalid pet value", 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) {
|
||||
return delegate.deletePet(petId, apiKey, securityContext);
|
||||
}
|
||||
@ -79,7 +80,7 @@ public class PetApi {
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@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) {
|
||||
return delegate.findPetsByStatus(status, securityContext);
|
||||
}
|
||||
@ -96,7 +97,7 @@ public class PetApi {
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@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) {
|
||||
return delegate.findPetsByTags(tags, securityContext);
|
||||
}
|
||||
@ -110,8 +111,8 @@ public class PetApi {
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class),
|
||||
@ApiResponse(code = 404, message = "Pet not found", response = Pet.class) })
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.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) {
|
||||
return delegate.getPetById(petId, securityContext);
|
||||
}
|
||||
@ -120,16 +121,16 @@ public class PetApi {
|
||||
|
||||
@Consumes({ "application/json", "application/xml" })
|
||||
@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 = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class),
|
||||
@ApiResponse(code = 404, message = "Pet not found", response = void.class),
|
||||
@ApiResponse(code = 405, message = "Validation exception", 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 = 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) {
|
||||
return delegate.updatePet(body, securityContext);
|
||||
}
|
||||
@ -138,14 +139,14 @@ public class PetApi {
|
||||
@Path("/{petId}")
|
||||
@Consumes({ "application/x-www-form-urlencoded" })
|
||||
@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 = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 405, message = "Invalid input", 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) {
|
||||
return delegate.updatePetWithForm(petId, name, status, securityContext);
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ import java.io.InputStream;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
@Path("/store")
|
||||
@ -38,10 +39,10 @@ public class StoreApi {
|
||||
@Path("/order/{orderId}")
|
||||
|
||||
@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 = {
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class),
|
||||
@ApiResponse(code = 404, message = "Order not found", response = void.class) })
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied", 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) {
|
||||
return delegate.deleteOrder(orderId, securityContext);
|
||||
}
|
||||
@ -54,7 +55,7 @@ public class StoreApi {
|
||||
@Authorization(value = "api_key")
|
||||
}, tags={ "store", })
|
||||
@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() {
|
||||
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", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class),
|
||||
@ApiResponse(code = 404, message = "Order not found", response = Order.class) })
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.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) {
|
||||
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" })
|
||||
@ApiResponses(value = {
|
||||
@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) {
|
||||
return delegate.placeOrder(body, securityContext);
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ import java.io.InputStream;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
@Path("/user")
|
||||
@ -38,9 +39,9 @@ public class UserApi {
|
||||
|
||||
|
||||
@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 = {
|
||||
@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) {
|
||||
return delegate.createUser(body, securityContext);
|
||||
}
|
||||
@ -49,9 +50,9 @@ public class UserApi {
|
||||
@Path("/createWithArray")
|
||||
|
||||
@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 = {
|
||||
@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) {
|
||||
return delegate.createUsersWithArrayInput(body, securityContext);
|
||||
}
|
||||
@ -60,9 +61,9 @@ public class UserApi {
|
||||
@Path("/createWithList")
|
||||
|
||||
@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 = {
|
||||
@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) {
|
||||
return delegate.createUsersWithListInput(body, securityContext);
|
||||
}
|
||||
@ -71,10 +72,10 @@ public class UserApi {
|
||||
@Path("/{username}")
|
||||
|
||||
@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 = {
|
||||
@ApiResponse(code = 400, message = "Invalid username supplied", response = void.class),
|
||||
@ApiResponse(code = 404, message = "User not found", response = void.class) })
|
||||
@ApiResponse(code = 400, message = "Invalid username supplied", 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) {
|
||||
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", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = User.class),
|
||||
@ApiResponse(code = 400, message = "Invalid username supplied", response = User.class),
|
||||
@ApiResponse(code = 404, message = "User not found", response = User.class) })
|
||||
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.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) {
|
||||
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", })
|
||||
@ApiResponses(value = {
|
||||
@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) {
|
||||
return delegate.loginUser(username, password, securityContext);
|
||||
}
|
||||
@ -108,9 +109,9 @@ public class UserApi {
|
||||
@Path("/logout")
|
||||
|
||||
@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 = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||
public Response logoutUser() {
|
||||
return delegate.logoutUser(securityContext);
|
||||
}
|
||||
@ -119,10 +120,10 @@ public class UserApi {
|
||||
@Path("/{username}")
|
||||
|
||||
@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 = {
|
||||
@ApiResponse(code = 400, message = "Invalid user supplied", response = void.class),
|
||||
@ApiResponse(code = 404, message = "User not found", response = void.class) })
|
||||
@ApiResponse(code = 400, message = "Invalid user supplied", 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) {
|
||||
return delegate.updateUser(username, body, securityContext);
|
||||
}
|
||||
|
@ -108,8 +108,8 @@
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "string",
|
||||
"default" : "available",
|
||||
"enum" : [ "available", "pending", "sold" ]
|
||||
"enum" : [ "available", "pending", "sold" ],
|
||||
"default" : "available"
|
||||
},
|
||||
"collectionFormat" : "csv"
|
||||
} ],
|
||||
|
@ -151,7 +151,7 @@ public enum StatusEnum {
|
||||
* Get complete
|
||||
* @return complete
|
||||
**/
|
||||
public Boolean getComplete() {
|
||||
public Boolean isComplete() {
|
||||
return complete;
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,7 @@ import java.io.File;
|
||||
import io.swagger.model.ModelApiResponse;
|
||||
import io.swagger.model.Pet;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import io.swagger.api.NotFoundException;
|
||||
|
||||
@ -76,7 +77,7 @@ public class PetApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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)
|
||||
throws NotFoundException {
|
||||
return delegate.findPetsByStatus(status,securityContext);
|
||||
@ -94,7 +95,7 @@ public class PetApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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)
|
||||
throws NotFoundException {
|
||||
return delegate.findPetsByTags(tags,securityContext);
|
||||
@ -109,9 +110,9 @@ public class PetApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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)
|
||||
throws NotFoundException {
|
||||
return delegate.getPetById(petId,securityContext);
|
||||
|
@ -10,6 +10,7 @@ import io.swagger.jaxrs.*;
|
||||
import java.util.Map;
|
||||
import io.swagger.model.Order;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import io.swagger.api.NotFoundException;
|
||||
|
||||
@ -50,7 +51,7 @@ public class StoreApi {
|
||||
@io.swagger.annotations.Authorization(value = "api_key")
|
||||
}, tags={ "store", })
|
||||
@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)
|
||||
throws NotFoundException {
|
||||
return delegate.getInventory(securityContext);
|
||||
@ -63,9 +64,9 @@ public class StoreApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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)
|
||||
throws NotFoundException {
|
||||
return delegate.getOrderById(orderId,securityContext);
|
||||
@ -78,7 +79,7 @@ public class StoreApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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)
|
||||
throws NotFoundException {
|
||||
return delegate.placeOrder(body,securityContext);
|
||||
|
@ -10,6 +10,7 @@ import io.swagger.jaxrs.*;
|
||||
import java.util.List;
|
||||
import io.swagger.model.User;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import io.swagger.api.NotFoundException;
|
||||
|
||||
@ -83,9 +84,9 @@ public class UserApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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)
|
||||
throws NotFoundException {
|
||||
return delegate.getUserByName(username,securityContext);
|
||||
@ -98,7 +99,7 @@ public class UserApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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)
|
||||
throws NotFoundException {
|
||||
return delegate.loginUser(username,password,securityContext);
|
||||
|
@ -110,7 +110,7 @@ public class Order {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty("complete")
|
||||
public Boolean getComplete() {
|
||||
public Boolean isComplete() {
|
||||
return complete;
|
||||
}
|
||||
public void setComplete(Boolean complete) {
|
||||
|
@ -10,6 +10,7 @@ import io.swagger.model.ModelApiResponse;
|
||||
import io.swagger.model.Pet;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
@ -66,7 +67,7 @@ public interface PetApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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);
|
||||
@GET
|
||||
@Path("/findByTags")
|
||||
@ -81,7 +82,7 @@ public interface PetApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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);
|
||||
@GET
|
||||
@Path("/{petId}")
|
||||
@ -93,9 +94,9 @@ public interface PetApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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);
|
||||
@PUT
|
||||
|
||||
|
@ -9,6 +9,7 @@ import java.util.Map;
|
||||
import io.swagger.model.Order;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
@ -43,7 +44,7 @@ public interface StoreApi {
|
||||
@io.swagger.annotations.Authorization(value = "api_key")
|
||||
}, tags={ "store", })
|
||||
@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);
|
||||
@GET
|
||||
@Path("/order/{orderId}")
|
||||
@ -53,9 +54,9 @@ public interface StoreApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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);
|
||||
@POST
|
||||
@Path("/order")
|
||||
@ -65,6 +66,6 @@ public interface StoreApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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);
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import java.util.List;
|
||||
import io.swagger.model.User;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
@ -67,9 +68,9 @@ public interface UserApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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);
|
||||
@GET
|
||||
@Path("/login")
|
||||
@ -79,7 +80,7 @@ public interface UserApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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);
|
||||
@GET
|
||||
@Path("/logout")
|
||||
|
@ -110,7 +110,7 @@ public class Order {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty("complete")
|
||||
public Boolean getComplete() {
|
||||
public Boolean isComplete() {
|
||||
return complete;
|
||||
}
|
||||
public void setComplete(Boolean complete) {
|
||||
|
@ -10,6 +10,7 @@ import io.swagger.model.ModelApiResponse;
|
||||
import io.swagger.model.Pet;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
@ -66,7 +67,7 @@ public interface PetApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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);
|
||||
@GET
|
||||
@Path("/findByTags")
|
||||
@ -81,7 +82,7 @@ public interface PetApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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);
|
||||
@GET
|
||||
@Path("/{petId}")
|
||||
@ -93,9 +94,9 @@ public interface PetApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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);
|
||||
@PUT
|
||||
|
||||
|
@ -9,6 +9,7 @@ import java.util.Map;
|
||||
import io.swagger.model.Order;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
@ -43,7 +44,7 @@ public interface StoreApi {
|
||||
@io.swagger.annotations.Authorization(value = "api_key")
|
||||
}, tags={ "store", })
|
||||
@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);
|
||||
@GET
|
||||
@Path("/order/{orderId}")
|
||||
@ -53,9 +54,9 @@ public interface StoreApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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);
|
||||
@POST
|
||||
@Path("/order")
|
||||
@ -65,6 +66,6 @@ public interface StoreApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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);
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import java.util.List;
|
||||
import io.swagger.model.User;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
@ -67,9 +68,9 @@ public interface UserApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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);
|
||||
@GET
|
||||
@Path("/login")
|
||||
@ -79,7 +80,7 @@ public interface UserApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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);
|
||||
@GET
|
||||
@Path("/logout")
|
||||
|
@ -110,7 +110,7 @@ public class Order {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty("complete")
|
||||
public Boolean getComplete() {
|
||||
public Boolean isComplete() {
|
||||
return complete;
|
||||
}
|
||||
public void setComplete(Boolean complete) {
|
||||
|
@ -10,6 +10,7 @@ import io.swagger.model.ModelApiResponse;
|
||||
import io.swagger.model.Pet;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
@ -66,7 +67,7 @@ public interface PetApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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);
|
||||
@GET
|
||||
@Path("/findByTags")
|
||||
@ -81,7 +82,7 @@ public interface PetApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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);
|
||||
@GET
|
||||
@Path("/{petId}")
|
||||
@ -93,9 +94,9 @@ public interface PetApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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);
|
||||
@PUT
|
||||
|
||||
|
@ -9,6 +9,7 @@ import java.util.Map;
|
||||
import io.swagger.model.Order;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
@ -43,7 +44,7 @@ public interface StoreApi {
|
||||
@io.swagger.annotations.Authorization(value = "api_key")
|
||||
}, tags={ "store", })
|
||||
@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);
|
||||
@GET
|
||||
@Path("/order/{orderId}")
|
||||
@ -53,9 +54,9 @@ public interface StoreApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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);
|
||||
@POST
|
||||
@Path("/order")
|
||||
@ -65,6 +66,6 @@ public interface StoreApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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);
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import java.util.List;
|
||||
import io.swagger.model.User;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
@ -67,9 +68,9 @@ public interface UserApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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);
|
||||
@GET
|
||||
@Path("/login")
|
||||
@ -79,7 +80,7 @@ public interface UserApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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);
|
||||
@GET
|
||||
@Path("/logout")
|
||||
|
@ -110,7 +110,7 @@ public class Order {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty("complete")
|
||||
public Boolean getComplete() {
|
||||
public Boolean isComplete() {
|
||||
return complete;
|
||||
}
|
||||
public void setComplete(Boolean complete) {
|
||||
|
@ -11,6 +11,7 @@ import java.io.File;
|
||||
import io.swagger.model.ModelApiResponse;
|
||||
import io.swagger.model.Pet;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import io.swagger.api.NotFoundException;
|
||||
|
||||
@ -76,7 +77,7 @@ public class PetApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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)
|
||||
throws NotFoundException {
|
||||
return delegate.findPetsByStatus(status,securityContext);
|
||||
@ -94,7 +95,7 @@ public class PetApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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)
|
||||
throws NotFoundException {
|
||||
return delegate.findPetsByTags(tags,securityContext);
|
||||
@ -109,9 +110,9 @@ public class PetApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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)
|
||||
throws NotFoundException {
|
||||
return delegate.getPetById(petId,securityContext);
|
||||
|
@ -10,6 +10,7 @@ import io.swagger.jaxrs.*;
|
||||
import java.util.Map;
|
||||
import io.swagger.model.Order;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import io.swagger.api.NotFoundException;
|
||||
|
||||
@ -50,7 +51,7 @@ public class StoreApi {
|
||||
@io.swagger.annotations.Authorization(value = "api_key")
|
||||
}, tags={ "store", })
|
||||
@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)
|
||||
throws NotFoundException {
|
||||
return delegate.getInventory(securityContext);
|
||||
@ -63,9 +64,9 @@ public class StoreApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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)
|
||||
throws NotFoundException {
|
||||
return delegate.getOrderById(orderId,securityContext);
|
||||
@ -78,7 +79,7 @@ public class StoreApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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)
|
||||
throws NotFoundException {
|
||||
return delegate.placeOrder(body,securityContext);
|
||||
|
@ -10,6 +10,7 @@ import io.swagger.jaxrs.*;
|
||||
import java.util.List;
|
||||
import io.swagger.model.User;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import io.swagger.api.NotFoundException;
|
||||
|
||||
@ -83,9 +84,9 @@ public class UserApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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)
|
||||
throws NotFoundException {
|
||||
return delegate.getUserByName(username,securityContext);
|
||||
@ -98,7 +99,7 @@ public class UserApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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)
|
||||
throws NotFoundException {
|
||||
return delegate.loginUser(username,password,securityContext);
|
||||
|
@ -110,7 +110,7 @@ public class Order {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty("complete")
|
||||
public Boolean getComplete() {
|
||||
public Boolean isComplete() {
|
||||
return complete;
|
||||
}
|
||||
public void setComplete(Boolean complete) {
|
||||
|
@ -11,6 +11,7 @@ import javax.ws.rs.core.Response;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -82,12 +83,12 @@ public class FakeApi {
|
||||
|
||||
@Consumes({ "application/xml; charset=utf-8", "application/json; charset=utf-8" })
|
||||
@Produces({ "application/xml; charset=utf-8", "application/json; charset=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")
|
||||
}, tags={ "fake", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 400, message = "Invalid username supplied", response = void.class),
|
||||
@ApiResponse(code = 404, message = "User not found", response = void.class) })
|
||||
@ApiResponse(code = 400, message = "Invalid username supplied", 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) {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
@ -96,10 +97,10 @@ public class FakeApi {
|
||||
|
||||
@Consumes({ "*/*" })
|
||||
@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 = {
|
||||
@ApiResponse(code = 400, message = "Invalid request", response = void.class),
|
||||
@ApiResponse(code = 404, message = "Not found", response = void.class) })
|
||||
@ApiResponse(code = 400, message = "Invalid request", 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) {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
@ -108,9 +109,9 @@ public class FakeApi {
|
||||
@Path("/jsonFormData")
|
||||
@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 = {
|
||||
@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) {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import javax.ws.rs.core.Response;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -23,7 +24,9 @@ public class FakeClassnameTestApi {
|
||||
|
||||
@Consumes({ "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 = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
||||
public Response testClassname(Client body) {
|
||||
|
@ -9,6 +9,7 @@ import javax.ws.rs.core.Response;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -25,14 +26,14 @@ public class PetApi {
|
||||
|
||||
@Consumes({ "application/json", "application/xml" })
|
||||
@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 = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 405, message = "Invalid input", response = void.class) })
|
||||
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
|
||||
public Response addPet(Pet body) {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
@ -41,14 +42,14 @@ public class PetApi {
|
||||
@Path("/{petId}")
|
||||
|
||||
@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 = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 400, message = "Invalid pet value", 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) {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
@ -65,7 +66,7 @@ public class PetApi {
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@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) {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
@ -82,7 +83,7 @@ public class PetApi {
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@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) {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
@ -96,8 +97,8 @@ public class PetApi {
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class),
|
||||
@ApiResponse(code = 404, message = "Pet not found", response = Pet.class) })
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
|
||||
@ApiResponse(code = 404, message = "Pet not found", response = Void.class) })
|
||||
public Response getPetById(@PathParam("petId") @ApiParam("ID of pet to return") Long petId) {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
@ -106,16 +107,16 @@ public class PetApi {
|
||||
|
||||
@Consumes({ "application/json", "application/xml" })
|
||||
@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 = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class),
|
||||
@ApiResponse(code = 404, message = "Pet not found", response = void.class),
|
||||
@ApiResponse(code = 405, message = "Validation exception", 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 = 405, message = "Validation exception", response = Void.class) })
|
||||
public Response updatePet(Pet body) {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
@ -124,14 +125,14 @@ public class PetApi {
|
||||
@Path("/{petId}")
|
||||
@Consumes({ "application/x-www-form-urlencoded" })
|
||||
@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 = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 405, message = "Invalid input", 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) {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import javax.ws.rs.core.Response;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -24,10 +25,10 @@ public class StoreApi {
|
||||
@Path("/order/{order_id}")
|
||||
|
||||
@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 = {
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class),
|
||||
@ApiResponse(code = 404, message = "Order not found", response = void.class) })
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied", 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) {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
@ -40,7 +41,7 @@ public class StoreApi {
|
||||
@Authorization(value = "api_key")
|
||||
}, tags={ "store", })
|
||||
@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() {
|
||||
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", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class),
|
||||
@ApiResponse(code = 404, message = "Order not found", response = Order.class) })
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.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) {
|
||||
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" })
|
||||
@ApiResponses(value = {
|
||||
@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) {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import javax.ws.rs.core.Response;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -24,9 +25,9 @@ public class UserApi {
|
||||
|
||||
|
||||
@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 = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||
public Response createUser(User body) {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
@ -35,9 +36,9 @@ public class UserApi {
|
||||
@Path("/createWithArray")
|
||||
|
||||
@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 = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||
public Response createUsersWithArrayInput(List<User> body) {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
@ -46,9 +47,9 @@ public class UserApi {
|
||||
@Path("/createWithList")
|
||||
|
||||
@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 = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||
public Response createUsersWithListInput(List<User> body) {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
@ -57,10 +58,10 @@ public class UserApi {
|
||||
@Path("/{username}")
|
||||
|
||||
@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 = {
|
||||
@ApiResponse(code = 400, message = "Invalid username supplied", response = void.class),
|
||||
@ApiResponse(code = 404, message = "User not found", response = void.class) })
|
||||
@ApiResponse(code = 400, message = "Invalid username supplied", 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) {
|
||||
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", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = User.class),
|
||||
@ApiResponse(code = 400, message = "Invalid username supplied", response = User.class),
|
||||
@ApiResponse(code = 404, message = "User not found", response = User.class) })
|
||||
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.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) {
|
||||
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", })
|
||||
@ApiResponses(value = {
|
||||
@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) {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
@ -94,9 +95,9 @@ public class UserApi {
|
||||
@Path("/logout")
|
||||
|
||||
@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 = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||
public Response logoutUser() {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
@ -105,10 +106,10 @@ public class UserApi {
|
||||
@Path("/{username}")
|
||||
|
||||
@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 = {
|
||||
@ApiResponse(code = 400, message = "Invalid user supplied", response = void.class),
|
||||
@ApiResponse(code = 404, message = "User not found", response = void.class) })
|
||||
@ApiResponse(code = 400, message = "Invalid user supplied", 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) {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ public class Cat extends Animal {
|
||||
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
public Boolean getDeclawed() {
|
||||
public Boolean isDeclawed() {
|
||||
return declawed;
|
||||
}
|
||||
public void setDeclawed(Boolean declawed) {
|
||||
|
@ -138,7 +138,7 @@ public enum StatusEnum {
|
||||
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
public Boolean getComplete() {
|
||||
public Boolean isComplete() {
|
||||
return complete;
|
||||
}
|
||||
public void setComplete(Boolean complete) {
|
||||
|
@ -108,8 +108,8 @@
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "string",
|
||||
"default" : "available",
|
||||
"enum" : [ "available", "pending", "sold" ]
|
||||
"enum" : [ "available", "pending", "sold" ],
|
||||
"default" : "available"
|
||||
},
|
||||
"collectionFormat" : "csv"
|
||||
} ],
|
||||
@ -166,7 +166,8 @@
|
||||
},
|
||||
"security" : [ {
|
||||
"petstore_auth" : [ "write:pets", "read:pets" ]
|
||||
} ]
|
||||
} ],
|
||||
"deprecated" : true
|
||||
}
|
||||
},
|
||||
"/pet/{petId}" : {
|
||||
@ -657,7 +658,10 @@
|
||||
"$ref" : "#/definitions/Client"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security" : [ {
|
||||
"api_key_query" : [ ]
|
||||
} ]
|
||||
}
|
||||
},
|
||||
"/fake" : {
|
||||
@ -676,8 +680,8 @@
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "string",
|
||||
"default" : "$",
|
||||
"enum" : [ ">", "$" ]
|
||||
"enum" : [ ">", "$" ],
|
||||
"default" : "$"
|
||||
}
|
||||
}, {
|
||||
"name" : "enum_form_string",
|
||||
@ -695,8 +699,8 @@
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "string",
|
||||
"default" : "$",
|
||||
"enum" : [ ">", "$" ]
|
||||
"enum" : [ ">", "$" ],
|
||||
"default" : "$"
|
||||
}
|
||||
}, {
|
||||
"name" : "enum_header_string",
|
||||
@ -714,8 +718,8 @@
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "string",
|
||||
"default" : "$",
|
||||
"enum" : [ ">", "$" ]
|
||||
"enum" : [ ">", "$" ],
|
||||
"default" : "$"
|
||||
}
|
||||
}, {
|
||||
"name" : "enum_query_string",
|
||||
@ -1042,6 +1046,11 @@
|
||||
"name" : "api_key",
|
||||
"in" : "header"
|
||||
},
|
||||
"api_key_query" : {
|
||||
"type" : "apiKey",
|
||||
"name" : "api_key_query",
|
||||
"in" : "query"
|
||||
},
|
||||
"http_basic_test" : {
|
||||
"type" : "basic"
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ import io.swagger.model.Client;
|
||||
import java.util.Date;
|
||||
import io.swagger.model.OuterComposite;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
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.*;
|
||||
|
||||
@Path("/fake")
|
||||
@Path("/Fake")
|
||||
|
||||
|
||||
@io.swagger.annotations.Api(description = "the fake API")
|
||||
@io.swagger.annotations.Api(description = "the Fake API")
|
||||
|
||||
public class FakeApi {
|
||||
private final FakeApiService delegate = FakeApiServiceFactory.getFakeApi();
|
||||
|
||||
@POST
|
||||
@Path("/outer/boolean")
|
||||
|
||||
|
||||
|
||||
@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);
|
||||
}
|
||||
@POST
|
||||
@Path("/outer/composite")
|
||||
|
||||
|
||||
|
||||
@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);
|
||||
}
|
||||
@POST
|
||||
@Path("/outer/number")
|
||||
|
||||
|
||||
|
||||
@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);
|
||||
}
|
||||
@POST
|
||||
@Path("/outer/string")
|
||||
|
||||
|
||||
|
||||
@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" })
|
||||
@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")
|
||||
}, tags={ "fake", })
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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 = 400, message = "Invalid username supplied", 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,
|
||||
@ApiParam(value = "None", required=true) @FormParam("double") Double _double,
|
||||
@ -134,10 +135,10 @@ public class FakeApi {
|
||||
|
||||
@Consumes({ "*/*" })
|
||||
@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.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 = 400, message = "Invalid request", 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,
|
||||
@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);
|
||||
}
|
||||
@GET
|
||||
@Path("/jsonFormData")
|
||||
|
||||
@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.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,
|
||||
@ApiParam(value = "field2", required=true) @FormParam("param2") String param2,
|
||||
|
@ -1,8 +1,8 @@
|
||||
package io.swagger.api;
|
||||
|
||||
import io.swagger.model.*;
|
||||
import io.swagger.api.FakeClassnameTestApiService;
|
||||
import io.swagger.api.factories.FakeClassnameTestApiServiceFactory;
|
||||
import io.swagger.api.FakeClassnameTags123ApiService;
|
||||
import io.swagger.api.factories.FakeClassnameTags123ApiServiceFactory;
|
||||
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.jaxrs.*;
|
||||
@ -12,6 +12,7 @@ import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.model.Client;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
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.*;
|
||||
|
||||
@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 {
|
||||
private final FakeClassnameTestApiService delegate = FakeClassnameTestApiServiceFactory.getFakeClassnameTestApi();
|
||||
public class FakeClassnameTags123Api {
|
||||
private final FakeClassnameTags123ApiService delegate = FakeClassnameTags123ApiServiceFactory.getFakeClassnameTags123Api();
|
||||
|
||||
@PATCH
|
||||
|
@ -19,7 +19,7 @@ import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.SecurityContext;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
public abstract class FakeClassnameTestApiService {
|
||||
public abstract class FakeClassnameTags123ApiService {
|
||||
public abstract Response testClassname(Client body,SecurityContext securityContext)
|
||||
throws NotFoundException;
|
||||
}
|
@ -14,6 +14,7 @@ import java.io.File;
|
||||
import io.swagger.model.ModelApiResponse;
|
||||
import io.swagger.model.Pet;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
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.*;
|
||||
|
||||
@Path("/pet")
|
||||
@Path("/Pet")
|
||||
|
||||
|
||||
@io.swagger.annotations.Api(description = "the pet API")
|
||||
@io.swagger.annotations.Api(description = "the Pet API")
|
||||
|
||||
public class PetApi {
|
||||
private final PetApiService delegate = PetApiServiceFactory.getPetApi();
|
||||
@ -39,14 +40,14 @@ public class PetApi {
|
||||
|
||||
@Consumes({ "application/json", "application/xml" })
|
||||
@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.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@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,
|
||||
@Context SecurityContext securityContext)
|
||||
@ -54,17 +55,17 @@ public class PetApi {
|
||||
return delegate.addPet(body,securityContext);
|
||||
}
|
||||
@DELETE
|
||||
@Path("/{petId}")
|
||||
|
||||
|
||||
@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.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@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,
|
||||
@ApiParam(value = "" )@HeaderParam("api_key") String apiKey,
|
||||
@ -73,7 +74,7 @@ public class PetApi {
|
||||
return delegate.deletePet(petId,apiKey,securityContext);
|
||||
}
|
||||
@GET
|
||||
@Path("/findByStatus")
|
||||
|
||||
|
||||
@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 = {
|
||||
@ -84,7 +85,7 @@ public class PetApi {
|
||||
}, tags={ "pet", })
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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,
|
||||
@Context SecurityContext securityContext)
|
||||
@ -92,7 +93,7 @@ public class PetApi {
|
||||
return delegate.findPetsByStatus(status,securityContext);
|
||||
}
|
||||
@GET
|
||||
@Path("/findByTags")
|
||||
|
||||
|
||||
@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 = {
|
||||
@ -103,7 +104,7 @@ public class PetApi {
|
||||
}, tags={ "pet", })
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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,
|
||||
@Context SecurityContext securityContext)
|
||||
@ -111,7 +112,7 @@ public class PetApi {
|
||||
return delegate.findPetsByTags(tags,securityContext);
|
||||
}
|
||||
@GET
|
||||
@Path("/{petId}")
|
||||
|
||||
|
||||
@Produces({ "application/xml", "application/json" })
|
||||
@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", })
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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 = 404, message = "Pet not found", 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 = Void.class) })
|
||||
public Response getPetById(
|
||||
@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId,
|
||||
@Context SecurityContext securityContext)
|
||||
@ -131,16 +132,16 @@ public class PetApi {
|
||||
|
||||
@Consumes({ "application/json", "application/xml" })
|
||||
@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.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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 = 405, message = "Validation exception", 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 = 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,
|
||||
@Context SecurityContext securityContext)
|
||||
@ -148,17 +149,17 @@ public class PetApi {
|
||||
return delegate.updatePet(body,securityContext);
|
||||
}
|
||||
@POST
|
||||
@Path("/{petId}")
|
||||
|
||||
@Consumes({ "application/x-www-form-urlencoded" })
|
||||
@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.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@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,
|
||||
@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);
|
||||
}
|
||||
@POST
|
||||
@Path("/{petId}/uploadImage")
|
||||
|
||||
@Consumes({ "multipart/form-data" })
|
||||
@Produces({ "application/json" })
|
||||
@io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
|
||||
|
@ -13,6 +13,7 @@ import javax.validation.constraints.*;
|
||||
import java.util.Map;
|
||||
import io.swagger.model.Order;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
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.*;
|
||||
|
||||
@Path("/store")
|
||||
@Path("/Store")
|
||||
|
||||
|
||||
@io.swagger.annotations.Api(description = "the store API")
|
||||
@io.swagger.annotations.Api(description = "the Store API")
|
||||
|
||||
public class StoreApi {
|
||||
private final StoreApiService delegate = StoreApiServiceFactory.getStoreApi();
|
||||
|
||||
@DELETE
|
||||
@Path("/order/{order_id}")
|
||||
|
||||
|
||||
@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.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 = 400, message = "Invalid ID supplied", 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,
|
||||
@Context SecurityContext securityContext)
|
||||
@ -49,28 +50,28 @@ public class StoreApi {
|
||||
return delegate.deleteOrder(orderId,securityContext);
|
||||
}
|
||||
@GET
|
||||
@Path("/inventory")
|
||||
|
||||
|
||||
@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.Authorization(value = "api_key")
|
||||
}, tags={ "store", })
|
||||
@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)
|
||||
throws NotFoundException {
|
||||
return delegate.getInventory(securityContext);
|
||||
}
|
||||
@GET
|
||||
@Path("/order/{order_id}")
|
||||
|
||||
|
||||
@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.ApiResponses(value = {
|
||||
@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 = 404, message = "Order not found", 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 = Void.class) })
|
||||
public Response getOrderById(
|
||||
@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Long orderId,
|
||||
@Context SecurityContext securityContext)
|
||||
@ -78,13 +79,13 @@ public class StoreApi {
|
||||
return delegate.getOrderById(orderId,securityContext);
|
||||
}
|
||||
@POST
|
||||
@Path("/order")
|
||||
|
||||
|
||||
@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.ApiResponses(value = {
|
||||
@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)
|
||||
|
@ -13,6 +13,7 @@ import javax.validation.constraints.*;
|
||||
import java.util.List;
|
||||
import io.swagger.model.User;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
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.*;
|
||||
|
||||
@Path("/user")
|
||||
@Path("/User")
|
||||
|
||||
|
||||
@io.swagger.annotations.Api(description = "the user API")
|
||||
@io.swagger.annotations.Api(description = "the User API")
|
||||
|
||||
public class UserApi {
|
||||
private final UserApiService delegate = UserApiServiceFactory.getUserApi();
|
||||
@ -38,9 +39,9 @@ public class UserApi {
|
||||
|
||||
|
||||
@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.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,
|
||||
@Context SecurityContext securityContext)
|
||||
@ -48,12 +49,12 @@ public class UserApi {
|
||||
return delegate.createUser(body,securityContext);
|
||||
}
|
||||
@POST
|
||||
@Path("/createWithArray")
|
||||
|
||||
|
||||
@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.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,
|
||||
@Context SecurityContext securityContext)
|
||||
@ -61,12 +62,12 @@ public class UserApi {
|
||||
return delegate.createUsersWithArrayInput(body,securityContext);
|
||||
}
|
||||
@POST
|
||||
@Path("/createWithList")
|
||||
|
||||
|
||||
@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.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,
|
||||
@Context SecurityContext securityContext)
|
||||
@ -74,13 +75,13 @@ public class UserApi {
|
||||
return delegate.createUsersWithListInput(body,securityContext);
|
||||
}
|
||||
@DELETE
|
||||
@Path("/{username}")
|
||||
|
||||
|
||||
@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.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 = 400, message = "Invalid username supplied", 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,
|
||||
@Context SecurityContext securityContext)
|
||||
@ -88,14 +89,14 @@ public class UserApi {
|
||||
return delegate.deleteUser(username,securityContext);
|
||||
}
|
||||
@GET
|
||||
@Path("/{username}")
|
||||
|
||||
|
||||
@Produces({ "application/xml", "application/json" })
|
||||
@io.swagger.annotations.ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", })
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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 = 404, message = "User not found", 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 = Void.class) })
|
||||
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)
|
||||
@ -103,13 +104,13 @@ public class UserApi {
|
||||
return delegate.getUserByName(username,securityContext);
|
||||
}
|
||||
@GET
|
||||
@Path("/login")
|
||||
|
||||
|
||||
@Produces({ "application/xml", "application/json" })
|
||||
@io.swagger.annotations.ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", })
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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,
|
||||
@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);
|
||||
}
|
||||
@GET
|
||||
@Path("/logout")
|
||||
|
||||
|
||||
@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.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)
|
||||
throws NotFoundException {
|
||||
return delegate.logoutUser(securityContext);
|
||||
}
|
||||
@PUT
|
||||
@Path("/{username}")
|
||||
|
||||
|
||||
@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.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 = 400, message = "Invalid user supplied", 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,
|
||||
@ApiParam(value = "Updated user object" ,required=true) User body,
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -19,7 +19,7 @@ import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.SecurityContext;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
public class FakeClassnameTestApiServiceImpl extends FakeClassnameTestApiService {
|
||||
public class FakeClassnameTags123ApiServiceImpl extends FakeClassnameTags123ApiService {
|
||||
@Override
|
||||
public Response testClassname(Client body, SecurityContext securityContext)
|
||||
throws NotFoundException {
|
@ -1,4 +1,4 @@
|
||||
# Swagger generated server
|
||||
# Swagger Jersey generated server
|
||||
|
||||
## Overview
|
||||
This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the
|
||||
|
@ -15,6 +15,7 @@ import io.swagger.model.Client;
|
||||
import java.util.Date;
|
||||
import io.swagger.model.OuterComposite;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import io.swagger.api.NotFoundException;
|
||||
|
||||
@ -105,12 +106,12 @@ public class FakeApi {
|
||||
|
||||
@Consumes({ "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")
|
||||
}, tags={ "fake", })
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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 = 400, message = "Invalid username supplied", 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,
|
||||
@ApiParam(value = "None", required=true) @FormParam("double") Double _double,
|
||||
@ -134,10 +135,10 @@ public class FakeApi {
|
||||
|
||||
@Consumes({ "*/*" })
|
||||
@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.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 = 400, message = "Invalid request", 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,
|
||||
@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")
|
||||
@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.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,
|
||||
@ApiParam(value = "field2", required=true) @FormParam("param2") String param2,
|
||||
|
@ -12,6 +12,7 @@ import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.model.Client;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import io.swagger.api.NotFoundException;
|
||||
|
||||
|
@ -14,6 +14,7 @@ import java.io.File;
|
||||
import io.swagger.model.ModelApiResponse;
|
||||
import io.swagger.model.Pet;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import io.swagger.api.NotFoundException;
|
||||
|
||||
@ -39,14 +40,14 @@ public class PetApi {
|
||||
|
||||
@Consumes({ "application/json", "application/xml" })
|
||||
@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.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@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,
|
||||
@Context SecurityContext securityContext)
|
||||
@ -57,14 +58,14 @@ public class PetApi {
|
||||
@Path("/{petId}")
|
||||
|
||||
@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.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@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,
|
||||
@ApiParam(value = "" )@HeaderParam("api_key") String apiKey,
|
||||
@ -84,7 +85,7 @@ public class PetApi {
|
||||
}, tags={ "pet", })
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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,
|
||||
@Context SecurityContext securityContext)
|
||||
@ -103,7 +104,7 @@ public class PetApi {
|
||||
}, tags={ "pet", })
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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,
|
||||
@Context SecurityContext securityContext)
|
||||
@ -119,8 +120,8 @@ public class PetApi {
|
||||
}, tags={ "pet", })
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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 = 404, message = "Pet not found", 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 = Void.class) })
|
||||
public Response getPetById(
|
||||
@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId,
|
||||
@Context SecurityContext securityContext)
|
||||
@ -131,16 +132,16 @@ public class PetApi {
|
||||
|
||||
@Consumes({ "application/json", "application/xml" })
|
||||
@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.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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 = 405, message = "Validation exception", 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 = 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,
|
||||
@Context SecurityContext securityContext)
|
||||
@ -151,14 +152,14 @@ public class PetApi {
|
||||
@Path("/{petId}")
|
||||
@Consumes({ "application/x-www-form-urlencoded" })
|
||||
@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.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@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,
|
||||
@ApiParam(value = "Updated name of the pet") @FormParam("name") String name,
|
||||
|
@ -13,6 +13,7 @@ import javax.validation.constraints.*;
|
||||
import java.util.Map;
|
||||
import io.swagger.model.Order;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import io.swagger.api.NotFoundException;
|
||||
|
||||
@ -38,10 +39,10 @@ public class StoreApi {
|
||||
@Path("/order/{order_id}")
|
||||
|
||||
@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.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 = 400, message = "Invalid ID supplied", 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,
|
||||
@Context SecurityContext securityContext)
|
||||
@ -56,7 +57,7 @@ public class StoreApi {
|
||||
@io.swagger.annotations.Authorization(value = "api_key")
|
||||
}, tags={ "store", })
|
||||
@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)
|
||||
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.ApiResponses(value = {
|
||||
@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 = 404, message = "Order not found", 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 = Void.class) })
|
||||
public Response getOrderById(
|
||||
@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Long orderId,
|
||||
@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.ApiResponses(value = {
|
||||
@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)
|
||||
|
@ -13,6 +13,7 @@ import javax.validation.constraints.*;
|
||||
import java.util.List;
|
||||
import io.swagger.model.User;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import io.swagger.api.NotFoundException;
|
||||
|
||||
@ -38,9 +39,9 @@ public class UserApi {
|
||||
|
||||
|
||||
@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.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,
|
||||
@Context SecurityContext securityContext)
|
||||
@ -51,9 +52,9 @@ public class UserApi {
|
||||
@Path("/createWithArray")
|
||||
|
||||
@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.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,
|
||||
@Context SecurityContext securityContext)
|
||||
@ -64,9 +65,9 @@ public class UserApi {
|
||||
@Path("/createWithList")
|
||||
|
||||
@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.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,
|
||||
@Context SecurityContext securityContext)
|
||||
@ -77,10 +78,10 @@ public class UserApi {
|
||||
@Path("/{username}")
|
||||
|
||||
@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.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 = 400, message = "Invalid username supplied", 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,
|
||||
@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.ApiResponses(value = {
|
||||
@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 = 404, message = "User not found", 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 = Void.class) })
|
||||
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)
|
||||
@ -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.ApiResponses(value = {
|
||||
@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,
|
||||
@ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password,
|
||||
@ -121,9 +122,9 @@ public class UserApi {
|
||||
@Path("/logout")
|
||||
|
||||
@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.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)
|
||||
throws NotFoundException {
|
||||
@ -133,10 +134,10 @@ public class UserApi {
|
||||
@Path("/{username}")
|
||||
|
||||
@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.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 = 400, message = "Invalid user supplied", 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,
|
||||
@ApiParam(value = "Updated user object" ,required=true) User body,
|
||||
|
@ -12,6 +12,7 @@ import io.swagger.model.Client;
|
||||
import java.util.Date;
|
||||
import io.swagger.model.OuterComposite;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import io.swagger.api.NotFoundException;
|
||||
|
||||
@ -27,10 +28,10 @@ import javax.ws.rs.core.SecurityContext;
|
||||
import javax.ws.rs.*;
|
||||
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 {
|
||||
private final FakeApiService delegate;
|
||||
@ -57,7 +58,7 @@ public class FakeApi {
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/outer/boolean")
|
||||
|
||||
|
||||
|
||||
@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);
|
||||
}
|
||||
@POST
|
||||
@Path("/outer/composite")
|
||||
|
||||
|
||||
|
||||
@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);
|
||||
}
|
||||
@POST
|
||||
@Path("/outer/number")
|
||||
|
||||
|
||||
|
||||
@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);
|
||||
}
|
||||
@POST
|
||||
@Path("/outer/string")
|
||||
|
||||
|
||||
|
||||
@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" })
|
||||
@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")
|
||||
}, tags={ "fake", })
|
||||
@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
|
||||
,@ApiParam(value = "None", required=true) @FormParam("double") Double _double
|
||||
,@ApiParam(value = "None", required=true) @FormParam("pattern_without_delimiter") String patternWithoutDelimiter
|
||||
@ -149,11 +150,11 @@ public class FakeApi {
|
||||
|
||||
@Consumes({ "*/*" })
|
||||
@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.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
|
||||
,@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
|
||||
@ -167,12 +168,12 @@ public class FakeApi {
|
||||
return delegate.testEnumParameters(enumFormStringArray,enumFormString,enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,securityContext);
|
||||
}
|
||||
@GET
|
||||
@Path("/jsonFormData")
|
||||
|
||||
@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.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
|
||||
,@ApiParam(value = "field2", required=true) @FormParam("param2") String param2
|
||||
,@Context SecurityContext securityContext)
|
||||
|
@ -1,14 +1,15 @@
|
||||
package io.swagger.api;
|
||||
|
||||
import io.swagger.model.*;
|
||||
import io.swagger.api.FakeClassnameTestApiService;
|
||||
import io.swagger.api.factories.FakeClassnameTestApiServiceFactory;
|
||||
import io.swagger.api.FakeClassnameTags123ApiService;
|
||||
import io.swagger.api.factories.FakeClassnameTags123ApiServiceFactory;
|
||||
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.jaxrs.*;
|
||||
|
||||
import io.swagger.model.Client;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import io.swagger.api.NotFoundException;
|
||||
|
||||
@ -24,22 +25,22 @@ import javax.ws.rs.core.SecurityContext;
|
||||
import javax.ws.rs.*;
|
||||
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 {
|
||||
private final FakeClassnameTestApiService delegate;
|
||||
public class FakeClassnameTags123Api {
|
||||
private final FakeClassnameTags123ApiService delegate;
|
||||
|
||||
public FakeClassnameTestApi(@Context ServletConfig servletContext) {
|
||||
FakeClassnameTestApiService delegate = null;
|
||||
public FakeClassnameTags123Api(@Context ServletConfig servletContext) {
|
||||
FakeClassnameTags123ApiService delegate = null;
|
||||
|
||||
if (servletContext != null) {
|
||||
String implClass = servletContext.getInitParameter("FakeClassnameTestApi.implementation");
|
||||
String implClass = servletContext.getInitParameter("FakeClassnameTags123Api.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (FakeClassnameTestApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (FakeClassnameTags123ApiService) Class.forName(implClass).newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@ -47,7 +48,7 @@ public class FakeClassnameTestApi {
|
||||
}
|
||||
|
||||
if (delegate == null) {
|
||||
delegate = FakeClassnameTestApiServiceFactory.getFakeClassnameTestApi();
|
||||
delegate = FakeClassnameTags123ApiServiceFactory.getFakeClassnameTags123Api();
|
||||
}
|
||||
|
||||
this.delegate = delegate;
|
@ -16,6 +16,6 @@ import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.SecurityContext;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
public abstract class FakeClassnameTestApiService {
|
||||
public abstract class FakeClassnameTags123ApiService {
|
||||
public abstract Response testClassname(Client body,SecurityContext securityContext) throws NotFoundException;
|
||||
}
|
@ -11,6 +11,7 @@ import java.io.File;
|
||||
import io.swagger.model.ModelApiResponse;
|
||||
import io.swagger.model.Pet;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import io.swagger.api.NotFoundException;
|
||||
|
||||
@ -26,10 +27,10 @@ import javax.ws.rs.core.SecurityContext;
|
||||
import javax.ws.rs.*;
|
||||
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 {
|
||||
private final PetApiService delegate;
|
||||
@ -59,31 +60,31 @@ public class PetApi {
|
||||
|
||||
@Consumes({ "application/json", "application/xml" })
|
||||
@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.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
return delegate.addPet(body,securityContext);
|
||||
}
|
||||
@DELETE
|
||||
@Path("/{petId}")
|
||||
|
||||
|
||||
@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.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@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
|
||||
,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey
|
||||
,@Context SecurityContext securityContext)
|
||||
@ -91,7 +92,7 @@ public class PetApi {
|
||||
return delegate.deletePet(petId,apiKey,securityContext);
|
||||
}
|
||||
@GET
|
||||
@Path("/findByStatus")
|
||||
|
||||
|
||||
@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 = {
|
||||
@ -103,14 +104,14 @@ public class PetApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
return delegate.findPetsByStatus(status,securityContext);
|
||||
}
|
||||
@GET
|
||||
@Path("/findByTags")
|
||||
|
||||
|
||||
@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 = {
|
||||
@ -122,14 +123,14 @@ public class PetApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
return delegate.findPetsByTags(tags,securityContext);
|
||||
}
|
||||
@GET
|
||||
@Path("/{petId}")
|
||||
|
||||
|
||||
@Produces({ "application/xml", "application/json" })
|
||||
@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.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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
@ -150,35 +151,35 @@ public class PetApi {
|
||||
|
||||
@Consumes({ "application/json", "application/xml" })
|
||||
@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.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
return delegate.updatePet(body,securityContext);
|
||||
}
|
||||
@POST
|
||||
@Path("/{petId}")
|
||||
|
||||
@Consumes({ "application/x-www-form-urlencoded" })
|
||||
@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.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@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
|
||||
,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name
|
||||
,@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);
|
||||
}
|
||||
@POST
|
||||
@Path("/{petId}/uploadImage")
|
||||
|
||||
@Consumes({ "multipart/form-data" })
|
||||
@Produces({ "application/json" })
|
||||
@io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
|
||||
|
@ -10,6 +10,7 @@ import io.swagger.jaxrs.*;
|
||||
import java.util.Map;
|
||||
import io.swagger.model.Order;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import io.swagger.api.NotFoundException;
|
||||
|
||||
@ -25,10 +26,10 @@ import javax.ws.rs.core.SecurityContext;
|
||||
import javax.ws.rs.*;
|
||||
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 {
|
||||
private final StoreApiService delegate;
|
||||
@ -55,57 +56,57 @@ public class StoreApi {
|
||||
}
|
||||
|
||||
@DELETE
|
||||
@Path("/order/{order_id}")
|
||||
|
||||
|
||||
@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.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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
return delegate.deleteOrder(orderId,securityContext);
|
||||
}
|
||||
@GET
|
||||
@Path("/inventory")
|
||||
|
||||
|
||||
@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.Authorization(value = "api_key")
|
||||
}, tags={ "store", })
|
||||
@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)
|
||||
throws NotFoundException {
|
||||
return delegate.getInventory(securityContext);
|
||||
}
|
||||
@GET
|
||||
@Path("/order/{order_id}")
|
||||
|
||||
|
||||
@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.ApiResponses(value = {
|
||||
@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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
return delegate.getOrderById(orderId,securityContext);
|
||||
}
|
||||
@POST
|
||||
@Path("/order")
|
||||
|
||||
|
||||
@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.ApiResponses(value = {
|
||||
@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)
|
||||
throws NotFoundException {
|
||||
|
@ -10,6 +10,7 @@ import io.swagger.jaxrs.*;
|
||||
import java.util.List;
|
||||
import io.swagger.model.User;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import io.swagger.api.NotFoundException;
|
||||
|
||||
@ -25,10 +26,10 @@ import javax.ws.rs.core.SecurityContext;
|
||||
import javax.ws.rs.*;
|
||||
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 {
|
||||
private final UserApiService delegate;
|
||||
@ -58,77 +59,77 @@ public class UserApi {
|
||||
|
||||
|
||||
@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.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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
return delegate.createUser(body,securityContext);
|
||||
}
|
||||
@POST
|
||||
@Path("/createWithArray")
|
||||
|
||||
|
||||
@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.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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
return delegate.createUsersWithArrayInput(body,securityContext);
|
||||
}
|
||||
@POST
|
||||
@Path("/createWithList")
|
||||
|
||||
|
||||
@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.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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
return delegate.createUsersWithListInput(body,securityContext);
|
||||
}
|
||||
@DELETE
|
||||
@Path("/{username}")
|
||||
|
||||
|
||||
@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.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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
return delegate.deleteUser(username,securityContext);
|
||||
}
|
||||
@GET
|
||||
@Path("/{username}")
|
||||
|
||||
|
||||
@Produces({ "application/xml", "application/json" })
|
||||
@io.swagger.annotations.ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", })
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
return delegate.getUserByName(username,securityContext);
|
||||
}
|
||||
@GET
|
||||
@Path("/login")
|
||||
|
||||
|
||||
@Produces({ "application/xml", "application/json" })
|
||||
@io.swagger.annotations.ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", })
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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
|
||||
,@ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password
|
||||
,@Context SecurityContext securityContext)
|
||||
@ -136,25 +137,25 @@ public class UserApi {
|
||||
return delegate.loginUser(username,password,securityContext);
|
||||
}
|
||||
@GET
|
||||
@Path("/logout")
|
||||
|
||||
|
||||
@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.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)
|
||||
throws NotFoundException {
|
||||
return delegate.logoutUser(securityContext);
|
||||
}
|
||||
@PUT
|
||||
@Path("/{username}")
|
||||
|
||||
|
||||
@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.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
|
||||
,@ApiParam(value = "Updated user object" ,required=true) User body
|
||||
,@Context SecurityContext securityContext)
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -16,7 +16,7 @@ import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.SecurityContext;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
public class FakeClassnameTestApiServiceImpl extends FakeClassnameTestApiService {
|
||||
public class FakeClassnameTags123ApiServiceImpl extends FakeClassnameTags123ApiService {
|
||||
@Override
|
||||
public Response testClassname(Client body, SecurityContext securityContext) throws NotFoundException {
|
||||
// do some magic!
|
@ -1,4 +1,4 @@
|
||||
# Swagger Jersey 2 generated server
|
||||
# Swagger Jersey generated server
|
||||
|
||||
## Overview
|
||||
This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the
|
||||
|
@ -12,6 +12,7 @@ import io.swagger.model.Client;
|
||||
import java.util.Date;
|
||||
import io.swagger.model.OuterComposite;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import io.swagger.api.NotFoundException;
|
||||
|
||||
@ -120,13 +121,13 @@ public class FakeApi {
|
||||
|
||||
@Consumes({ "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")
|
||||
}, tags={ "fake", })
|
||||
@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
|
||||
,@ApiParam(value = "None", required=true) @FormParam("double") Double _double
|
||||
,@ApiParam(value = "None", required=true) @FormParam("pattern_without_delimiter") String patternWithoutDelimiter
|
||||
@ -149,11 +150,11 @@ public class FakeApi {
|
||||
|
||||
@Consumes({ "*/*" })
|
||||
@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.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
|
||||
,@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
|
||||
@ -170,9 +171,9 @@ public class FakeApi {
|
||||
@Path("/jsonFormData")
|
||||
@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.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
|
||||
,@ApiParam(value = "field2", required=true) @FormParam("param2") String param2
|
||||
,@Context SecurityContext securityContext)
|
||||
|
@ -9,6 +9,7 @@ import io.swagger.jaxrs.*;
|
||||
|
||||
import io.swagger.model.Client;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import io.swagger.api.NotFoundException;
|
||||
|
||||
|
@ -11,6 +11,7 @@ import java.io.File;
|
||||
import io.swagger.model.ModelApiResponse;
|
||||
import io.swagger.model.Pet;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import io.swagger.api.NotFoundException;
|
||||
|
||||
@ -59,14 +60,14 @@ public class PetApi {
|
||||
|
||||
@Consumes({ "application/json", "application/xml" })
|
||||
@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.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
@ -76,14 +77,14 @@ public class PetApi {
|
||||
@Path("/{petId}")
|
||||
|
||||
@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.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@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
|
||||
,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey
|
||||
,@Context SecurityContext securityContext)
|
||||
@ -103,7 +104,7 @@ public class PetApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
@ -122,7 +123,7 @@ public class PetApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
@ -138,9 +139,9 @@ public class PetApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
@ -150,18 +151,18 @@ public class PetApi {
|
||||
|
||||
@Consumes({ "application/json", "application/xml" })
|
||||
@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.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
@ -171,14 +172,14 @@ public class PetApi {
|
||||
@Path("/{petId}")
|
||||
@Consumes({ "application/x-www-form-urlencoded" })
|
||||
@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.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@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
|
||||
,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name
|
||||
,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status
|
||||
|
@ -10,6 +10,7 @@ import io.swagger.jaxrs.*;
|
||||
import java.util.Map;
|
||||
import io.swagger.model.Order;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import io.swagger.api.NotFoundException;
|
||||
|
||||
@ -58,11 +59,11 @@ public class StoreApi {
|
||||
@Path("/order/{order_id}")
|
||||
|
||||
@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.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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
@ -76,7 +77,7 @@ public class StoreApi {
|
||||
@io.swagger.annotations.Authorization(value = "api_key")
|
||||
}, tags={ "store", })
|
||||
@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)
|
||||
throws NotFoundException {
|
||||
return delegate.getInventory(securityContext);
|
||||
@ -89,9 +90,9 @@ public class StoreApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
@ -105,7 +106,7 @@ public class StoreApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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)
|
||||
throws NotFoundException {
|
||||
|
@ -10,6 +10,7 @@ import io.swagger.jaxrs.*;
|
||||
import java.util.List;
|
||||
import io.swagger.model.User;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import io.swagger.api.NotFoundException;
|
||||
|
||||
@ -58,9 +59,9 @@ public class UserApi {
|
||||
|
||||
|
||||
@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.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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
@ -70,9 +71,9 @@ public class UserApi {
|
||||
@Path("/createWithArray")
|
||||
|
||||
@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.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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
@ -82,9 +83,9 @@ public class UserApi {
|
||||
@Path("/createWithList")
|
||||
|
||||
@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.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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
@ -94,11 +95,11 @@ public class UserApi {
|
||||
@Path("/{username}")
|
||||
|
||||
@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.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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
@ -112,9 +113,9 @@ public class UserApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
@ -128,7 +129,7 @@ public class UserApi {
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@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
|
||||
,@ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password
|
||||
,@Context SecurityContext securityContext)
|
||||
@ -139,9 +140,9 @@ public class UserApi {
|
||||
@Path("/logout")
|
||||
|
||||
@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.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)
|
||||
throws NotFoundException {
|
||||
return delegate.logoutUser(securityContext);
|
||||
@ -150,11 +151,11 @@ public class UserApi {
|
||||
@Path("/{username}")
|
||||
|
||||
@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.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
|
||||
,@ApiParam(value = "Updated user object" ,required=true) User body
|
||||
,@Context SecurityContext securityContext)
|
||||
|
@ -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)));
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user