diff --git a/bin/java-petstore-pkmst-server.sh b/bin/java-pkmst-petstore-server.sh
old mode 100644
new mode 100755
similarity index 63%
rename from bin/java-petstore-pkmst-server.sh
rename to bin/java-pkmst-petstore-server.sh
index 3f95c1f7343..5f4541572d1
--- a/bin/java-petstore-pkmst-server.sh
+++ b/bin/java-pkmst-petstore-server.sh
@@ -1,34 +1,34 @@
-#!/bin/sh
-
-SCRIPT="$0"
-
-while [ -h "$SCRIPT" ] ; do
- ls=`ls -ld "$SCRIPT"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- SCRIPT="$link"
- else
- SCRIPT=`dirname "$SCRIPT"`/"$link"
- fi
-done
-
-if [ ! -d "${APP_DIR}" ]; then
- APP_DIR=`dirname "$SCRIPT"`/..
- APP_DIR=`cd "${APP_DIR}"; pwd`
-fi
-
-executable="./modules/swagger-codegen-cli/target/swagger-codegen-cli.jar"
-
-if [ ! -f "$executable" ]
-then
- mvn clean package
-fi
-
-# if you've executed sbt assembly previously it will use that instead.
-export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="$@ generate -t modules/swagger-codegen/src/main/resources/pkmst -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l pkmst -o samples/server/petstore/java-pkmst/ -DhideGenerationTimestamp=true"
-
-echo "Removing files and folders under samples/server/petstore/java-pkmst/src/main"
-rm -rf samples/server/petstore/java-pkmst/src/main
-find samples/server/petstore/java-pkmst -maxdepth 1 -type f ! -name "README.md" ! -name "pom.xml" ! -name "mvn_test_jdk8_only.sh" ! -name ".swagger-codegen-ignore" -exec rm {} +
-java $JAVA_OPTS -jar $executable $ags
+#!/bin/sh
+
+SCRIPT="$0"
+
+while [ -h "$SCRIPT" ] ; do
+ ls=`ls -ld "$SCRIPT"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ SCRIPT="$link"
+ else
+ SCRIPT=`dirname "$SCRIPT"`/"$link"
+ fi
+done
+
+if [ ! -d "${APP_DIR}" ]; then
+ APP_DIR=`dirname "$SCRIPT"`/..
+ APP_DIR=`cd "${APP_DIR}"; pwd`
+fi
+
+executable="./modules/swagger-codegen-cli/target/swagger-codegen-cli.jar"
+
+if [ ! -f "$executable" ]
+then
+ mvn clean package
+fi
+
+# if you've executed sbt assembly previously it will use that instead.
+export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
+ags="$@ generate -t modules/swagger-codegen/src/main/resources/JavaJaxRS -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l java-pkmst -o samples/server/petstore/java-pkmst/ -DhideGenerationTimestamp=true"
+
+echo "Removing files and folders under samples/server/petstore/java-pkmst/src/main"
+rm -rf samples/server/petstore/java-pkmst/src/main
+find samples/server/petstore/java-pkmst/ -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
+java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/windows/java-petstore-pkmst-server.bat b/bin/windows/java-pkmst-petstore-server.bat
similarity index 60%
rename from bin/windows/java-petstore-pkmst-server.bat
rename to bin/windows/java-pkmst-petstore-server.bat
index a8e6669b943..22590ee1d54 100644
--- a/bin/windows/java-petstore-pkmst-server.bat
+++ b/bin/windows/java-pkmst-petstore-server.bat
@@ -5,6 +5,6 @@ If Not Exist %executable% (
)
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
-set ags=generate -i modules\swagger-codegen\src\test\resources\2_0\petstore.yaml -l pkmst -o samples\server\petstore\java-pkmst
+set ags=generate -i modules\swagger-codegen\src\test\resources\2_0\petstore.yaml -l java-pkmst -o samples\server\petstore\java-pkmst -DhideGenerationTimestamp=true
-java %JAVA_OPTS% -jar %executable% %ags%
\ No newline at end of file
+java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaPKMSTServerCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaPKMSTServerCodegen.java
index bf682626edb..5c2ffb16f8c 100644
--- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaPKMSTServerCodegen.java
+++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaPKMSTServerCodegen.java
@@ -117,7 +117,7 @@ public class JavaPKMSTServerCodegen extends AbstractJavaCodegen {
}
public String getName() {
- return "pkmst";
+ return "java-pkmst";
}
public String getHelp() {
diff --git a/samples/server/petstore/java-pkmst/Readme.md b/samples/server/petstore/java-pkmst/Readme.md
index 27d8199c6f7..be2d523d66a 100644
--- a/samples/server/petstore/java-pkmst/Readme.md
+++ b/samples/server/petstore/java-pkmst/Readme.md
@@ -1,142 +1,23 @@
-Dear Reader : Thanks for selecting PKMST swagger code generation toolkit for starting your microservice journey.
-We believe the hard work we put into this framework will help you kick start your journey sooner and you will find it
-easy to scale your service to enterprise grade. Another great thing is you don't need to enable all capabilities as you start,
-but can enable as your microservice capabilities needs to be extended to meet strict enterprise standards.
+# Swagger Jersey generated server
-PKMST feature set.
-a)Read the Swagger supplied and will create a maven project
-b)Create basic controller based on rest verb and path configured in swagger
-c)generate default unit test cose using junit
-d)generate all needed dependency needed to run the microservice on local
-e)generate a default manifest file that allows you to push code to cloudfoundry instance ( eg pcf , ibm bluemix etc)
+## Overview
+This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the
+[OpenAPI-Spec](https://github.com/swagger-api/swagger-core/wiki) from a remote server, you can easily generate a server stub. This
+is an example of building a swagger-enabled JAX-RS server.
-As you mature your knowledge with pkmst, you can leverage vendor extensions feature that will allow you to supply specific configuration
-in your swagger and generate respective configuration that will
-f)Allow you integrate with registry server (Example Eureka)
-g)Allow you to integrate with tracing server (Example Zipkin)
-h)Allow you to capture log in your microservice and send to Log management server (Ex ELK or splunk)
-i)Allow you to configure Oauth2 security based authorization for your microservice
+This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework.
- Additonal Features
- j)generate sample cucumber file and dependency to drive your Behaviour driven development.
- k)generate gatling based perfromance test , which can be excuted via build pipeline like jenkins etc.
-
-
-Working:
-Using swagger specification you can convert any definition to spring boot microservice.
-It has the integration with the below services:
-eureka registry, zipkin , spring boot admin, circuit breaker.
+To run the server, please execute the following:
-By default only the circuit breaker annotation is enabled. But one has to write the fallback method. The needed dependency for it is also been enabled. To generate the integration and
-related configuration for eureka, zipkin, spring boot admin one has two options:
+```
+mvn clean package jetty:run
+```
-1) When generating from UI one has to provide vendor extensions inside the swagger specification as below:
-swagger: "2.0"
-info:
- description: "This is a sample Product Catalogue Server.\
- \ For this sample, you can use the api key `special-key` to test the authorization\
- \ filters."
- version: "1.0.0"
- x-codegen:
- eurekaUri: "http://localhost:8080"
- zipkinUri: "http://localhost:9411"
- springBootAdminUri: "http://localhost:8000"
- pkmstInterceptor: "true"
-
-PLease note the vendor extensions are inside the info tag of the swagger specification. All the tags are case sensitive. Once given all the related configuration and the dependency
-will be enabled.
+You can then view the swagger listing here:
-2) When generating from the maven plugin one has to provide configuration inside pom as below:
-inside the swagger codegen maven plugin under the configuration section
+```
+http://localhost:8008/v2/swagger.json
+```
-
- product-swagger.yaml
- pkmst
-
-
- com.prokarma
- product-catalogue
- 1.0
- com.prokarma.pkmst
- ProductCatalogue
-
- http://localhost:9411
- http://localhost:4588
- true
-
-
-
- The project has three profiles local, dev, dev-config which can be configured accordingly. Once you have provided the uris you can see the necessary configurations generated inside the local and the dev
- yml files. dev-config is for the config server if you want to use.(also enable the dependency for the config server inside the pom)
-
- [Note: one has to run the zipkin, eureka, spring boot admin servers to be able to connect from the app. This project assumes that you have all the servers
- up and running.]
-
- Also provided are the middleware handlers:
-
-1) traceInterceptor:is an id passed in from client and will be unique with an application context. The id will be passed into the backend and return to the consumer for transaction tracing.
-
-2) correlationInterceptor:generates a UUID in the first API/service and pass it to all other APIs/services in the call tree for tracking purpose.
-
-3) rateLimitInterceptor:is a rate limiting handler to limit number of concurrent requests on the server. Once the limit is reached, subsequent requests will be queued for later execution. The size of the queue is configurable.
-
-4) auditInterceptor: audit logs most important info about request and response into audit.log in JSON format with config file that controls which fields to be logged
-
-5) bodyInterceptor:s a body parser middleware that is responsible for parsing the content of the request based on Content-Type in the request header.
-
-To be able to generate the handlers and the necessary configurations one has to provide the pkmstInterceptor key inside the vendor extensions or through
-the maven plugin.
-Once provided all the handlers are registered in the interceptor registry and can be enabled or disabled through the configuration provided inside
-the application yml as below:
-interceptor:
- enable:
- audit: true
- body: true
- rateLimit: true
- traceability: true
- correlation: true
-
-For testing we have placeholders for junit test class, integration test class, cucumber sample
-feature file(implement according to your needs), gatling load test.
-
-Ways to run the project:
-1) Normal spring boot application
-
-2) Using Dockerfile to run in the container:
-dockerfile will be generated inside the project by default. Image can be created using docker cli or through the maven plugin
-
-
-
- ...
-
- com.spotify
- docker-maven-plugin
- VERSION GOES HERE
-
- example
- docker
-
-
- /
- ${project.build.directory}
- ${project.build.finalName}.jar
-
-
-
-
- ...
-
-
-
-Use manifest.yml file to push the application to the cloud.
-
-HttpLogging filter is provided for logging in the request and response. Can be found inside the com.prokarma.pkmst.logging package.
-Spring security is also provided to secure the resources. Please modify according to your needs.
-
-First run:
-Import the project in to the eclipse. Run the app as an spring boot application.The project will run on http://localhost:8008
-Swagger ui available on:
-http://localhost:8008/swagger-ui.html
-If all the configurations have been enabled(depending on the port) below are some of the URls to access:
-eureka: http://localhost:8080
-zipkin: http://localhost:9411
+Note that if you have configured the `host` to be something other than localhost, the calls through
+swagger-ui will be directed to that host and not localhost!
\ No newline at end of file
diff --git a/samples/server/petstore/java-pkmst/pom.xml b/samples/server/petstore/java-pkmst/pom.xml
index bdd77043a36..4fd4ce7106d 100644
--- a/samples/server/petstore/java-pkmst/pom.xml
+++ b/samples/server/petstore/java-pkmst/pom.xml
@@ -1,416 +1,178 @@
-
-
- 4.0.0
- com.prokarma
- pkmst-microservice
- 1.0.0
- jar
- pkmst-microservice
- Demo project for Spring Boot Microservices
-
- UTF-8
- UTF-8
- 1.8
- 1.5.6.RELEASE
- 1.2.5
- 1.2.5
- 3.10.0
- 2.6.1-SNAPSHOT
- 2.6.0
- 1.7.25
- 4.11
- 1.2.3
- 1.2.3
- 2.3.0
- 2.2.4
- 3.2.2
- Camden.SR7
- 1.1.3.RELEASE
-
-
- org.springframework.boot
- spring-boot-starter-parent
- 1.5.6.RELEASE
-
-
-
-
-
- oss-snapshots
- JFrog OSS Snapshots
- https://oss.jfrog.org/simple/oss-snapshot-local/
-
- true
-
-
-
- central
- Maven Repository Switchboard
- default
- http://repo1.maven.org/maven2
-
- false
-
-
-
- jitpack.io
- https://jitpack.io
-
-
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- org.springframework.boot
- spring-boot-starter-logging
-
-
-
-
- org.springframework.boot
- spring-boot-starter-security
-
-
- org.springframework.security.oauth
- spring-security-oauth2
-
-
- org.assertj
- assertj-core
-
-
-
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
- org.springframework.boot
- spring-boot-starter-jetty
-
-
-
- org.springframework.cloud
- spring-cloud-starter-hystrix-dashboard
-
-
- org.springframework
- spring-jdbc
-
-
- com.h2database
- h2
- runtime
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
- com.netflix.hystrix
- hystrix-javanica
- 1.4.1
-
-
- org.apache.commons
- commons-lang3
- 3.4
-
-
- commons-logging
- commons-logging
- 1.2
-
-
-
- info.cukes
- cucumber-junit
- ${cucumber-junit.version}
-
-
- info.cukes
- cucumber-java
- ${cucumber-java.version}
-
-
- info.cukes
- cucumber-spring
- ${cucumber-java.version}
-
-
- net.masterthought
- cucumber-reporting
- ${cucumber-reporting.version}
-
-
- com.github.tomakehurst
- wiremock
- 1.46
- test
-
-
- io.springfox
- springfox-swagger2
- ${springfox-swagger2}
-
-
- io.springfox
- springfox-swagger-ui
- ${springfox-swagger-ui}
-
-
- org.slf4j
- slf4j-api
- ${slf4j-api}
-
-
- net.logstash.logback
- logstash-logback-encoder
- ${logstash-logback-encoder}
-
-
- ch.qos.logback
- logback-core
-
-
- ch.qos.logback
- logback-classic
-
-
- org.springframework.boot
- spring-boot-starter-remote-shell
-
-
- org.jolokia
- jolokia-core
-
-
-
- io.gatling.highcharts
- gatling-charts-highcharts
- ${gatling.version}
- test
-
-
- com.typesafe
- config
- 1.3.1
-
-
- com.jayway.restassured
- rest-assured
- 2.9.0
-
-
- org.springframework
- spring-test
-
-
- org.threeten
- threetenbp
- 1.3.6
-
-
-
-
-
- org.springframework.cloud
- spring-cloud-dependencies
- ${spring-cloud.version}
- pom
- import
-
-
-
-
-
- development
-
- true
-
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
- 2.19.1
-
-
-
- **/*CucumberTest*.java
-
- **/cucumber/*.java
-
-
-
-
-
- net.alchim31.maven
- scala-maven-plugin
- ${scala-maven-plugin.version}
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
- ${project.name}
-
-
-
- org.jacoco
- jacoco-maven-plugin
- 0.7.7.201606060606
-
- ${basedir}/target/coverage-reports/jacoco-unit.exec
- ${basedir}/target/coverage-reports/jacoco-unit.exec
-
-
-
- jacoco-initialize
-
- prepare-agent
-
-
-
- jacoco-site
- test
-
- report
-
-
-
-
-
- org.apache.maven.plugins
- maven-site-plugin
- 3.5.1
-
-
-
- org.codehaus.mojo
- findbugs-maven-plugin
- 3.0.4
-
-
- org.apache.maven.plugins
- maven-checkstyle-plugin
- 2.17
-
-
- org.apache.maven.plugins
- maven-surefire-report-plugin
- 2.19.1
-
-
- org.apache.maven.plugins
- maven-pmd-plugin
-
-
-
-
-
-
-
-
- cucumber-tests
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
- 2.19.1
-
-
- none
-
-
-
- Test.java
-
-
-
-
-
-
-
-
-
-
-
-
- org.eclipse.m2e
- lifecycle-mapping
- 1.0.0
-
-
-
-
-
- org.springframework.cloud
- spring-cloud-contract-maven-plugin
- [1.0.1.RELEASE,)
-
- convert
- generateTests
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ 4.0.0
+ com.prokarma
+ pkmst-microservice
+ jar
+ pkmst-microservice
+ 1.0.0
+
+
+
+ Unlicense
+ http://www.apache.org/licenses/LICENSE-2.0.html
+ repo
+
+
+
+
+ src/main/java
+
+
+ org.apache.maven.plugins
+ maven-war-plugin
+ 3.1.0
+
+
+ maven-failsafe-plugin
+ 2.6
+
+
+
+ integration-test
+ verify
+
+
+
+
+
+ org.eclipse.jetty
+ jetty-maven-plugin
+ ${jetty-version}
+
+
+ /
+
+ target/${project.artifactId}-${project.version}
+ 8079
+ stopit
+ 10
+
+ 8008
+ 60000
+
+
+
+
+ start-jetty
+ pre-integration-test
+
+ start
+
+
+ 0
+ true
+
+
+
+ stop-jetty
+ post-integration-test
+
+ stop
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ 1.9.1
+
+
+ add-source
+ generate-sources
+
+ add-source
+
+
+
+ src/gen/java
+
+
+
+
+
+
+
+
+
+ io.swagger
+ swagger-jersey2-jaxrs
+ compile
+ ${swagger-core-version}
+
+
+ ch.qos.logback
+ logback-classic
+ ${logback-version}
+ compile
+
+
+ ch.qos.logback
+ logback-core
+ ${logback-version}
+ compile
+
+
+ junit
+ junit
+ ${junit-version}
+ test
+
+
+ javax.servlet
+ servlet-api
+ ${servlet-api-version}
+
+
+ org.glassfish.jersey.containers
+ jersey-container-servlet-core
+ ${jersey2-version}
+
+
+ org.glassfish.jersey.media
+ jersey-media-multipart
+ ${jersey2-version}
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-joda
+ ${jackson-version}
+
+
+ com.fasterxml.jackson.jaxrs
+ jackson-jaxrs-json-provider
+ ${jackson-version}
+
+
+
+ com.brsanthu
+ migbase64
+ 2.2
+
+
+
+
+
+
+
+ sonatype-snapshots
+ https://oss.sonatype.org/content/repositories/snapshots
+
+ true
+
+
+
+
+ 1.8
+ ${java.version}
+ ${java.version}
+ 1.5.15
+ 9.2.9.v20150224
+ 2.22.2
+ 2.8.9
+ 4.12
+ 1.1.7
+ 2.5
+ UTF-8
+
diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java
index 125678b28b1..c9c28e200ab 100644
--- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java
+++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java
@@ -1,153 +1,210 @@
-/**
- * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
- * https://github.com/swagger-api/swagger-codegen
- * Do not edit the class manually.
- */
package com.prokarma.pkmst.controller;
+import com.prokarma.pkmst.model.*;
+import com.prokarma.pkmst.controller.PetApiService;
+import com.prokarma.pkmst.controller.factories.PetApiServiceFactory;
+
+import io.swagger.annotations.ApiParam;
+import io.swagger.jaxrs.*;
+
import java.io.File;
import com.prokarma.pkmst.model.ModelApiResponse;
import com.prokarma.pkmst.model.Pet;
-import io.swagger.annotations.*;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestHeader;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RequestPart;
-import org.springframework.web.multipart.MultipartFile;
-import java.io.IOException;
-
+import java.util.Map;
import java.util.List;
-/**
- * Provides the info about api methods
- * @author pkmst
- *
- */
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaPKMSTServerCodegen", date = "2017-12-18T14:05:35.281+05:30")
+import com.prokarma.pkmst.controller.NotFoundException;
-@Api(value = "Pet", description = "the Pet API")
-public interface PetApi {
+import java.io.InputStream;
- @ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
+import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
+import org.glassfish.jersey.media.multipart.FormDataParam;
+
+import javax.servlet.ServletConfig;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.SecurityContext;
+import javax.ws.rs.*;
+
+@Path("/Pet")
+
+
+@io.swagger.annotations.Api(description = "the Pet API")
+
+public class PetApi {
+ private final PetApiService delegate;
+
+ public PetApi(@Context ServletConfig servletContext) {
+ PetApiService delegate = null;
+
+ if (servletContext != null) {
+ String implClass = servletContext.getInitParameter("PetApi.implementation");
+ if (implClass != null && !"".equals(implClass.trim())) {
+ try {
+ delegate = (PetApiService) Class.forName(implClass).newInstance();
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+
+ if (delegate == null) {
+ delegate = PetApiServiceFactory.getPetApi();
+ }
+
+ this.delegate = delegate;
+ }
+
+ @POST
+ @Path("/pet")
+ @Consumes({ "application/json", "application/xml" })
+ @Produces({ "application/xml", "application/json" })
+ @io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = .class, authorizations = {
+ @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
+ @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
+ })
}, tags={ "pet", })
- @ApiResponses(value = {
- @ApiResponse(code = 405, message = "Invalid input") })
- @RequestMapping(value = "/pet",
- produces = { "application/xml", "application/json" },
- consumes = { "application/json", "application/xml" },
- method = RequestMethod.POST)
- ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @RequestBody Pet body, @RequestHeader(value = "Accept", required = false) String accept) throws Exception;
-
-
- @ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
+ @io.swagger.annotations.ApiResponses(value = {
+ @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = .class) })
+ public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body
+,@Context SecurityContext securityContext)
+ throws NotFoundException {
+ return delegate.addPet(body,securityContext);
+ }
+ @DELETE
+ @Path("/pet/{petId}")
+
+ @Produces({ "application/xml", "application/json" })
+ @io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = .class, authorizations = {
+ @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
+ @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
+ })
}, tags={ "pet", })
- @ApiResponses(value = {
- @ApiResponse(code = 400, message = "Invalid pet value") })
- @RequestMapping(value = "/pet/{petId}",
- produces = { "application/xml", "application/json" },
- method = RequestMethod.DELETE)
- ResponseEntity deletePet(@ApiParam(value = "Pet id to delete",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) String apiKey, @RequestHeader(value = "Accept", required = false) String accept) throws Exception;
-
-
- @ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
+ @io.swagger.annotations.ApiResponses(value = {
+ @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = .class) })
+ public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId
+,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey
+,@Context SecurityContext securityContext)
+ throws NotFoundException {
+ return delegate.deletePet(petId,apiKey,securityContext);
+ }
+ @GET
+ @Path("/pet/findByStatus")
+
+ @Produces({ "application/xml", "application/json" })
+ @io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
+ @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
+ @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
+ })
}, tags={ "pet", })
- @ApiResponses(value = {
- @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
- @ApiResponse(code = 400, message = "Invalid status value") })
- @RequestMapping(value = "/pet/findByStatus",
- produces = { "application/xml", "application/json" },
- method = RequestMethod.GET)
- ResponseEntity> findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status", required = true) List status, @RequestHeader(value = "Accept", required = false) String accept) throws Exception;
-
-
- @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 = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
+ @io.swagger.annotations.ApiResponses(value = {
+ @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
+
+ @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = .class) })
+ public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter",required=true, allowableValues="available, pending, sold") @QueryParam("status") List status
+,@Context SecurityContext securityContext)
+ throws NotFoundException {
+ return delegate.findPetsByStatus(status,securityContext);
+ }
+ @GET
+ @Path("/pet/findByTags")
+
+ @Produces({ "application/xml", "application/json" })
+ @io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
+ @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
+ @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
+ })
}, tags={ "pet", })
- @ApiResponses(value = {
- @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
- @ApiResponse(code = 400, message = "Invalid tag value") })
- @RequestMapping(value = "/pet/findByTags",
- produces = { "application/xml", "application/json" },
- method = RequestMethod.GET)
- ResponseEntity> findPetsByTags(@ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List tags, @RequestHeader(value = "Accept", required = false) String accept) throws Exception;
-
-
- @ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
- @Authorization(value = "api_key")
+ @io.swagger.annotations.ApiResponses(value = {
+ @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
+
+ @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = .class) })
+ public Response findPetsByTags(@ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List tags
+,@Context SecurityContext securityContext)
+ throws NotFoundException {
+ return delegate.findPetsByTags(tags,securityContext);
+ }
+ @GET
+ @Path("/pet/{petId}")
+
+ @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.Authorization(value = "api_key")
}, tags={ "pet", })
- @ApiResponses(value = {
- @ApiResponse(code = 200, message = "successful operation", response = Pet.class),
- @ApiResponse(code = 400, message = "Invalid ID supplied"),
- @ApiResponse(code = 404, message = "Pet not found") })
- @RequestMapping(value = "/pet/{petId}",
- produces = { "application/xml", "application/json" },
- method = RequestMethod.GET)
- ResponseEntity getPetById(@ApiParam(value = "ID of pet to return",required=true ) @PathVariable("petId") Long petId, @RequestHeader(value = "Accept", required = false) String accept) throws Exception;
-
-
- @ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
+ @io.swagger.annotations.ApiResponses(value = {
+ @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class),
+
+ @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = .class),
+
+ @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = .class) })
+ public Response getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId
+,@Context SecurityContext securityContext)
+ throws NotFoundException {
+ return delegate.getPetById(petId,securityContext);
+ }
+ @PUT
+ @Path("/pet")
+ @Consumes({ "application/json", "application/xml" })
+ @Produces({ "application/xml", "application/json" })
+ @io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = .class, authorizations = {
+ @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
+ @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
+ })
}, tags={ "pet", })
- @ApiResponses(value = {
- @ApiResponse(code = 400, message = "Invalid ID supplied"),
- @ApiResponse(code = 404, message = "Pet not found"),
- @ApiResponse(code = 405, message = "Validation exception") })
- @RequestMapping(value = "/pet",
- produces = { "application/xml", "application/json" },
- consumes = { "application/json", "application/xml" },
- method = RequestMethod.PUT)
- ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @RequestBody Pet body, @RequestHeader(value = "Accept", required = false) String accept) throws Exception;
-
-
- @ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
+ @io.swagger.annotations.ApiResponses(value = {
+ @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = .class),
+
+ @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = .class),
+
+ @io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = .class) })
+ public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body
+,@Context SecurityContext securityContext)
+ throws NotFoundException {
+ return delegate.updatePet(body,securityContext);
+ }
+ @POST
+ @Path("/pet/{petId}")
+ @Consumes({ "application/x-www-form-urlencoded" })
+ @Produces({ "application/xml", "application/json" })
+ @io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = .class, authorizations = {
+ @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
+ @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
+ })
}, tags={ "pet", })
- @ApiResponses(value = {
- @ApiResponse(code = 405, message = "Invalid input") })
- @RequestMapping(value = "/pet/{petId}",
- produces = { "application/xml", "application/json" },
- consumes = { "application/x-www-form-urlencoded" },
- method = RequestMethod.POST)
- ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status, @RequestHeader(value = "Accept", required = false) String accept) throws Exception;
-
-
- @ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
+ @io.swagger.annotations.ApiResponses(value = {
+ @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = .class) })
+ public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId
+,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name
+,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status
+,@Context SecurityContext securityContext)
+ throws NotFoundException {
+ return delegate.updatePetWithForm(petId,name,status,securityContext);
+ }
+ @POST
+ @Path("/pet/{petId}/uploadImage")
+ @Consumes({ "multipart/form-data" })
+ @Produces({ "application/json" })
+ @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
+ @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
+ @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
+ })
}, tags={ "pet", })
- @ApiResponses(value = {
- @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
- @RequestMapping(value = "/pet/{petId}/uploadImage",
- produces = { "application/json" },
- consumes = { "multipart/form-data" },
- method = RequestMethod.POST)
- ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @RequestPart("file") MultipartFile file, @RequestHeader(value = "Accept", required = false) String accept) throws Exception;
-
+ @io.swagger.annotations.ApiResponses(value = {
+ @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
+,@ApiParam(value = "Additional data to pass to server") @FormParam("additionalMetadata") String additionalMetadata
+,
+ @FormDataParam("file") InputStream fileInputStream,
+ @FormDataParam("file") FormDataContentDisposition fileDetail
+,@Context SecurityContext securityContext)
+ throws NotFoundException {
+ return delegate.uploadFile(petId,additionalMetadata,fileInputStream, fileDetail,securityContext);
+ }
}
diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApiController.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApiController.java
index c8f9f82e9e6..a0474838c01 100644
--- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApiController.java
+++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApiController.java
@@ -25,7 +25,6 @@ import java.io.IOException;
* @author pkmst
*
*/
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaPKMSTServerCodegen", date = "2017-12-18T14:05:35.281+05:30")
@Controller
public class PetApiController implements PetApi {
@@ -35,20 +34,24 @@ public class PetApiController implements PetApi {
this.objectMapper = objectMapper;
}
- public ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @RequestBody Pet body,
+ public ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body
+,
@RequestHeader(value = "Accept", required = false) String accept) throws Exception {
// do some magic!
return new ResponseEntity(HttpStatus.OK);
}
- public ResponseEntity deletePet(@ApiParam(value = "Pet id to delete",required=true ) @PathVariable("petId") Long petId,
- @ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) String apiKey,
+ public ResponseEntity deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId
+,
+ @ApiParam(value = "" )@HeaderParam("api_key") String apiKey
+,
@RequestHeader(value = "Accept", required = false) String accept) throws Exception {
// do some magic!
return new ResponseEntity(HttpStatus.OK);
}
- public ResponseEntity> findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status", required = true) List status,
+ public ResponseEntity> findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter",required=true, allowableValues="available, pending, sold") @QueryParam("status") List status
+,
@RequestHeader(value = "Accept", required = false) String accept) throws Exception {
// do some magic!
@@ -64,7 +67,8 @@ public class PetApiController implements PetApi {
return new ResponseEntity>(HttpStatus.OK);
}
- public ResponseEntity> findPetsByTags(@ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List tags,
+ public ResponseEntity> findPetsByTags(@ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List tags
+,
@RequestHeader(value = "Accept", required = false) String accept) throws Exception {
// do some magic!
@@ -80,7 +84,8 @@ public class PetApiController implements PetApi {
return new ResponseEntity>(HttpStatus.OK);
}
- public ResponseEntity getPetById(@ApiParam(value = "ID of pet to return",required=true ) @PathVariable("petId") Long petId,
+ public ResponseEntity getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId
+,
@RequestHeader(value = "Accept", required = false) String accept) throws Exception {
// do some magic!
@@ -96,23 +101,32 @@ public class PetApiController implements PetApi {
return new ResponseEntity(HttpStatus.OK);
}
- public ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @RequestBody Pet body,
+ public ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body
+,
@RequestHeader(value = "Accept", required = false) String accept) throws Exception {
// do some magic!
return new ResponseEntity(HttpStatus.OK);
}
- public ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") Long petId,
- @ApiParam(value = "Updated name of the pet") @RequestPart(value="name", required=false) String name,
- @ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status,
+ public ResponseEntity updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId
+,
+ @ApiParam(value = "Updated name of the pet") @FormParam("name") String name
+,
+ @ApiParam(value = "Updated status of the pet") @FormParam("status") String status
+,
@RequestHeader(value = "Accept", required = false) String accept) throws Exception {
// do some magic!
return new ResponseEntity(HttpStatus.OK);
}
- public ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId,
- @ApiParam(value = "Additional data to pass to server") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,
- @ApiParam(value = "file detail") @RequestPart("file") MultipartFile file,
+ public ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId
+,
+ @ApiParam(value = "Additional data to pass to server") @FormParam("additionalMetadata") String additionalMetadata
+,
+
+ @FormDataParam("file") InputStream fileInputStream,
+ @FormDataParam("file") FormDataContentDisposition fileDetail
+,
@RequestHeader(value = "Accept", required = false) String accept) throws Exception {
// do some magic!
diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java
index e457b0778a3..20f8221aa13 100644
--- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java
+++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java
@@ -1,75 +1,114 @@
-/**
- * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT).
- * https://github.com/swagger-api/swagger-codegen
- * Do not edit the class manually.
- */
package com.prokarma.pkmst.controller;
+import com.prokarma.pkmst.model.*;
+import com.prokarma.pkmst.controller.StoreApiService;
+import com.prokarma.pkmst.controller.factories.StoreApiServiceFactory;
+
+import io.swagger.annotations.ApiParam;
+import io.swagger.jaxrs.*;
+
import java.util.Map;
import com.prokarma.pkmst.model.Order;
-import io.swagger.annotations.*;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestHeader;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RequestPart;
-import org.springframework.web.multipart.MultipartFile;
-import java.io.IOException;
-
+import java.util.Map;
import java.util.List;
-/**
- * Provides the info about api methods
- * @author pkmst
- *
- */
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaPKMSTServerCodegen", date = "2017-12-18T14:05:35.281+05:30")
+import com.prokarma.pkmst.controller.NotFoundException;
-@Api(value = "Store", description = "the Store API")
-public interface StoreApi {
+import java.io.InputStream;
- @ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = Void.class, tags={ "store", })
- @ApiResponses(value = {
- @ApiResponse(code = 400, message = "Invalid ID supplied"),
- @ApiResponse(code = 404, message = "Order not found") })
- @RequestMapping(value = "/store/order/{orderId}",
- produces = { "application/xml", "application/json" },
- method = RequestMethod.DELETE)
- ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("orderId") String orderId, @RequestHeader(value = "Accept", required = false) String accept) throws Exception;
+import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
+import org.glassfish.jersey.media.multipart.FormDataParam;
+
+import javax.servlet.ServletConfig;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.SecurityContext;
+import javax.ws.rs.*;
+
+@Path("/Store")
- @ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
- @Authorization(value = "api_key")
+@io.swagger.annotations.Api(description = "the Store API")
+
+public class StoreApi {
+ private final StoreApiService delegate;
+
+ public StoreApi(@Context ServletConfig servletContext) {
+ StoreApiService delegate = null;
+
+ if (servletContext != null) {
+ String implClass = servletContext.getInitParameter("StoreApi.implementation");
+ if (implClass != null && !"".equals(implClass.trim())) {
+ try {
+ delegate = (StoreApiService) Class.forName(implClass).newInstance();
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+
+ if (delegate == null) {
+ delegate = StoreApiServiceFactory.getStoreApi();
+ }
+
+ this.delegate = delegate;
+ }
+
+ @DELETE
+ @Path("/store/order/{orderId}")
+
+ @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 = .class, tags={ "store", })
+ @io.swagger.annotations.ApiResponses(value = {
+ @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = .class),
+
+ @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = .class) })
+ public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("orderId") String orderId
+,@Context SecurityContext securityContext)
+ throws NotFoundException {
+ return delegate.deleteOrder(orderId,securityContext);
+ }
+ @GET
+ @Path("/store/inventory")
+
+ @Produces({ "application/json" })
+ @io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
+ @io.swagger.annotations.Authorization(value = "api_key")
}, tags={ "store", })
- @ApiResponses(value = {
- @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
- @RequestMapping(value = "/store/inventory",
- produces = { "application/json" },
- method = RequestMethod.GET)
- ResponseEntity