Replace ^M with new line (\r) in mustache template (#3865)

* fix jaxrs line break

* fix java gradle bat line break

* fix scala gradle line break

* fix undertow crt line break

* fix spring line break

* fix undertow line break in pom

* rollback undertwo petstore to use petstore.yaml
This commit is contained in:
wing328 2016-09-26 16:49:44 +08:00 committed by GitHub
parent 1dc09f3619
commit fa12cd3787
54 changed files with 1228 additions and 1132 deletions

View File

@ -26,6 +26,6 @@ fi
# if you've executed sbt assembly previously it will use that instead. # if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -t modules/swagger-codegen/src/main/resources/undertow -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l undertow -o samples/server/petstore/undertow" ags="$@ generate -t modules/swagger-codegen/src/main/resources/undertow -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l undertow -o samples/server/petstore/undertow"
java $JAVA_OPTS -jar $executable $ags java $JAVA_OPTS -jar $executable $ags

View File

@ -1,90 +1,90 @@
@if "%DEBUG%" == "" @echo off @if "%DEBUG%" == "" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@rem @rem
@rem ########################################################################## @rem ##########################################################################
@rem Set local scope for the variables with windows NT shell @rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS= set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@rem Find java.exe @rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init if "%ERRORLEVEL%" == "0" goto init
echo. echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo. echo.
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation. echo location of your Java installation.
goto fail goto fail
:findJavaFromJavaHome :findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=% set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init if exist "%JAVA_EXE%" goto init
echo. echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo. echo.
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation. echo location of your Java installation.
goto fail goto fail
:init :init
@rem Get command-line arguments, handling Windows variants @rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args :win9xME_args
@rem Slurp the command line arguments. @rem Slurp the command line arguments.
set CMD_LINE_ARGS= set CMD_LINE_ARGS=
set _SKIP=2 set _SKIP=2
:win9xME_args_slurp :win9xME_args_slurp
if "x%~1" == "x" goto execute if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%* set CMD_LINE_ARGS=%*
goto execute goto execute
:4NT_args :4NT_args
@rem Get arguments from the 4NT Shell from JP Software @rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$ set CMD_LINE_ARGS=%$
:execute :execute
@rem Setup the command line @rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle @rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if "%ERRORLEVEL%"=="0" goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1 exit /b 1
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal
:omega :omega

View File

@ -1,56 +1,56 @@
package {{package}}; package {{package}};
import {{modelPackage}}.*; import {{modelPackage}}.*;
import {{package}}.{{classname}}Service; import {{package}}.{{classname}}Service;
import {{package}}.factories.{{classname}}ServiceFactory; import {{package}}.factories.{{classname}}ServiceFactory;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import io.swagger.jaxrs.*; import io.swagger.jaxrs.*;
{{#imports}}import {{import}}; {{#imports}}import {{import}};
{{/imports}} {{/imports}}
import java.util.List; import java.util.List;
import {{package}}.NotFoundException; import {{package}}.NotFoundException;
import java.io.InputStream; import java.io.InputStream;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam; import org.glassfish.jersey.media.multipart.FormDataParam;
import javax.ws.rs.core.Context; import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext; import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.*; import javax.ws.rs.*;
@Path("/{{baseName}}") @Path("/{{baseName}}")
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}} {{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}} {{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
@io.swagger.annotations.Api(description = "the {{baseName}} API") @io.swagger.annotations.Api(description = "the {{baseName}} API")
{{>generatedAnnotation}} {{>generatedAnnotation}}
{{#operations}} {{#operations}}
public class {{classname}} { public class {{classname}} {
private final {{classname}}Service delegate = {{classname}}ServiceFactory.get{{classname}}(); private final {{classname}}Service delegate = {{classname}}ServiceFactory.get{{classname}}();
{{#operation}} {{#operation}}
@{{httpMethod}} @{{httpMethod}}
{{#subresourceOperation}}@Path("{{path}}"){{/subresourceOperation}} {{#subresourceOperation}}@Path("{{path}}"){{/subresourceOperation}}
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}} {{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}} {{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
@io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { @io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = {
{{#authMethods}}@io.swagger.annotations.Authorization(value = "{{name}}"{{#isOAuth}}, scopes = { {{#authMethods}}@io.swagger.annotations.Authorization(value = "{{name}}"{{#isOAuth}}, scopes = {
{{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}}, {{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}},
{{/hasMore}}{{/scopes}} {{/hasMore}}{{/scopes}}
}{{/isOAuth}}){{#hasMore}}, }{{/isOAuth}}){{#hasMore}},
{{/hasMore}}{{/authMethods}} {{/hasMore}}{{/authMethods}}
}{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} }) }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} })
@io.swagger.annotations.ApiResponses(value = { {{#responses}} @io.swagger.annotations.ApiResponses(value = { {{#responses}}
@io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}){{#hasMore}}, @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}){{#hasMore}},
{{/hasMore}}{{/responses}} }) {{/hasMore}}{{/responses}} })
public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}},{{/allParams}}@Context SecurityContext securityContext) public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}},{{/allParams}}@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.{{nickname}}({{#allParams}}{{#isFile}}{{paramName}}InputStream, {{paramName}}Detail{{/isFile}}{{^isFile}}{{paramName}}{{/isFile}},{{/allParams}}securityContext); return delegate.{{nickname}}({{#allParams}}{{#isFile}}{{paramName}}InputStream, {{paramName}}Detail{{/isFile}}{{^isFile}}{{paramName}}{{/isFile}},{{/allParams}}securityContext);
} }
{{/operation}} {{/operation}}
} }
{{/operations}} {{/operations}}

View File

@ -1,2 +1,2 @@
springfox.documentation.swagger.v2.path=/api-docs springfox.documentation.swagger.v2.path=/api-docs
#server.port=8090 #server.port=8090

View File

@ -1,16 +1,16 @@
package {{configPackage}}; package {{configPackage}};
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
/** /**
* Home redirection to swagger api documentation * Home redirection to swagger api documentation
*/ */
@Controller @Controller
public class HomeController { public class HomeController {
@RequestMapping(value = "/") @RequestMapping(value = "/")
public String index() { public String index() {
System.out.println("swagger-ui.html"); System.out.println("swagger-ui.html");
return "redirect:swagger-ui.html"; return "redirect:swagger-ui.html";
} }
} }

View File

@ -1,36 +1,36 @@
package {{basePackage}}; package {{basePackage}};
import org.springframework.boot.CommandLineRunner; import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.ExitCodeGenerator; import org.springframework.boot.ExitCodeGenerator;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import springfox.documentation.swagger2.annotations.EnableSwagger2; import springfox.documentation.swagger2.annotations.EnableSwagger2;
@SpringBootApplication @SpringBootApplication
@EnableSwagger2 @EnableSwagger2
@ComponentScan(basePackages = "{{basePackage}}") @ComponentScan(basePackages = "{{basePackage}}")
public class Swagger2SpringBoot implements CommandLineRunner { public class Swagger2SpringBoot implements CommandLineRunner {
@Override @Override
public void run(String... arg0) throws Exception { public void run(String... arg0) throws Exception {
if (arg0.length > 0 && arg0[0].equals("exitcode")) { if (arg0.length > 0 && arg0[0].equals("exitcode")) {
throw new ExitException(); throw new ExitException();
} }
} }
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
new SpringApplication(Swagger2SpringBoot.class).run(args); new SpringApplication(Swagger2SpringBoot.class).run(args);
} }
class ExitException extends RuntimeException implements ExitCodeGenerator { class ExitException extends RuntimeException implements ExitCodeGenerator {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Override @Override
public int getExitCode() { public int getExitCode() {
return 10; return 10;
} }
} }
} }

View File

@ -1,90 +1,90 @@
@if "%DEBUG%" == "" @echo off @if "%DEBUG%" == "" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@rem @rem
@rem ########################################################################## @rem ##########################################################################
@rem Set local scope for the variables with windows NT shell @rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS= set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@rem Find java.exe @rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init if "%ERRORLEVEL%" == "0" goto init
echo. echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo. echo.
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation. echo location of your Java installation.
goto fail goto fail
:findJavaFromJavaHome :findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=% set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init if exist "%JAVA_EXE%" goto init
echo. echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo. echo.
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation. echo location of your Java installation.
goto fail goto fail
:init :init
@rem Get command-line arguments, handling Windows variants @rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args :win9xME_args
@rem Slurp the command line arguments. @rem Slurp the command line arguments.
set CMD_LINE_ARGS= set CMD_LINE_ARGS=
set _SKIP=2 set _SKIP=2
:win9xME_args_slurp :win9xME_args_slurp
if "x%~1" == "x" goto execute if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%* set CMD_LINE_ARGS=%*
goto execute goto execute
:4NT_args :4NT_args
@rem Get arguments from the 4NT Shell from JP Software @rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$ set CMD_LINE_ARGS=%$
:execute :execute
@rem Setup the command line @rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle @rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if "%ERRORLEVEL%"=="0" goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1 exit /b 1
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal
:omega :omega

View File

@ -186,4 +186,4 @@
</snapshots> </snapshots>
</repository> </repository>
</repositories> </repositories>
</project> </project>

View File

@ -1,19 +1,19 @@
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIDmzCCAoOgAwIBAgIEHnAgtDANBgkqhkiG9w0BAQsFADB+MQswCQYDVQQGEwJDQTEQMA4GA1UE MIIDmzCCAoOgAwIBAgIEHnAgtDANBgkqhkiG9w0BAQsFADB+MQswCQYDVQQGEwJDQTEQMA4GA1UE
CBMHT250YXJpbzEUMBIGA1UEBxMLTWlzc2lzc2F1Z2ExJjAkBgNVBAoTHU5ldHdvcmsgTmV3IFRl CBMHT250YXJpbzEUMBIGA1UEBxMLTWlzc2lzc2F1Z2ExJjAkBgNVBAoTHU5ldHdvcmsgTmV3IFRl
Y2hub2xvZ2llcyBJbmMuMQwwCgYDVQQLEwNERVYxETAPBgNVBAMTCFN0ZXZlIEh1MB4XDTE2MDkw Y2hub2xvZ2llcyBJbmMuMQwwCgYDVQQLEwNERVYxETAPBgNVBAMTCFN0ZXZlIEh1MB4XDTE2MDkw
MTE2MTYxNVoXDTI2MDcxMTE2MTYxNVowfjELMAkGA1UEBhMCQ0ExEDAOBgNVBAgTB09udGFyaW8x MTE2MTYxNVoXDTI2MDcxMTE2MTYxNVowfjELMAkGA1UEBhMCQ0ExEDAOBgNVBAgTB09udGFyaW8x
FDASBgNVBAcTC01pc3Npc3NhdWdhMSYwJAYDVQQKEx1OZXR3b3JrIE5ldyBUZWNobm9sb2dpZXMg FDASBgNVBAcTC01pc3Npc3NhdWdhMSYwJAYDVQQKEx1OZXR3b3JrIE5ldyBUZWNobm9sb2dpZXMg
SW5jLjEMMAoGA1UECxMDREVWMREwDwYDVQQDEwhTdGV2ZSBIdTCCASIwDQYJKoZIhvcNAQEBBQAD SW5jLjEMMAoGA1UECxMDREVWMREwDwYDVQQDEwhTdGV2ZSBIdTCCASIwDQYJKoZIhvcNAQEBBQAD
ggEPADCCAQoCggEBALrlxMtDb60DogElf4TBz504tRheZimAE0dJL/Yby4nacJdqvc5l4z+WWpDf ggEPADCCAQoCggEBALrlxMtDb60DogElf4TBz504tRheZimAE0dJL/Yby4nacJdqvc5l4z+WWpDf
rI9krQ2Yi9yvhwAP+PrR6gWcIqWP4cpNE7XIAUDgr4CtyI7CptT/lpjtbkz4DGCMmaeDn0jqHqJt rI9krQ2Yi9yvhwAP+PrR6gWcIqWP4cpNE7XIAUDgr4CtyI7CptT/lpjtbkz4DGCMmaeDn0jqHqJt
SeSZGfwVu5zAGm8n4sHatjnnxBI/iWzkTII3V4xv0WeK37szNTEd+ly2ag7n2IV5zNnYmqZTeMQm SeSZGfwVu5zAGm8n4sHatjnnxBI/iWzkTII3V4xv0WeK37szNTEd+ly2ag7n2IV5zNnYmqZTeMQm
J2ENS+IwAG3ENtiVtrVTx/2bGtqutJjtdxsN58/cUG/guRyMT6OPI8Yi3ZzevdvRbxadyhEl/Kaw J2ENS+IwAG3ENtiVtrVTx/2bGtqutJjtdxsN58/cUG/guRyMT6OPI8Yi3ZzevdvRbxadyhEl/Kaw
6vJcdxmJI3tp4lx+p6sAxOWa7aapJe4JxutAQqzv0GKdVjoHKQ1wB60CAwEAAaMhMB8wHQYDVR0O 6vJcdxmJI3tp4lx+p6sAxOWa7aapJe4JxutAQqzv0GKdVjoHKQ1wB60CAwEAAaMhMB8wHQYDVR0O
BBYEFIPF9SBd06RWU1eDL73CKfy01lavMA0GCSqGSIb3DQEBCwUAA4IBAQAoaKZGOak3Upz/ordF BBYEFIPF9SBd06RWU1eDL73CKfy01lavMA0GCSqGSIb3DQEBCwUAA4IBAQAoaKZGOak3Upz/ordF
slZoJuZlCu7jnKQEjYwHf3DNxcd1WmgFPtMcna6pW0VUxPIfidEA6VCMsGoK1RvshB0SjrRdCht6 slZoJuZlCu7jnKQEjYwHf3DNxcd1WmgFPtMcna6pW0VUxPIfidEA6VCMsGoK1RvshB0SjrRdCht6
5qPXs9kV3NW0WvMiwDSYZZ9HgaZ9efTe5E9Fzc7ltKrE43L6k8NJcaEEWEdpdjFbrAqH4I+j/Vro 5qPXs9kV3NW0WvMiwDSYZZ9HgaZ9efTe5E9Fzc7ltKrE43L6k8NJcaEEWEdpdjFbrAqH4I+j/Vro
K3OhIo062fXjas5ipL4gF+3ECImjWzirQP8UiAfM0/36x7rtAu3btH/qI9hSyx39LBPPE5AsDJZ4 K3OhIo062fXjas5ipL4gF+3ECImjWzirQP8UiAfM0/36x7rtAu3btH/qI9hSyx39LBPPE5AsDJZ4
dSMwNTW1gqmBAZIj+zQ/RD5dyWfPwON7Q+t96YbK6WBuYo0xy+I+PjcUgrWYWP3N24hlq8ZBIei+ dSMwNTW1gqmBAZIj+zQ/RD5dyWfPwON7Q+t96YbK6WBuYo0xy+I+PjcUgrWYWP3N24hlq8ZBIei+
BudoEVJlIlmS0aRCuP8n BudoEVJlIlmS0aRCuP8n
-----END CERTIFICATE----- -----END CERTIFICATE-----

View File

@ -8,10 +8,14 @@ import io.swagger.annotations.ApiModelProperty;
/**
* A category for a pet
**/
/** /**
* Category * A category for a pet
*/ */
@ApiModel(description = "A category for a pet")
public class Category { public class Category {
@JsonProperty("id") @JsonProperty("id")

View File

@ -8,10 +8,14 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Describes the result of uploading an image resource
**/
/** /**
* ModelApiResponse * Describes the result of uploading an image resource
*/ */
@ApiModel(description = "Describes the result of uploading an image resource")
public class ModelApiResponse { public class ModelApiResponse {
@JsonProperty("code") @JsonProperty("code")

View File

@ -10,10 +10,14 @@ import org.joda.time.DateTime;
/**
* An order for a pets from the pet store
**/
/** /**
* Order * An order for a pets from the pet store
*/ */
@ApiModel(description = "An order for a pets from the pet store")
public class Order { public class Order {
@JsonProperty("id") @JsonProperty("id")

View File

@ -13,10 +13,14 @@ import java.util.List;
/**
* A pet for sale in the pet store
**/
/** /**
* Pet * A pet for sale in the pet store
*/ */
@ApiModel(description = "A pet for sale in the pet store")
public class Pet { public class Pet {
@JsonProperty("id") @JsonProperty("id")

View File

@ -8,10 +8,14 @@ import io.swagger.annotations.ApiModelProperty;
/**
* A tag for a pet
**/
/** /**
* Tag * A tag for a pet
*/ */
@ApiModel(description = "A tag for a pet")
public class Tag { public class Tag {
@JsonProperty("id") @JsonProperty("id")

View File

@ -8,10 +8,14 @@ import io.swagger.annotations.ApiModelProperty;
/**
* A User who is purchasing from the pet store
**/
/** /**
* User * A User who is purchasing from the pet store
*/ */
@ApiModel(description = "A User who is purchasing from the pet store")
public class User { public class User {
@JsonProperty("id") @JsonProperty("id")

View File

@ -8,10 +8,14 @@ import io.swagger.annotations.ApiModelProperty;
/**
* A category for a pet
**/
/** /**
* Category * A category for a pet
*/ */
@ApiModel(description = "A category for a pet")
public class Category { public class Category {
@JsonProperty("id") @JsonProperty("id")

View File

@ -8,10 +8,14 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Describes the result of uploading an image resource
**/
/** /**
* ModelApiResponse * Describes the result of uploading an image resource
*/ */
@ApiModel(description = "Describes the result of uploading an image resource")
public class ModelApiResponse { public class ModelApiResponse {
@JsonProperty("code") @JsonProperty("code")

View File

@ -10,10 +10,14 @@ import org.joda.time.DateTime;
/**
* An order for a pets from the pet store
**/
/** /**
* Order * An order for a pets from the pet store
*/ */
@ApiModel(description = "An order for a pets from the pet store")
public class Order { public class Order {
@JsonProperty("id") @JsonProperty("id")

View File

@ -13,10 +13,14 @@ import java.util.List;
/**
* A pet for sale in the pet store
**/
/** /**
* Pet * A pet for sale in the pet store
*/ */
@ApiModel(description = "A pet for sale in the pet store")
public class Pet { public class Pet {
@JsonProperty("id") @JsonProperty("id")

View File

@ -8,10 +8,14 @@ import io.swagger.annotations.ApiModelProperty;
/**
* A tag for a pet
**/
/** /**
* Tag * A tag for a pet
*/ */
@ApiModel(description = "A tag for a pet")
public class Tag { public class Tag {
@JsonProperty("id") @JsonProperty("id")

View File

@ -8,10 +8,14 @@ import io.swagger.annotations.ApiModelProperty;
/**
* A User who is purchasing from the pet store
**/
/** /**
* User * A User who is purchasing from the pet store
*/ */
@ApiModel(description = "A User who is purchasing from the pet store")
public class User { public class User {
@JsonProperty("id") @JsonProperty("id")

View File

@ -60,19 +60,20 @@ public class FakeApi {
public Response testEndpointParameters( public Response testEndpointParameters(
@ApiParam(value = "None", required=true) @FormParam("number") BigDecimal number, @ApiParam(value = "None", required=true) @FormParam("number") BigDecimal number,
@ApiParam(value = "None", required=true) @FormParam("double") Double _double, @ApiParam(value = "None", required=true) @FormParam("double") Double _double,
@ApiParam(value = "None", required=true) @FormParam("string") String string, @ApiParam(value = "None", required=true) @FormParam("pattern_without_delimiter") String patternWithoutDelimiter,
@ApiParam(value = "None", required=true) @FormParam("byte") byte[] _byte, @ApiParam(value = "None", required=true) @FormParam("byte") byte[] _byte,
@ApiParam(value = "None") @FormParam("integer") Integer integer, @ApiParam(value = "None") @FormParam("integer") Integer integer,
@ApiParam(value = "None") @FormParam("int32") Integer int32, @ApiParam(value = "None") @FormParam("int32") Integer int32,
@ApiParam(value = "None") @FormParam("int64") Long int64, @ApiParam(value = "None") @FormParam("int64") Long int64,
@ApiParam(value = "None") @FormParam("float") Float _float, @ApiParam(value = "None") @FormParam("float") Float _float,
@ApiParam(value = "None") @FormParam("string") String string,
@ApiParam(value = "None") @FormParam("binary") byte[] binary, @ApiParam(value = "None") @FormParam("binary") byte[] binary,
@ApiParam(value = "None") @FormParam("date") Date date, @ApiParam(value = "None") @FormParam("date") Date date,
@ApiParam(value = "None") @FormParam("dateTime") Date dateTime, @ApiParam(value = "None") @FormParam("dateTime") Date dateTime,
@ApiParam(value = "None") @FormParam("password") String password, @ApiParam(value = "None") @FormParam("password") String password,
@Context SecurityContext securityContext) @Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.testEndpointParameters(number,_double,string,_byte,integer,int32,int64,_float,binary,date,dateTime,password,securityContext); return delegate.testEndpointParameters(number,_double,patternWithoutDelimiter,_byte,integer,int32,int64,_float,string,binary,date,dateTime,password,securityContext);
} }
@GET @GET
@ -83,9 +84,9 @@ public class FakeApi {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = void.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = void.class) })
public Response testEnumParameters( public Response testEnumParameters(
@ApiParam(value = "Form parameter enum test (string array)") @FormParam("enum_form_string_array") List<String> enumFormStringArray, @ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @FormParam("enum_form_string_array") List<String> enumFormStringArray,
@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString, @ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,
@ApiParam(value = "Header parameter enum test (string array)" )@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray,
@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString, @ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,
@ApiParam(value = "Query parameter enum test (string array)", allowableValues=">, $") @QueryParam("enum_query_string_array") List<String> enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string array)", allowableValues=">, $") @QueryParam("enum_query_string_array") List<String> enumQueryStringArray,
@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString, @ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,

View File

@ -24,7 +24,7 @@ import javax.ws.rs.core.SecurityContext;
public abstract class FakeApiService { public abstract class FakeApiService {
public abstract Response testClientModel(Client body,SecurityContext securityContext) public abstract Response testClientModel(Client body,SecurityContext securityContext)
throws NotFoundException; throws NotFoundException;
public abstract Response testEndpointParameters(BigDecimal number,Double _double,String string,byte[] _byte,Integer integer,Integer int32,Long int64,Float _float,byte[] binary,Date date,Date dateTime,String password,SecurityContext securityContext) public abstract Response testEndpointParameters(BigDecimal number,Double _double,String patternWithoutDelimiter,byte[] _byte,Integer integer,Integer int32,Long int64,Float _float,String string,byte[] binary,Date date,Date dateTime,String password,SecurityContext securityContext)
throws NotFoundException; throws NotFoundException;
public abstract Response testEnumParameters(List<String> enumFormStringArray,String enumFormString,List<String> enumHeaderStringArray,String enumHeaderString,List<String> enumQueryStringArray,String enumQueryString,BigDecimal enumQueryInteger,Double enumQueryDouble,SecurityContext securityContext) public abstract Response testEnumParameters(List<String> enumFormStringArray,String enumFormString,List<String> enumHeaderStringArray,String enumHeaderString,List<String> enumQueryStringArray,String enumQueryString,BigDecimal enumQueryInteger,Double enumQueryDouble,SecurityContext securityContext)
throws NotFoundException; throws NotFoundException;

View File

@ -22,7 +22,7 @@ public class Model200Response {
private Integer name = null; private Integer name = null;
@JsonProperty("class") @JsonProperty("class")
private String PropertyClass = null; private String propertyClass = null;
public Model200Response name(Integer name) { public Model200Response name(Integer name) {
this.name = name; this.name = name;
@ -42,22 +42,22 @@ public class Model200Response {
this.name = name; this.name = name;
} }
public Model200Response PropertyClass(String PropertyClass) { public Model200Response propertyClass(String propertyClass) {
this.PropertyClass = PropertyClass; this.propertyClass = propertyClass;
return this; return this;
} }
/** /**
* Get PropertyClass * Get propertyClass
* @return PropertyClass * @return propertyClass
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getPropertyClass() { public String getPropertyClass() {
return PropertyClass; return propertyClass;
} }
public void setPropertyClass(String PropertyClass) { public void setPropertyClass(String propertyClass) {
this.PropertyClass = PropertyClass; this.propertyClass = propertyClass;
} }
@ -71,12 +71,12 @@ public class Model200Response {
} }
Model200Response _200Response = (Model200Response) o; Model200Response _200Response = (Model200Response) o;
return Objects.equals(this.name, _200Response.name) && return Objects.equals(this.name, _200Response.name) &&
Objects.equals(this.PropertyClass, _200Response.PropertyClass); Objects.equals(this.propertyClass, _200Response.propertyClass);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(name, PropertyClass); return Objects.hash(name, propertyClass);
} }
@Override @Override
@ -85,7 +85,7 @@ public class Model200Response {
sb.append("class Model200Response {\n"); sb.append("class Model200Response {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" PropertyClass: ").append(toIndentedString(PropertyClass)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();
} }

View File

@ -29,7 +29,7 @@ public class FakeApiServiceImpl extends FakeApiService {
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
} }
@Override @Override
public Response testEndpointParameters(BigDecimal number, Double _double, String string, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, byte[] binary, Date date, Date dateTime, String password, SecurityContext securityContext) public Response testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, Date date, Date dateTime, String password, SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
// do some magic! // do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();

View File

@ -1,60 +1,60 @@
package io.swagger.api; package io.swagger.api;
import io.swagger.model.*; import io.swagger.model.*;
import io.swagger.api.FakeApiService; import io.swagger.api.FakeApiService;
import io.swagger.api.factories.FakeApiServiceFactory; import io.swagger.api.factories.FakeApiServiceFactory;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import io.swagger.jaxrs.*; import io.swagger.jaxrs.*;
import io.swagger.model.Client; import io.swagger.model.Client;
import java.math.BigDecimal; import java.util.Date;
import java.util.Date; import java.math.BigDecimal;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
import java.io.InputStream; import java.io.InputStream;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam; import org.glassfish.jersey.media.multipart.FormDataParam;
import javax.ws.rs.core.Context; import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext; import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.*; import javax.ws.rs.*;
@Path("/fake") @Path("/fake")
@io.swagger.annotations.Api(description = "the fake API") @io.swagger.annotations.Api(description = "the fake API")
public class FakeApi { public class FakeApi {
private final FakeApiService delegate = FakeApiServiceFactory.getFakeApi(); private final FakeApiService delegate = FakeApiServiceFactory.getFakeApi();
@PATCH @PATCH
@Consumes({ "application/json" }) @Consumes({ "application/json" })
@Produces({ "application/json" }) @Produces({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "To test \"client\" model", notes = "", response = Client.class, tags={ "fake", }) @io.swagger.annotations.ApiOperation(value = "To test \"client\" model", notes = "", response = Client.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response testClientModel(@ApiParam(value = "client model" ,required=true) Client body public Response testClientModel(@ApiParam(value = "client model" ,required=true) Client body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.testClientModel(body,securityContext); return delegate.testClientModel(body,securityContext);
} }
@POST @POST
@Consumes({ "application/xml; charset=utf-8", "application/json; charset=utf-8" }) @Consumes({ "application/xml; charset=utf-8", "application/json; charset=utf-8" })
@Produces({ "application/xml; charset=utf-8", "application/json; charset=utf-8" }) @Produces({ "application/xml; charset=utf-8", "application/json; charset=utf-8" })
@io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = void.class, authorizations = { @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = void.class, authorizations = {
@io.swagger.annotations.Authorization(value = "http_basic_test") @io.swagger.annotations.Authorization(value = "http_basic_test")
}, tags={ "fake", }) }, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = void.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = void.class) })
public Response testEndpointParameters(@ApiParam(value = "None", required=true) @FormParam("number") BigDecimal number public Response testEndpointParameters(@ApiParam(value = "None", required=true) @FormParam("number") BigDecimal number
,@ApiParam(value = "None", required=true) @FormParam("double") Double _double ,@ApiParam(value = "None", required=true) @FormParam("double") Double _double
,@ApiParam(value = "None", required=true) @FormParam("pattern_without_delimiter") String patternWithoutDelimiter ,@ApiParam(value = "None", required=true) @FormParam("pattern_without_delimiter") String patternWithoutDelimiter
@ -68,19 +68,19 @@ public class FakeApi {
,@ApiParam(value = "None") @FormParam("date") Date date ,@ApiParam(value = "None") @FormParam("date") Date date
,@ApiParam(value = "None") @FormParam("dateTime") Date dateTime ,@ApiParam(value = "None") @FormParam("dateTime") Date dateTime
,@ApiParam(value = "None") @FormParam("password") String password ,@ApiParam(value = "None") @FormParam("password") String password
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.testEndpointParameters(number,_double,patternWithoutDelimiter,_byte,integer,int32,int64,_float,string,binary,date,dateTime,password,securityContext); return delegate.testEndpointParameters(number,_double,patternWithoutDelimiter,_byte,integer,int32,int64,_float,string,binary,date,dateTime,password,securityContext);
} }
@GET @GET
@Consumes({ "application/json" }) @Consumes({ "application/json" })
@Produces({ "application/json" }) @Produces({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "To test enum parameters", notes = "", response = void.class, tags={ "fake", }) @io.swagger.annotations.ApiOperation(value = "To test enum parameters", notes = "", response = void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = void.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = void.class) })
public Response testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @FormParam("enum_form_string_array") List<String> enumFormStringArray public Response testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @FormParam("enum_form_string_array") List<String> enumFormStringArray
,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString ,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString
,@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray ,@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray
@ -89,8 +89,8 @@ public class FakeApi {
,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString ,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString
,@ApiParam(value = "Query parameter enum test (double)") @QueryParam("enum_query_integer") BigDecimal enumQueryInteger ,@ApiParam(value = "Query parameter enum test (double)") @QueryParam("enum_query_integer") BigDecimal enumQueryInteger
,@ApiParam(value = "Query parameter enum test (double)") @FormParam("enum_query_double") Double enumQueryDouble ,@ApiParam(value = "Query parameter enum test (double)") @FormParam("enum_query_double") Double enumQueryDouble
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.testEnumParameters(enumFormStringArray,enumFormString,enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,securityContext); return delegate.testEnumParameters(enumFormStringArray,enumFormString,enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,securityContext);
} }
} }

View File

@ -6,8 +6,8 @@ import io.swagger.model.*;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import io.swagger.model.Client; import io.swagger.model.Client;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;

View File

@ -1,187 +1,187 @@
package io.swagger.api; package io.swagger.api;
import io.swagger.model.*; import io.swagger.model.*;
import io.swagger.api.PetApiService; import io.swagger.api.PetApiService;
import io.swagger.api.factories.PetApiServiceFactory; import io.swagger.api.factories.PetApiServiceFactory;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import io.swagger.jaxrs.*; import io.swagger.jaxrs.*;
import io.swagger.model.Pet; import io.swagger.model.Pet;
import io.swagger.model.ModelApiResponse; import java.io.File;
import java.io.File; import io.swagger.model.ModelApiResponse;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
import java.io.InputStream; import java.io.InputStream;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam; import org.glassfish.jersey.media.multipart.FormDataParam;
import javax.ws.rs.core.Context; import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext; import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.*; import javax.ws.rs.*;
@Path("/pet") @Path("/pet")
@io.swagger.annotations.Api(description = "the pet API") @io.swagger.annotations.Api(description = "the pet API")
public class PetApi { public class PetApi {
private final PetApiService delegate = PetApiServiceFactory.getPetApi(); private final PetApiService delegate = PetApiServiceFactory.getPetApi();
@POST @POST
@Consumes({ "application/json", "application/xml" }) @Consumes({ "application/json", "application/xml" })
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = void.class, authorizations = { @io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = void.class, authorizations = {
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
}) })
}, tags={ "pet", }) }, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = void.class) })
public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.addPet(body,securityContext); return delegate.addPet(body,securityContext);
} }
@DELETE @DELETE
@Path("/{petId}") @Path("/{petId}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = void.class, authorizations = { @io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = void.class, authorizations = {
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
}) })
}, tags={ "pet", }) }, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = void.class) })
public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId
,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey ,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.deletePet(petId,apiKey,securityContext); return delegate.deletePet(petId,apiKey,securityContext);
} }
@GET @GET
@Path("/findByStatus") @Path("/findByStatus")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { @io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
}) })
}, tags={ "pet", }) }, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Pet.class, responseContainer = "List") }) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Pet.class, responseContainer = "List") })
public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter",required=true, allowableValues="available, pending, sold") @QueryParam("status") List<String> status public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter",required=true, allowableValues="available, pending, sold") @QueryParam("status") List<String> status
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.findPetsByStatus(status,securityContext); return delegate.findPetsByStatus(status,securityContext);
} }
@GET @GET
@Path("/findByTags") @Path("/findByTags")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { @io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
}) })
}, tags={ "pet", }) }, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class, responseContainer = "List") }) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class, responseContainer = "List") })
public Response findPetsByTags(@ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List<String> tags public Response findPetsByTags(@ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List<String> tags
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.findPetsByTags(tags,securityContext); return delegate.findPetsByTags(tags,securityContext);
} }
@GET @GET
@Path("/{petId}") @Path("/{petId}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = { @io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
@io.swagger.annotations.Authorization(value = "api_key") @io.swagger.annotations.Authorization(value = "api_key")
}, tags={ "pet", }) }, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Pet.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Pet.class) })
public Response getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId public Response getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.getPetById(petId,securityContext); return delegate.getPetById(petId,securityContext);
} }
@PUT @PUT
@Consumes({ "application/json", "application/xml" }) @Consumes({ "application/json", "application/xml" })
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = void.class, authorizations = { @io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = void.class, authorizations = {
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
}) })
}, tags={ "pet", }) }, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = void.class),
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = void.class) })
public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.updatePet(body,securityContext); return delegate.updatePet(body,securityContext);
} }
@POST @POST
@Path("/{petId}") @Path("/{petId}")
@Consumes({ "application/x-www-form-urlencoded" }) @Consumes({ "application/x-www-form-urlencoded" })
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = void.class, authorizations = { @io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = void.class, authorizations = {
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
}) })
}, tags={ "pet", }) }, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = void.class) })
public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId
,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name ,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name
,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status ,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.updatePetWithForm(petId,name,status,securityContext); return delegate.updatePetWithForm(petId,name,status,securityContext);
} }
@POST @POST
@Path("/{petId}/uploadImage") @Path("/{petId}/uploadImage")
@Consumes({ "multipart/form-data" }) @Consumes({ "multipart/form-data" })
@Produces({ "application/json" }) @Produces({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
}) })
}, tags={ "pet", }) }, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId
,@ApiParam(value = "Additional data to pass to server")@FormDataParam("additionalMetadata") String additionalMetadata ,@ApiParam(value = "Additional data to pass to server")@FormDataParam("additionalMetadata") String additionalMetadata
, ,
@FormDataParam("file") InputStream fileInputStream, @FormDataParam("file") InputStream fileInputStream,
@FormDataParam("file") FormDataContentDisposition fileDetail @FormDataParam("file") FormDataContentDisposition fileDetail
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.uploadFile(petId,additionalMetadata,fileInputStream, fileDetail,securityContext); return delegate.uploadFile(petId,additionalMetadata,fileInputStream, fileDetail,securityContext);
} }
} }

View File

@ -6,8 +6,8 @@ import io.swagger.model.*;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import io.swagger.model.Pet; import io.swagger.model.Pet;
import io.swagger.model.ModelApiResponse;
import java.io.File; import java.io.File;
import io.swagger.model.ModelApiResponse;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;

View File

@ -1,91 +1,91 @@
package io.swagger.api; package io.swagger.api;
import io.swagger.model.*; import io.swagger.model.*;
import io.swagger.api.StoreApiService; import io.swagger.api.StoreApiService;
import io.swagger.api.factories.StoreApiServiceFactory; import io.swagger.api.factories.StoreApiServiceFactory;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import io.swagger.jaxrs.*; import io.swagger.jaxrs.*;
import java.util.Map; import java.util.Map;
import io.swagger.model.Order; import io.swagger.model.Order;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
import java.io.InputStream; import java.io.InputStream;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam; import org.glassfish.jersey.media.multipart.FormDataParam;
import javax.ws.rs.core.Context; import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext; import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.*; import javax.ws.rs.*;
@Path("/store") @Path("/store")
@io.swagger.annotations.Api(description = "the store API") @io.swagger.annotations.Api(description = "the store API")
public class StoreApi { public class StoreApi {
private final StoreApiService delegate = StoreApiServiceFactory.getStoreApi(); private final StoreApiService delegate = StoreApiServiceFactory.getStoreApi();
@DELETE @DELETE
@Path("/order/{orderId}") @Path("/order/{orderId}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = void.class, tags={ "store", }) @io.swagger.annotations.ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = void.class, tags={ "store", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = void.class) })
public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("orderId") String orderId public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("orderId") String orderId
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.deleteOrder(orderId,securityContext); return delegate.deleteOrder(orderId,securityContext);
} }
@GET @GET
@Path("/inventory") @Path("/inventory")
@Produces({ "application/json" }) @Produces({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { @io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
@io.swagger.annotations.Authorization(value = "api_key") @io.swagger.annotations.Authorization(value = "api_key")
}, tags={ "store", }) }, tags={ "store", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") }) @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") })
public Response getInventory(@Context SecurityContext securityContext) public Response getInventory(@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.getInventory(securityContext); return delegate.getInventory(securityContext);
} }
@GET @GET
@Path("/order/{orderId}") @Path("/order/{orderId}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Order.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Order.class) })
public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") Long orderId public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") Long orderId
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.getOrderById(orderId,securityContext); return delegate.getOrderById(orderId,securityContext);
} }
@POST @POST
@Path("/order") @Path("/order")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", }) @io.swagger.annotations.ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Order.class) }) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Order.class) })
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.placeOrder(body,securityContext); return delegate.placeOrder(body,securityContext);
} }
} }

View File

@ -1,141 +1,141 @@
package io.swagger.api; package io.swagger.api;
import io.swagger.model.*; import io.swagger.model.*;
import io.swagger.api.UserApiService; import io.swagger.api.UserApiService;
import io.swagger.api.factories.UserApiServiceFactory; import io.swagger.api.factories.UserApiServiceFactory;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import io.swagger.jaxrs.*; import io.swagger.jaxrs.*;
import io.swagger.model.User; import io.swagger.model.User;
import java.util.List; import java.util.List;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;
import java.io.InputStream; import java.io.InputStream;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam; import org.glassfish.jersey.media.multipart.FormDataParam;
import javax.ws.rs.core.Context; import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext; import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.*; import javax.ws.rs.*;
@Path("/user") @Path("/user")
@io.swagger.annotations.Api(description = "the user API") @io.swagger.annotations.Api(description = "the user API")
public class UserApi { public class UserApi {
private final UserApiService delegate = UserApiServiceFactory.getUserApi(); private final UserApiService delegate = UserApiServiceFactory.getUserApi();
@POST @POST
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", }) @io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
public Response createUser(@ApiParam(value = "Created user object" ,required=true) User body public Response createUser(@ApiParam(value = "Created user object" ,required=true) User body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.createUser(body,securityContext); return delegate.createUser(body,securityContext);
} }
@POST @POST
@Path("/createWithArray") @Path("/createWithArray")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", }) @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) List<User> body public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) List<User> body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.createUsersWithArrayInput(body,securityContext); return delegate.createUsersWithArrayInput(body,securityContext);
} }
@POST @POST
@Path("/createWithList") @Path("/createWithList")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", }) @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) List<User> body public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) List<User> body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.createUsersWithListInput(body,securityContext); return delegate.createUsersWithListInput(body,securityContext);
} }
@DELETE @DELETE
@Path("/{username}") @Path("/{username}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", }) @io.swagger.annotations.ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = void.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = void.class) })
public Response deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username public Response deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.deleteUser(username,securityContext); return delegate.deleteUser(username,securityContext);
} }
@GET @GET
@Path("/{username}") @Path("/{username}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", }) @io.swagger.annotations.ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = User.class), @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = User.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = User.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = User.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 = User.class) })
public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathParam("username") String username public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathParam("username") String username
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.getUserByName(username,securityContext); return delegate.getUserByName(username,securityContext);
} }
@GET @GET
@Path("/login") @Path("/login")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", }) @io.swagger.annotations.ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = String.class) }) @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = String.class) })
public Response loginUser(@ApiParam(value = "The user name for login",required=true) @QueryParam("username") String username public Response loginUser(@ApiParam(value = "The user name for login",required=true) @QueryParam("username") String username
,@ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password ,@ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.loginUser(username,password,securityContext); return delegate.loginUser(username,password,securityContext);
} }
@GET @GET
@Path("/logout") @Path("/logout")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Logs out current logged in user session", notes = "", response = void.class, tags={ "user", }) @io.swagger.annotations.ApiOperation(value = "Logs out current logged in user session", notes = "", response = void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
public Response logoutUser(@Context SecurityContext securityContext) public Response logoutUser(@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.logoutUser(securityContext); return delegate.logoutUser(securityContext);
} }
@PUT @PUT
@Path("/{username}") @Path("/{username}")
@Produces({ "application/xml", "application/json" }) @Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", }) @io.swagger.annotations.ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = void.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = void.class) }) @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = void.class) })
public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username
,@ApiParam(value = "Updated user object" ,required=true) User body ,@ApiParam(value = "Updated user object" ,required=true) User body
,@Context SecurityContext securityContext) ,@Context SecurityContext securityContext)
throws NotFoundException { throws NotFoundException {
return delegate.updateUser(username,body,securityContext); return delegate.updateUser(username,body,securityContext);
} }
} }

View File

@ -4,8 +4,8 @@ import io.swagger.api.*;
import io.swagger.model.*; import io.swagger.model.*;
import io.swagger.model.Client; import io.swagger.model.Client;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;

View File

@ -4,8 +4,8 @@ import io.swagger.api.*;
import io.swagger.model.*; import io.swagger.model.*;
import io.swagger.model.Pet; import io.swagger.model.Pet;
import io.swagger.model.ModelApiResponse;
import java.io.File; import java.io.File;
import io.swagger.model.ModelApiResponse;
import java.util.List; import java.util.List;
import io.swagger.api.NotFoundException; import io.swagger.api.NotFoundException;

View File

@ -62,7 +62,7 @@ public interface FakeApi {
, ,
@ApiParam(value = "None", required=true ) @RequestPart(value="string", required=true) String string @ApiParam(value = "None", required=true ) @RequestPart(value="patternWithoutDelimiter", required=true) String patternWithoutDelimiter
, ,
@ -86,6 +86,10 @@ public interface FakeApi {
, ,
@ApiParam(value = "None" ) @RequestPart(value="string", required=false) String string
,
@ApiParam(value = "None" ) @RequestPart(value="binary", required=false) byte[] binary @ApiParam(value = "None" ) @RequestPart(value="binary", required=false) byte[] binary
, ,
@ -116,13 +120,13 @@ public interface FakeApi {
default CompletableFuture<ResponseEntity<Void>> testEnumParameters( default CompletableFuture<ResponseEntity<Void>> testEnumParameters(
@ApiParam(value = "Form parameter enum test (string array)" ) @RequestPart(value="enumFormStringArray", required=false) List<String> enumFormStringArray @ApiParam(value = "Form parameter enum test (string array)" , allowableValues="GREATER_THAN, DOLLAR") @RequestPart(value="enumFormStringArray", required=false) List<String> enumFormStringArray
, ,
@ApiParam(value = "Form parameter enum test (string)" , allowableValues="_ABC, _EFG, _XYZ_", defaultValue="-efg") @RequestPart(value="enumFormString", required=false) String enumFormString @ApiParam(value = "Form parameter enum test (string)" , allowableValues="_ABC, _EFG, _XYZ_", defaultValue="-efg") @RequestPart(value="enumFormString", required=false) String enumFormString
, ,
@ApiParam(value = "Header parameter enum test (string array)" ) @RequestHeader(value="enum_header_string_array", required=false) List<String> enumHeaderStringArray @ApiParam(value = "Header parameter enum test (string array)" , allowableValues="GREATER_THAN, DOLLAR") @RequestHeader(value="enum_header_string_array", required=false) List<String> enumHeaderStringArray
, ,

View File

@ -22,7 +22,7 @@ public class Model200Response {
private Integer name = null; private Integer name = null;
@JsonProperty("class") @JsonProperty("class")
private String PropertyClass = null; private String propertyClass = null;
public Model200Response name(Integer name) { public Model200Response name(Integer name) {
this.name = name; this.name = name;
@ -42,22 +42,22 @@ public class Model200Response {
this.name = name; this.name = name;
} }
public Model200Response PropertyClass(String PropertyClass) { public Model200Response propertyClass(String propertyClass) {
this.PropertyClass = PropertyClass; this.propertyClass = propertyClass;
return this; return this;
} }
/** /**
* Get PropertyClass * Get propertyClass
* @return PropertyClass * @return propertyClass
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getPropertyClass() { public String getPropertyClass() {
return PropertyClass; return propertyClass;
} }
public void setPropertyClass(String PropertyClass) { public void setPropertyClass(String propertyClass) {
this.PropertyClass = PropertyClass; this.propertyClass = propertyClass;
} }
@ -71,12 +71,12 @@ public class Model200Response {
} }
Model200Response _200Response = (Model200Response) o; Model200Response _200Response = (Model200Response) o;
return Objects.equals(this.name, _200Response.name) && return Objects.equals(this.name, _200Response.name) &&
Objects.equals(this.PropertyClass, _200Response.PropertyClass); Objects.equals(this.propertyClass, _200Response.propertyClass);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(name, PropertyClass); return Objects.hash(name, propertyClass);
} }
@Override @Override
@ -85,7 +85,7 @@ public class Model200Response {
sb.append("class Model200Response {\n"); sb.append("class Model200Response {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" PropertyClass: ").append(toIndentedString(PropertyClass)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();
} }

View File

@ -1,2 +1,2 @@
springfox.documentation.swagger.v2.path=/api-docs springfox.documentation.swagger.v2.path=/api-docs
#server.port=8090 #server.port=8090

View File

@ -57,7 +57,7 @@ public interface FakeApi {
, ,
@ApiParam(value = "None", required=true ) @RequestPart(value="string", required=true) String string @ApiParam(value = "None", required=true ) @RequestPart(value="patternWithoutDelimiter", required=true) String patternWithoutDelimiter
, ,
@ -81,6 +81,10 @@ public interface FakeApi {
, ,
@ApiParam(value = "None" ) @RequestPart(value="string", required=false) String string
,
@ApiParam(value = "None" ) @RequestPart(value="binary", required=false) byte[] binary @ApiParam(value = "None" ) @RequestPart(value="binary", required=false) byte[] binary
, ,
@ -108,13 +112,13 @@ public interface FakeApi {
ResponseEntity<Void> testEnumParameters( ResponseEntity<Void> testEnumParameters(
@ApiParam(value = "Form parameter enum test (string array)" ) @RequestPart(value="enumFormStringArray", required=false) List<String> enumFormStringArray @ApiParam(value = "Form parameter enum test (string array)" , allowableValues="GREATER_THAN, DOLLAR") @RequestPart(value="enumFormStringArray", required=false) List<String> enumFormStringArray
, ,
@ApiParam(value = "Form parameter enum test (string)" , allowableValues="_ABC, _EFG, _XYZ_", defaultValue="-efg") @RequestPart(value="enumFormString", required=false) String enumFormString @ApiParam(value = "Form parameter enum test (string)" , allowableValues="_ABC, _EFG, _XYZ_", defaultValue="-efg") @RequestPart(value="enumFormString", required=false) String enumFormString
, ,
@ApiParam(value = "Header parameter enum test (string array)" ) @RequestHeader(value="enum_header_string_array", required=false) List<String> enumHeaderStringArray @ApiParam(value = "Header parameter enum test (string array)" , allowableValues="GREATER_THAN, DOLLAR") @RequestHeader(value="enum_header_string_array", required=false) List<String> enumHeaderStringArray
, ,

View File

@ -46,7 +46,7 @@ public class FakeApiController implements FakeApi {
@ApiParam(value = "None", required=true ) @RequestPart(value="string", required=true) String string @ApiParam(value = "None", required=true ) @RequestPart(value="patternWithoutDelimiter", required=true) String patternWithoutDelimiter
, ,
@ -76,6 +76,11 @@ public class FakeApiController implements FakeApi {
@ApiParam(value = "None" ) @RequestPart(value="string", required=false) String string
,
@ApiParam(value = "None" ) @RequestPart(value="binary", required=false) byte[] binary @ApiParam(value = "None" ) @RequestPart(value="binary", required=false) byte[] binary
, ,
@ -100,7 +105,7 @@ public class FakeApiController implements FakeApi {
public ResponseEntity<Void> testEnumParameters( public ResponseEntity<Void> testEnumParameters(
@ApiParam(value = "Form parameter enum test (string array)" ) @RequestPart(value="enumFormStringArray", required=false) List<String> enumFormStringArray @ApiParam(value = "Form parameter enum test (string array)" , allowableValues="GREATER_THAN, DOLLAR") @RequestPart(value="enumFormStringArray", required=false) List<String> enumFormStringArray
, ,
@ -108,7 +113,7 @@ public class FakeApiController implements FakeApi {
@ApiParam(value = "Form parameter enum test (string)" , allowableValues="_ABC, _EFG, _XYZ_", defaultValue="-efg") @RequestPart(value="enumFormString", required=false) String enumFormString @ApiParam(value = "Form parameter enum test (string)" , allowableValues="_ABC, _EFG, _XYZ_", defaultValue="-efg") @RequestPart(value="enumFormString", required=false) String enumFormString
, ,
@ApiParam(value = "Header parameter enum test (string array)" ) @RequestHeader(value="enum_header_string_array", required=false) List<String> enumHeaderStringArray @ApiParam(value = "Header parameter enum test (string array)" , allowableValues="GREATER_THAN, DOLLAR") @RequestHeader(value="enum_header_string_array", required=false) List<String> enumHeaderStringArray
, ,

View File

@ -22,7 +22,7 @@ public class Model200Response {
private Integer name = null; private Integer name = null;
@JsonProperty("class") @JsonProperty("class")
private String PropertyClass = null; private String propertyClass = null;
public Model200Response name(Integer name) { public Model200Response name(Integer name) {
this.name = name; this.name = name;
@ -42,22 +42,22 @@ public class Model200Response {
this.name = name; this.name = name;
} }
public Model200Response PropertyClass(String PropertyClass) { public Model200Response propertyClass(String propertyClass) {
this.PropertyClass = PropertyClass; this.propertyClass = propertyClass;
return this; return this;
} }
/** /**
* Get PropertyClass * Get propertyClass
* @return PropertyClass * @return propertyClass
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getPropertyClass() { public String getPropertyClass() {
return PropertyClass; return propertyClass;
} }
public void setPropertyClass(String PropertyClass) { public void setPropertyClass(String propertyClass) {
this.PropertyClass = PropertyClass; this.propertyClass = propertyClass;
} }
@ -71,12 +71,12 @@ public class Model200Response {
} }
Model200Response _200Response = (Model200Response) o; Model200Response _200Response = (Model200Response) o;
return Objects.equals(this.name, _200Response.name) && return Objects.equals(this.name, _200Response.name) &&
Objects.equals(this.PropertyClass, _200Response.PropertyClass); Objects.equals(this.propertyClass, _200Response.propertyClass);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(name, PropertyClass); return Objects.hash(name, propertyClass);
} }
@Override @Override
@ -85,7 +85,7 @@ public class Model200Response {
sb.append("class Model200Response {\n"); sb.append("class Model200Response {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" PropertyClass: ").append(toIndentedString(PropertyClass)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();
} }

View File

@ -1,2 +1,2 @@
springfox.documentation.swagger.v2.path=/api-docs springfox.documentation.swagger.v2.path=/api-docs
#server.port=8090 #server.port=8090

View File

@ -1,36 +1,36 @@
package io.swagger; package io.swagger;
import org.springframework.boot.CommandLineRunner; import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.ExitCodeGenerator; import org.springframework.boot.ExitCodeGenerator;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import springfox.documentation.swagger2.annotations.EnableSwagger2; import springfox.documentation.swagger2.annotations.EnableSwagger2;
@SpringBootApplication @SpringBootApplication
@EnableSwagger2 @EnableSwagger2
@ComponentScan(basePackages = "io.swagger") @ComponentScan(basePackages = "io.swagger")
public class Swagger2SpringBoot implements CommandLineRunner { public class Swagger2SpringBoot implements CommandLineRunner {
@Override @Override
public void run(String... arg0) throws Exception { public void run(String... arg0) throws Exception {
if (arg0.length > 0 && arg0[0].equals("exitcode")) { if (arg0.length > 0 && arg0[0].equals("exitcode")) {
throw new ExitException(); throw new ExitException();
} }
} }
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
new SpringApplication(Swagger2SpringBoot.class).run(args); new SpringApplication(Swagger2SpringBoot.class).run(args);
} }
class ExitException extends RuntimeException implements ExitCodeGenerator { class ExitException extends RuntimeException implements ExitCodeGenerator {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Override @Override
public int getExitCode() { public int getExitCode() {
return 10; return 10;
} }
} }
} }

View File

@ -57,7 +57,7 @@ public interface FakeApi {
, ,
@ApiParam(value = "None", required=true ) @RequestPart(value="string", required=true) String string @ApiParam(value = "None", required=true ) @RequestPart(value="patternWithoutDelimiter", required=true) String patternWithoutDelimiter
, ,
@ -81,6 +81,10 @@ public interface FakeApi {
, ,
@ApiParam(value = "None" ) @RequestPart(value="string", required=false) String string
,
@ApiParam(value = "None" ) @RequestPart(value="binary", required=false) byte[] binary @ApiParam(value = "None" ) @RequestPart(value="binary", required=false) byte[] binary
, ,
@ -108,13 +112,13 @@ public interface FakeApi {
ResponseEntity<Void> testEnumParameters( ResponseEntity<Void> testEnumParameters(
@ApiParam(value = "Form parameter enum test (string array)" ) @RequestPart(value="enumFormStringArray", required=false) List<String> enumFormStringArray @ApiParam(value = "Form parameter enum test (string array)" , allowableValues="GREATER_THAN, DOLLAR") @RequestPart(value="enumFormStringArray", required=false) List<String> enumFormStringArray
, ,
@ApiParam(value = "Form parameter enum test (string)" , allowableValues="_ABC, _EFG, _XYZ_", defaultValue="-efg") @RequestPart(value="enumFormString", required=false) String enumFormString @ApiParam(value = "Form parameter enum test (string)" , allowableValues="_ABC, _EFG, _XYZ_", defaultValue="-efg") @RequestPart(value="enumFormString", required=false) String enumFormString
, ,
@ApiParam(value = "Header parameter enum test (string array)" ) @RequestHeader(value="enum_header_string_array", required=false) List<String> enumHeaderStringArray @ApiParam(value = "Header parameter enum test (string array)" , allowableValues="GREATER_THAN, DOLLAR") @RequestHeader(value="enum_header_string_array", required=false) List<String> enumHeaderStringArray
, ,

View File

@ -46,7 +46,7 @@ public class FakeApiController implements FakeApi {
@ApiParam(value = "None", required=true ) @RequestPart(value="string", required=true) String string @ApiParam(value = "None", required=true ) @RequestPart(value="patternWithoutDelimiter", required=true) String patternWithoutDelimiter
, ,
@ -76,6 +76,11 @@ public class FakeApiController implements FakeApi {
@ApiParam(value = "None" ) @RequestPart(value="string", required=false) String string
,
@ApiParam(value = "None" ) @RequestPart(value="binary", required=false) byte[] binary @ApiParam(value = "None" ) @RequestPart(value="binary", required=false) byte[] binary
, ,
@ -100,7 +105,7 @@ public class FakeApiController implements FakeApi {
public ResponseEntity<Void> testEnumParameters( public ResponseEntity<Void> testEnumParameters(
@ApiParam(value = "Form parameter enum test (string array)" ) @RequestPart(value="enumFormStringArray", required=false) List<String> enumFormStringArray @ApiParam(value = "Form parameter enum test (string array)" , allowableValues="GREATER_THAN, DOLLAR") @RequestPart(value="enumFormStringArray", required=false) List<String> enumFormStringArray
, ,
@ -108,7 +113,7 @@ public class FakeApiController implements FakeApi {
@ApiParam(value = "Form parameter enum test (string)" , allowableValues="_ABC, _EFG, _XYZ_", defaultValue="-efg") @RequestPart(value="enumFormString", required=false) String enumFormString @ApiParam(value = "Form parameter enum test (string)" , allowableValues="_ABC, _EFG, _XYZ_", defaultValue="-efg") @RequestPart(value="enumFormString", required=false) String enumFormString
, ,
@ApiParam(value = "Header parameter enum test (string array)" ) @RequestHeader(value="enum_header_string_array", required=false) List<String> enumHeaderStringArray @ApiParam(value = "Header parameter enum test (string array)" , allowableValues="GREATER_THAN, DOLLAR") @RequestHeader(value="enum_header_string_array", required=false) List<String> enumHeaderStringArray
, ,

View File

@ -1,16 +1,16 @@
package io.swagger.configuration; package io.swagger.configuration;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
/** /**
* Home redirection to swagger api documentation * Home redirection to swagger api documentation
*/ */
@Controller @Controller
public class HomeController { public class HomeController {
@RequestMapping(value = "/") @RequestMapping(value = "/")
public String index() { public String index() {
System.out.println("swagger-ui.html"); System.out.println("swagger-ui.html");
return "redirect:swagger-ui.html"; return "redirect:swagger-ui.html";
} }
} }

View File

@ -22,7 +22,7 @@ public class Model200Response {
private Integer name = null; private Integer name = null;
@JsonProperty("class") @JsonProperty("class")
private String PropertyClass = null; private String propertyClass = null;
public Model200Response name(Integer name) { public Model200Response name(Integer name) {
this.name = name; this.name = name;
@ -42,22 +42,22 @@ public class Model200Response {
this.name = name; this.name = name;
} }
public Model200Response PropertyClass(String PropertyClass) { public Model200Response propertyClass(String propertyClass) {
this.PropertyClass = PropertyClass; this.propertyClass = propertyClass;
return this; return this;
} }
/** /**
* Get PropertyClass * Get propertyClass
* @return PropertyClass * @return propertyClass
**/ **/
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
public String getPropertyClass() { public String getPropertyClass() {
return PropertyClass; return propertyClass;
} }
public void setPropertyClass(String PropertyClass) { public void setPropertyClass(String propertyClass) {
this.PropertyClass = PropertyClass; this.propertyClass = propertyClass;
} }
@ -71,12 +71,12 @@ public class Model200Response {
} }
Model200Response _200Response = (Model200Response) o; Model200Response _200Response = (Model200Response) o;
return Objects.equals(this.name, _200Response.name) && return Objects.equals(this.name, _200Response.name) &&
Objects.equals(this.PropertyClass, _200Response.PropertyClass); Objects.equals(this.propertyClass, _200Response.propertyClass);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(name, PropertyClass); return Objects.hash(name, propertyClass);
} }
@Override @Override
@ -85,7 +85,7 @@ public class Model200Response {
sb.append("class Model200Response {\n"); sb.append("class Model200Response {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" PropertyClass: ").append(toIndentedString(PropertyClass)).append("\n"); sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();
} }

View File

@ -1,114 +1,114 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent> <parent>
<artifactId>oss-parent</artifactId> <artifactId>oss-parent</artifactId>
<groupId>org.sonatype.oss</groupId> <groupId>org.sonatype.oss</groupId>
<version>5</version> <version>5</version>
<relativePath>../pom.xml/pom.xml</relativePath> <relativePath>../pom.xml/pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>io.swagger</groupId> <groupId>io.swagger</groupId>
<artifactId>swagger-undertow-server</artifactId> <artifactId>swagger-undertow-server</artifactId>
<name>swagger-undertow-server</name> <name>swagger-undertow-server</name>
<version>1.0.0</version> <version>1.0.0</version>
<prerequisites> <prerequisites>
<maven>2.2.0</maven> <maven>2.2.0</maven>
</prerequisites> </prerequisites>
<build> <build>
<defaultGoal>install</defaultGoal> <defaultGoal>install</defaultGoal>
<directory>target</directory> <directory>target</directory>
<finalName>${project.artifactId}-${project.version}</finalName> <finalName>${project.artifactId}-${project.version}</finalName>
<plugins> <plugins>
<plugin> <plugin>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version> <version>2.4.3</version>
<executions> <executions>
<execution> <execution>
<phase>package</phase> <phase>package</phase>
<goals> <goals>
<goal>shade</goal> <goal>shade</goal>
</goals> </goals>
<configuration> <configuration>
<transformers> <transformers>
<transformer /> <transformer />
</transformers> </transformers>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
<version>2.6</version> <version>2.6</version>
<configuration> <configuration>
<archive> <archive>
<manifest> <manifest>
<mainClass>com.networknt.server.Server</mainClass> <mainClass>com.networknt.server.Server</mainClass>
</manifest> </manifest>
</archive> </archive>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId> <artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version> <version>1.4.0</version>
<configuration> <configuration>
<executable>java</executable> <executable>java</executable>
<arguments> <arguments>
<argument>-jar</argument> <argument>-jar</argument>
<argument>target/${project.build.finalName}.jar</argument> <argument>target/${project.build.finalName}.jar</argument>
</arguments> </arguments>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<repositories> <repositories>
<repository> <repository>
<snapshots /> <snapshots />
<id>sonatype-snapshots</id> <id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url> <url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository> </repository>
</repositories> </repositories>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.12</version> <version>4.12</version>
<scope>test</scope> <scope>test</scope>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>hamcrest-core</artifactId> <artifactId>hamcrest-core</artifactId>
<groupId>org.hamcrest</groupId> <groupId>org.hamcrest</groupId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.httpcomponents</groupId> <groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId> <artifactId>httpclient</artifactId>
<version>4.5.2</version> <version>4.5.2</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<properties> <properties>
<version.httpasyncclient>4.1.2</version.httpasyncclient> <version.httpasyncclient>4.1.2</version.httpasyncclient>
<version.commons.codec>1.10</version.commons.codec> <version.commons.codec>1.10</version.commons.codec>
<version.metrics>3.1.2</version.metrics> <version.metrics>3.1.2</version.metrics>
<version.jsonpath>2.2.0</version.jsonpath> <version.jsonpath>2.2.0</version.jsonpath>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.encoder>1.2</version.encoder> <version.encoder>1.2</version.encoder>
<version.httpclient>4.5.2</version.httpclient> <version.httpclient>4.5.2</version.httpclient>
<version.undertow>1.4.0.Final</version.undertow> <version.undertow>1.4.0.Final</version.undertow>
<version.jose4j>0.5.2</version.jose4j> <version.jose4j>0.5.2</version.jose4j>
<version.commons-lang>2.6</version.commons-lang> <version.commons-lang>2.6</version.commons-lang>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<version.jackson>2.8.2</version.jackson> <version.jackson>2.8.2</version.jackson>
<version.framework>0.1.1</version.framework> <version.framework>0.1.1</version.framework>
<version.swagger>1.5.10</version.swagger> <version.swagger>1.5.10</version.swagger>
<version.mockito>2.1.0-beta.124</version.mockito> <version.mockito>2.1.0-beta.124</version.mockito>
<version.slf4j>1.7.21</version.slf4j> <version.slf4j>1.7.21</version.slf4j>
<version.commons.io>2.5</version.commons.io> <version.commons.io>2.5</version.commons.io>
<version.logback>1.1.7</version.logback> <version.logback>1.1.7</version.logback>
<version.junit>4.12</version.junit> <version.junit>4.12</version.junit>
<version.antlr4>4.5.3</version.antlr4> <version.antlr4>4.5.3</version.antlr4>
</properties> </properties>
</project> </project>

View File

@ -8,9 +8,12 @@ import io.swagger.annotations.ApiModelProperty;
/**
* A category for a pet
**/
@ApiModel(description = "A category for a pet")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.UndertowCodegen", date = "2016-09-19T05:56:00.864-04:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.UndertowCodegen", date = "2016-09-26T16:15:27.984+08:00")
public class Category { public class Category {
private Long id = null; private Long id = null;

View File

@ -8,9 +8,12 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Describes the result of uploading an image resource
**/
@ApiModel(description = "Describes the result of uploading an image resource")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.UndertowCodegen", date = "2016-09-19T05:56:00.864-04:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.UndertowCodegen", date = "2016-09-26T16:15:27.984+08:00")
public class ModelApiResponse { public class ModelApiResponse {
private Integer code = null; private Integer code = null;

View File

@ -10,9 +10,12 @@ import java.util.Date;
/**
* An order for a pets from the pet store
**/
@ApiModel(description = "An order for a pets from the pet store")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.UndertowCodegen", date = "2016-09-19T05:56:00.864-04:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.UndertowCodegen", date = "2016-09-26T16:15:27.984+08:00")
public class Order { public class Order {
private Long id = null; private Long id = null;

View File

@ -13,9 +13,12 @@ import java.util.List;
/**
* A pet for sale in the pet store
**/
@ApiModel(description = "A pet for sale in the pet store")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.UndertowCodegen", date = "2016-09-19T05:56:00.864-04:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.UndertowCodegen", date = "2016-09-26T16:15:27.984+08:00")
public class Pet { public class Pet {
private Long id = null; private Long id = null;

View File

@ -8,9 +8,12 @@ import io.swagger.annotations.ApiModelProperty;
/**
* A tag for a pet
**/
@ApiModel(description = "A tag for a pet")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.UndertowCodegen", date = "2016-09-19T05:56:00.864-04:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.UndertowCodegen", date = "2016-09-26T16:15:27.984+08:00")
public class Tag { public class Tag {
private Long id = null; private Long id = null;

View File

@ -8,9 +8,12 @@ import io.swagger.annotations.ApiModelProperty;
/**
* A User who is purchasing from the pet store
**/
@ApiModel(description = "A User who is purchasing from the pet store")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.UndertowCodegen", date = "2016-09-19T05:56:00.864-04:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.UndertowCodegen", date = "2016-09-26T16:15:27.984+08:00")
public class User { public class User {
private Long id = null; private Long id = null;

View File

@ -1,19 +1,19 @@
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIDmzCCAoOgAwIBAgIEHnAgtDANBgkqhkiG9w0BAQsFADB+MQswCQYDVQQGEwJDQTEQMA4GA1UE MIIDmzCCAoOgAwIBAgIEHnAgtDANBgkqhkiG9w0BAQsFADB+MQswCQYDVQQGEwJDQTEQMA4GA1UE
CBMHT250YXJpbzEUMBIGA1UEBxMLTWlzc2lzc2F1Z2ExJjAkBgNVBAoTHU5ldHdvcmsgTmV3IFRl CBMHT250YXJpbzEUMBIGA1UEBxMLTWlzc2lzc2F1Z2ExJjAkBgNVBAoTHU5ldHdvcmsgTmV3IFRl
Y2hub2xvZ2llcyBJbmMuMQwwCgYDVQQLEwNERVYxETAPBgNVBAMTCFN0ZXZlIEh1MB4XDTE2MDkw Y2hub2xvZ2llcyBJbmMuMQwwCgYDVQQLEwNERVYxETAPBgNVBAMTCFN0ZXZlIEh1MB4XDTE2MDkw
MTE2MTYxNVoXDTI2MDcxMTE2MTYxNVowfjELMAkGA1UEBhMCQ0ExEDAOBgNVBAgTB09udGFyaW8x MTE2MTYxNVoXDTI2MDcxMTE2MTYxNVowfjELMAkGA1UEBhMCQ0ExEDAOBgNVBAgTB09udGFyaW8x
FDASBgNVBAcTC01pc3Npc3NhdWdhMSYwJAYDVQQKEx1OZXR3b3JrIE5ldyBUZWNobm9sb2dpZXMg FDASBgNVBAcTC01pc3Npc3NhdWdhMSYwJAYDVQQKEx1OZXR3b3JrIE5ldyBUZWNobm9sb2dpZXMg
SW5jLjEMMAoGA1UECxMDREVWMREwDwYDVQQDEwhTdGV2ZSBIdTCCASIwDQYJKoZIhvcNAQEBBQAD SW5jLjEMMAoGA1UECxMDREVWMREwDwYDVQQDEwhTdGV2ZSBIdTCCASIwDQYJKoZIhvcNAQEBBQAD
ggEPADCCAQoCggEBALrlxMtDb60DogElf4TBz504tRheZimAE0dJL/Yby4nacJdqvc5l4z+WWpDf ggEPADCCAQoCggEBALrlxMtDb60DogElf4TBz504tRheZimAE0dJL/Yby4nacJdqvc5l4z+WWpDf
rI9krQ2Yi9yvhwAP+PrR6gWcIqWP4cpNE7XIAUDgr4CtyI7CptT/lpjtbkz4DGCMmaeDn0jqHqJt rI9krQ2Yi9yvhwAP+PrR6gWcIqWP4cpNE7XIAUDgr4CtyI7CptT/lpjtbkz4DGCMmaeDn0jqHqJt
SeSZGfwVu5zAGm8n4sHatjnnxBI/iWzkTII3V4xv0WeK37szNTEd+ly2ag7n2IV5zNnYmqZTeMQm SeSZGfwVu5zAGm8n4sHatjnnxBI/iWzkTII3V4xv0WeK37szNTEd+ly2ag7n2IV5zNnYmqZTeMQm
J2ENS+IwAG3ENtiVtrVTx/2bGtqutJjtdxsN58/cUG/guRyMT6OPI8Yi3ZzevdvRbxadyhEl/Kaw J2ENS+IwAG3ENtiVtrVTx/2bGtqutJjtdxsN58/cUG/guRyMT6OPI8Yi3ZzevdvRbxadyhEl/Kaw
6vJcdxmJI3tp4lx+p6sAxOWa7aapJe4JxutAQqzv0GKdVjoHKQ1wB60CAwEAAaMhMB8wHQYDVR0O 6vJcdxmJI3tp4lx+p6sAxOWa7aapJe4JxutAQqzv0GKdVjoHKQ1wB60CAwEAAaMhMB8wHQYDVR0O
BBYEFIPF9SBd06RWU1eDL73CKfy01lavMA0GCSqGSIb3DQEBCwUAA4IBAQAoaKZGOak3Upz/ordF BBYEFIPF9SBd06RWU1eDL73CKfy01lavMA0GCSqGSIb3DQEBCwUAA4IBAQAoaKZGOak3Upz/ordF
slZoJuZlCu7jnKQEjYwHf3DNxcd1WmgFPtMcna6pW0VUxPIfidEA6VCMsGoK1RvshB0SjrRdCht6 slZoJuZlCu7jnKQEjYwHf3DNxcd1WmgFPtMcna6pW0VUxPIfidEA6VCMsGoK1RvshB0SjrRdCht6
5qPXs9kV3NW0WvMiwDSYZZ9HgaZ9efTe5E9Fzc7ltKrE43L6k8NJcaEEWEdpdjFbrAqH4I+j/Vro 5qPXs9kV3NW0WvMiwDSYZZ9HgaZ9efTe5E9Fzc7ltKrE43L6k8NJcaEEWEdpdjFbrAqH4I+j/Vro
K3OhIo062fXjas5ipL4gF+3ECImjWzirQP8UiAfM0/36x7rtAu3btH/qI9hSyx39LBPPE5AsDJZ4 K3OhIo062fXjas5ipL4gF+3ECImjWzirQP8UiAfM0/36x7rtAu3btH/qI9hSyx39LBPPE5AsDJZ4
dSMwNTW1gqmBAZIj+zQ/RD5dyWfPwON7Q+t96YbK6WBuYo0xy+I+PjcUgrWYWP3N24hlq8ZBIei+ dSMwNTW1gqmBAZIj+zQ/RD5dyWfPwON7Q+t96YbK6WBuYo0xy+I+PjcUgrWYWP3N24hlq8ZBIei+
BudoEVJlIlmS0aRCuP8n BudoEVJlIlmS0aRCuP8n
-----END CERTIFICATE----- -----END CERTIFICATE-----

View File

@ -60,8 +60,8 @@
"security" : [ { "security" : [ {
"petstore_auth" : [ "write:pets", "read:pets" ] "petstore_auth" : [ "write:pets", "read:pets" ]
} ], } ],
"x-accepts" : "application/json", "x-contentType" : "application/json",
"x-contentType" : "application/json" "x-accepts" : "application/json"
}, },
"put" : { "put" : {
"tags" : [ "pet" ], "tags" : [ "pet" ],
@ -93,8 +93,8 @@
"security" : [ { "security" : [ {
"petstore_auth" : [ "write:pets", "read:pets" ] "petstore_auth" : [ "write:pets", "read:pets" ]
} ], } ],
"x-accepts" : "application/json", "x-contentType" : "application/json",
"x-contentType" : "application/json" "x-accepts" : "application/json"
} }
}, },
"/pet/findByStatus" : { "/pet/findByStatus" : {
@ -112,10 +112,10 @@
"type" : "array", "type" : "array",
"items" : { "items" : {
"type" : "string", "type" : "string",
"enum" : [ "available", "pending", "sold" ], "default" : "available",
"default" : "available" "enum" : [ "available", "pending", "sold" ]
}, },
"collectionFormat" : "multi" "collectionFormat" : "csv"
} ], } ],
"responses" : { "responses" : {
"200" : { "200" : {
@ -134,15 +134,15 @@
"security" : [ { "security" : [ {
"petstore_auth" : [ "write:pets", "read:pets" ] "petstore_auth" : [ "write:pets", "read:pets" ]
} ], } ],
"x-accepts" : "application/json", "x-contentType" : "application/json",
"x-contentType" : "application/json" "x-accepts" : "application/json"
} }
}, },
"/pet/findByTags" : { "/pet/findByTags" : {
"get" : { "get" : {
"tags" : [ "pet" ], "tags" : [ "pet" ],
"summary" : "Finds Pets by tags", "summary" : "Finds Pets by tags",
"description" : "Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
"operationId" : "findPetsByTags", "operationId" : "findPetsByTags",
"produces" : [ "application/xml", "application/json" ], "produces" : [ "application/xml", "application/json" ],
"parameters" : [ { "parameters" : [ {
@ -154,7 +154,7 @@
"items" : { "items" : {
"type" : "string" "type" : "string"
}, },
"collectionFormat" : "multi" "collectionFormat" : "csv"
} ], } ],
"responses" : { "responses" : {
"200" : { "200" : {
@ -173,9 +173,8 @@
"security" : [ { "security" : [ {
"petstore_auth" : [ "write:pets", "read:pets" ] "petstore_auth" : [ "write:pets", "read:pets" ]
} ], } ],
"deprecated" : true, "x-contentType" : "application/json",
"x-accepts" : "application/json", "x-accepts" : "application/json"
"x-contentType" : "application/json"
} }
}, },
"/pet/{petId}" : { "/pet/{petId}" : {
@ -210,8 +209,8 @@
"security" : [ { "security" : [ {
"api_key" : [ ] "api_key" : [ ]
} ], } ],
"x-accepts" : "application/json", "x-contentType" : "application/json",
"x-contentType" : "application/json" "x-accepts" : "application/json"
}, },
"post" : { "post" : {
"tags" : [ "pet" ], "tags" : [ "pet" ],
@ -248,8 +247,8 @@
"security" : [ { "security" : [ {
"petstore_auth" : [ "write:pets", "read:pets" ] "petstore_auth" : [ "write:pets", "read:pets" ]
} ], } ],
"x-accepts" : "application/json", "x-contentType" : "application/x-www-form-urlencoded",
"x-contentType" : "application/x-www-form-urlencoded" "x-accepts" : "application/json"
}, },
"delete" : { "delete" : {
"tags" : [ "pet" ], "tags" : [ "pet" ],
@ -272,17 +271,14 @@
} ], } ],
"responses" : { "responses" : {
"400" : { "400" : {
"description" : "Invalid ID supplied" "description" : "Invalid pet value"
},
"404" : {
"description" : "Pet not found"
} }
}, },
"security" : [ { "security" : [ {
"petstore_auth" : [ "write:pets", "read:pets" ] "petstore_auth" : [ "write:pets", "read:pets" ]
} ], } ],
"x-accepts" : "application/json", "x-contentType" : "application/json",
"x-contentType" : "application/json" "x-accepts" : "application/json"
} }
}, },
"/pet/{petId}/uploadImage" : { "/pet/{petId}/uploadImage" : {
@ -324,8 +320,8 @@
"security" : [ { "security" : [ {
"petstore_auth" : [ "write:pets", "read:pets" ] "petstore_auth" : [ "write:pets", "read:pets" ]
} ], } ],
"x-accepts" : "application/json", "x-contentType" : "multipart/form-data",
"x-contentType" : "multipart/form-data" "x-accepts" : "application/json"
} }
}, },
"/store/inventory" : { "/store/inventory" : {
@ -351,8 +347,8 @@
"security" : [ { "security" : [ {
"api_key" : [ ] "api_key" : [ ]
} ], } ],
"x-accepts" : "application/json", "x-contentType" : "application/json",
"x-contentType" : "application/json" "x-accepts" : "application/json"
} }
}, },
"/store/order" : { "/store/order" : {
@ -382,15 +378,15 @@
"description" : "Invalid Order" "description" : "Invalid Order"
} }
}, },
"x-accepts" : "application/json", "x-contentType" : "application/json",
"x-contentType" : "application/json" "x-accepts" : "application/json"
} }
}, },
"/store/order/{orderId}" : { "/store/order/{orderId}" : {
"get" : { "get" : {
"tags" : [ "store" ], "tags" : [ "store" ],
"summary" : "Find purchase order by ID", "summary" : "Find purchase order by ID",
"description" : "For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions", "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions",
"operationId" : "getOrderById", "operationId" : "getOrderById",
"produces" : [ "application/xml", "application/json" ], "produces" : [ "application/xml", "application/json" ],
"parameters" : [ { "parameters" : [ {
@ -399,7 +395,7 @@
"description" : "ID of pet that needs to be fetched", "description" : "ID of pet that needs to be fetched",
"required" : true, "required" : true,
"type" : "integer", "type" : "integer",
"maximum" : 10.0, "maximum" : 5.0,
"minimum" : 1.0, "minimum" : 1.0,
"format" : "int64" "format" : "int64"
} ], } ],
@ -417,13 +413,13 @@
"description" : "Order not found" "description" : "Order not found"
} }
}, },
"x-accepts" : "application/json", "x-contentType" : "application/json",
"x-contentType" : "application/json" "x-accepts" : "application/json"
}, },
"delete" : { "delete" : {
"tags" : [ "store" ], "tags" : [ "store" ],
"summary" : "Delete purchase order by ID", "summary" : "Delete purchase order by ID",
"description" : "For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors", "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors",
"operationId" : "deleteOrder", "operationId" : "deleteOrder",
"produces" : [ "application/xml", "application/json" ], "produces" : [ "application/xml", "application/json" ],
"parameters" : [ { "parameters" : [ {
@ -431,9 +427,8 @@
"in" : "path", "in" : "path",
"description" : "ID of the order that needs to be deleted", "description" : "ID of the order that needs to be deleted",
"required" : true, "required" : true,
"type" : "integer", "type" : "string",
"minimum" : 1.0, "minimum" : 1.0
"format" : "int64"
} ], } ],
"responses" : { "responses" : {
"400" : { "400" : {
@ -443,8 +438,8 @@
"description" : "Order not found" "description" : "Order not found"
} }
}, },
"x-accepts" : "application/json", "x-contentType" : "application/json",
"x-contentType" : "application/json" "x-accepts" : "application/json"
} }
}, },
"/user" : { "/user" : {
@ -468,8 +463,8 @@
"description" : "successful operation" "description" : "successful operation"
} }
}, },
"x-accepts" : "application/json", "x-contentType" : "application/json",
"x-contentType" : "application/json" "x-accepts" : "application/json"
} }
}, },
"/user/createWithArray" : { "/user/createWithArray" : {
@ -496,8 +491,8 @@
"description" : "successful operation" "description" : "successful operation"
} }
}, },
"x-accepts" : "application/json", "x-contentType" : "application/json",
"x-contentType" : "application/json" "x-accepts" : "application/json"
} }
}, },
"/user/createWithList" : { "/user/createWithList" : {
@ -524,8 +519,8 @@
"description" : "successful operation" "description" : "successful operation"
} }
}, },
"x-accepts" : "application/json", "x-contentType" : "application/json",
"x-contentType" : "application/json" "x-accepts" : "application/json"
} }
}, },
"/user/login" : { "/user/login" : {
@ -563,7 +558,7 @@
"X-Expires-After" : { "X-Expires-After" : {
"type" : "string", "type" : "string",
"format" : "date-time", "format" : "date-time",
"description" : "date in UTC when token expires" "description" : "date in UTC when toekn expires"
} }
} }
}, },
@ -571,8 +566,8 @@
"description" : "Invalid username/password supplied" "description" : "Invalid username/password supplied"
} }
}, },
"x-accepts" : "application/json", "x-contentType" : "application/json",
"x-contentType" : "application/json" "x-accepts" : "application/json"
} }
}, },
"/user/logout" : { "/user/logout" : {
@ -588,8 +583,8 @@
"description" : "successful operation" "description" : "successful operation"
} }
}, },
"x-accepts" : "application/json", "x-contentType" : "application/json",
"x-contentType" : "application/json" "x-accepts" : "application/json"
} }
}, },
"/user/{username}" : { "/user/{username}" : {
@ -620,8 +615,8 @@
"description" : "User not found" "description" : "User not found"
} }
}, },
"x-accepts" : "application/json", "x-contentType" : "application/json",
"x-contentType" : "application/json" "x-accepts" : "application/json"
}, },
"put" : { "put" : {
"tags" : [ "user" ], "tags" : [ "user" ],
@ -632,7 +627,7 @@
"parameters" : [ { "parameters" : [ {
"name" : "username", "name" : "username",
"in" : "path", "in" : "path",
"description" : "name that need to be updated", "description" : "name that need to be deleted",
"required" : true, "required" : true,
"type" : "string" "type" : "string"
}, { }, {
@ -652,8 +647,8 @@
"description" : "User not found" "description" : "User not found"
} }
}, },
"x-accepts" : "application/json", "x-contentType" : "application/json",
"x-contentType" : "application/json" "x-accepts" : "application/json"
}, },
"delete" : { "delete" : {
"tags" : [ "user" ], "tags" : [ "user" ],
@ -676,25 +671,25 @@
"description" : "User not found" "description" : "User not found"
} }
}, },
"x-accepts" : "application/json", "x-contentType" : "application/json",
"x-contentType" : "application/json" "x-accepts" : "application/json"
} }
} }
}, },
"securityDefinitions" : { "securityDefinitions" : {
"api_key" : {
"type" : "apiKey",
"name" : "api_key",
"in" : "header"
},
"petstore_auth" : { "petstore_auth" : {
"type" : "oauth2", "type" : "oauth2",
"authorizationUrl" : "http://petstore.swagger.io/oauth/dialog", "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog",
"flow" : "implicit", "flow" : "implicit",
"scopes" : { "scopes" : {
"write:pets" : "modify pets in your account", "write:pets" : "modify pets in your account",
"read:pets" : "read your pets" "read:pets" : "read your pets"
} }
},
"api_key" : {
"type" : "apiKey",
"name" : "api_key",
"in" : "header"
} }
}, },
"definitions" : { "definitions" : {
@ -727,6 +722,8 @@
"default" : false "default" : false
} }
}, },
"title" : "Pet Order",
"description" : "An order for a pets from the pet store",
"xml" : { "xml" : {
"name" : "Order" "name" : "Order"
} }
@ -742,6 +739,8 @@
"type" : "string" "type" : "string"
} }
}, },
"title" : "Pet catehgry",
"description" : "A category for a pet",
"xml" : { "xml" : {
"name" : "Category" "name" : "Category"
} }
@ -777,6 +776,8 @@
"description" : "User Status" "description" : "User Status"
} }
}, },
"title" : "a User",
"description" : "A User who is purchasing from the pet store",
"xml" : { "xml" : {
"name" : "User" "name" : "User"
} }
@ -792,25 +793,12 @@
"type" : "string" "type" : "string"
} }
}, },
"title" : "Pet Tag",
"description" : "A tag for a pet",
"xml" : { "xml" : {
"name" : "Tag" "name" : "Tag"
} }
}, },
"ApiResponse" : {
"type" : "object",
"properties" : {
"code" : {
"type" : "integer",
"format" : "int32"
},
"type" : {
"type" : "string"
},
"message" : {
"type" : "string"
}
}
},
"Pet" : { "Pet" : {
"type" : "object", "type" : "object",
"required" : [ "name", "photoUrls" ], "required" : [ "name", "photoUrls" ],
@ -852,9 +840,28 @@
"enum" : [ "available", "pending", "sold" ] "enum" : [ "available", "pending", "sold" ]
} }
}, },
"title" : "a Pet",
"description" : "A pet for sale in the pet store",
"xml" : { "xml" : {
"name" : "Pet" "name" : "Pet"
} }
},
"ApiResponse" : {
"type" : "object",
"properties" : {
"code" : {
"type" : "integer",
"format" : "int32"
},
"type" : {
"type" : "string"
},
"message" : {
"type" : "string"
}
},
"title" : "An uploaded response",
"description" : "Describes the result of uploading an image resource"
} }
}, },
"externalDocs" : { "externalDocs" : {