From d4150d9a025c1b4dfdd4d4bcadcc2867b29e5331 Mon Sep 17 00:00:00 2001 From: cbornet Date: Mon, 20 Jun 2016 23:48:42 +0200 Subject: [PATCH] remove jersey2 sample as its now the jax-rs default --- bin/jersey2-petstore-server.sh | 31 --- samples/server/petstore/jersey2/README.md | 23 -- samples/server/petstore/jersey2/pom.xml | 145 ------------ .../gen/java/io/swagger/api/ApiException.java | 10 - .../java/io/swagger/api/ApiOriginFilter.java | 22 -- .../io/swagger/api/ApiResponseMessage.java | 69 ------ .../gen/java/io/swagger/api/Bootstrap.java | 31 --- .../io/swagger/api/JacksonJsonProvider.java | 19 -- .../io/swagger/api/NotFoundException.java | 10 - .../src/gen/java/io/swagger/api/PetApi.java | 175 -------------- .../java/io/swagger/api/PetApiService.java | 39 --- .../src/gen/java/io/swagger/api/StoreApi.java | 87 ------- .../java/io/swagger/api/StoreApiService.java | 30 --- .../gen/java/io/swagger/api/StringUtil.java | 42 ---- .../src/gen/java/io/swagger/api/UserApi.java | 131 ---------- .../java/io/swagger/api/UserApiService.java | 38 --- .../java/io/swagger/model/ApiResponse.java | 117 --------- .../gen/java/io/swagger/model/Category.java | 96 -------- .../src/gen/java/io/swagger/model/Order.java | 203 ---------------- .../src/gen/java/io/swagger/model/Pet.java | 201 ---------------- .../src/gen/java/io/swagger/model/Tag.java | 96 -------- .../src/gen/java/io/swagger/model/User.java | 223 ------------------ .../main/java/io/swagger/api/Bootstrap.java | 31 --- .../api/factories/PetApiServiceFactory.java | 13 - .../api/factories/StoreApiServiceFactory.java | 13 - .../api/factories/UserApiServiceFactory.java | 13 - .../swagger/api/impl/PetApiServiceImpl.java | 71 ------ .../swagger/api/impl/StoreApiServiceImpl.java | 46 ---- .../swagger/api/impl/UserApiServiceImpl.java | 70 ------ .../jersey2/src/main/webapp/WEB-INF/web.xml | 63 ----- 30 files changed, 2158 deletions(-) delete mode 100755 bin/jersey2-petstore-server.sh delete mode 100644 samples/server/petstore/jersey2/README.md delete mode 100644 samples/server/petstore/jersey2/pom.xml delete mode 100644 samples/server/petstore/jersey2/src/gen/java/io/swagger/api/ApiException.java delete mode 100644 samples/server/petstore/jersey2/src/gen/java/io/swagger/api/ApiOriginFilter.java delete mode 100644 samples/server/petstore/jersey2/src/gen/java/io/swagger/api/ApiResponseMessage.java delete mode 100644 samples/server/petstore/jersey2/src/gen/java/io/swagger/api/Bootstrap.java delete mode 100644 samples/server/petstore/jersey2/src/gen/java/io/swagger/api/JacksonJsonProvider.java delete mode 100644 samples/server/petstore/jersey2/src/gen/java/io/swagger/api/NotFoundException.java delete mode 100644 samples/server/petstore/jersey2/src/gen/java/io/swagger/api/PetApi.java delete mode 100644 samples/server/petstore/jersey2/src/gen/java/io/swagger/api/PetApiService.java delete mode 100644 samples/server/petstore/jersey2/src/gen/java/io/swagger/api/StoreApi.java delete mode 100644 samples/server/petstore/jersey2/src/gen/java/io/swagger/api/StoreApiService.java delete mode 100644 samples/server/petstore/jersey2/src/gen/java/io/swagger/api/StringUtil.java delete mode 100644 samples/server/petstore/jersey2/src/gen/java/io/swagger/api/UserApi.java delete mode 100644 samples/server/petstore/jersey2/src/gen/java/io/swagger/api/UserApiService.java delete mode 100644 samples/server/petstore/jersey2/src/gen/java/io/swagger/model/ApiResponse.java delete mode 100644 samples/server/petstore/jersey2/src/gen/java/io/swagger/model/Category.java delete mode 100644 samples/server/petstore/jersey2/src/gen/java/io/swagger/model/Order.java delete mode 100644 samples/server/petstore/jersey2/src/gen/java/io/swagger/model/Pet.java delete mode 100644 samples/server/petstore/jersey2/src/gen/java/io/swagger/model/Tag.java delete mode 100644 samples/server/petstore/jersey2/src/gen/java/io/swagger/model/User.java delete mode 100644 samples/server/petstore/jersey2/src/main/java/io/swagger/api/Bootstrap.java delete mode 100644 samples/server/petstore/jersey2/src/main/java/io/swagger/api/factories/PetApiServiceFactory.java delete mode 100644 samples/server/petstore/jersey2/src/main/java/io/swagger/api/factories/StoreApiServiceFactory.java delete mode 100644 samples/server/petstore/jersey2/src/main/java/io/swagger/api/factories/UserApiServiceFactory.java delete mode 100644 samples/server/petstore/jersey2/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java delete mode 100644 samples/server/petstore/jersey2/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java delete mode 100644 samples/server/petstore/jersey2/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java delete mode 100644 samples/server/petstore/jersey2/src/main/webapp/WEB-INF/web.xml diff --git a/bin/jersey2-petstore-server.sh b/bin/jersey2-petstore-server.sh deleted file mode 100755 index d27379fd345..00000000000 --- a/bin/jersey2-petstore-server.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/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 jaxrs -o samples/server/petstore/jersey2 --library=jersey2 -DhideGenerationTimestamp=true" - -java $JAVA_OPTS -jar $executable $ags diff --git a/samples/server/petstore/jersey2/README.md b/samples/server/petstore/jersey2/README.md deleted file mode 100644 index 4e7da8b7f63..00000000000 --- a/samples/server/petstore/jersey2/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# Swagger Jersey 2 generated server - -## 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. - -This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework. - -To run the server, please execute the following: - -``` -mvn clean package jetty:run -``` - -You can then view the swagger listing here: - -``` -http://localhost:8080/v2/swagger.json -``` - -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/jersey2/pom.xml b/samples/server/petstore/jersey2/pom.xml deleted file mode 100644 index 4b70918e691..00000000000 --- a/samples/server/petstore/jersey2/pom.xml +++ /dev/null @@ -1,145 +0,0 @@ - - 4.0.0 - io.swagger - swagger-jaxrs-server - jar - swagger-jaxrs-server - 1.0.0 - - src/main/java - - - org.apache.maven.plugins - maven-war-plugin - 2.1.1 - - - maven-failsafe-plugin - 2.6 - - - - integration-test - verify - - - - - - org.eclipse.jetty - jetty-maven-plugin - ${jetty-version} - - - / - - target/${project.artifactId}-${project.version} - 8079 - stopit - - 8080 - 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} - - - - - sonatype-snapshots - https://oss.sonatype.org/content/repositories/snapshots - - true - - - - - 1.5.8 - 9.2.9.v20150224 - 2.6 - 1.6.3 - 4.8.1 - 1.0.1 - 2.5 - - \ No newline at end of file diff --git a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/ApiException.java b/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/ApiException.java deleted file mode 100644 index 97e535d3c21..00000000000 --- a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/ApiException.java +++ /dev/null @@ -1,10 +0,0 @@ -package io.swagger.api; - - -public class ApiException extends Exception{ - private int code; - public ApiException (int code, String msg) { - super(msg); - this.code = code; - } -} diff --git a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/ApiOriginFilter.java b/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/ApiOriginFilter.java deleted file mode 100644 index 38791eef046..00000000000 --- a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/ApiOriginFilter.java +++ /dev/null @@ -1,22 +0,0 @@ -package io.swagger.api; - -import java.io.IOException; - -import javax.servlet.*; -import javax.servlet.http.HttpServletResponse; - - -public class ApiOriginFilter implements javax.servlet.Filter { - public void doFilter(ServletRequest request, ServletResponse response, - FilterChain chain) throws IOException, ServletException { - HttpServletResponse res = (HttpServletResponse) response; - res.addHeader("Access-Control-Allow-Origin", "*"); - res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); - res.addHeader("Access-Control-Allow-Headers", "Content-Type"); - chain.doFilter(request, response); - } - - public void destroy() {} - - public void init(FilterConfig filterConfig) throws ServletException {} -} \ No newline at end of file diff --git a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/ApiResponseMessage.java b/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/ApiResponseMessage.java deleted file mode 100644 index 87db95c1009..00000000000 --- a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/ApiResponseMessage.java +++ /dev/null @@ -1,69 +0,0 @@ -package io.swagger.api; - -import javax.xml.bind.annotation.XmlTransient; - -@javax.xml.bind.annotation.XmlRootElement - -public class ApiResponseMessage { - public static final int ERROR = 1; - public static final int WARNING = 2; - public static final int INFO = 3; - public static final int OK = 4; - public static final int TOO_BUSY = 5; - - int code; - String type; - String message; - - public ApiResponseMessage(){} - - public ApiResponseMessage(int code, String message){ - this.code = code; - switch(code){ - case ERROR: - setType("error"); - break; - case WARNING: - setType("warning"); - break; - case INFO: - setType("info"); - break; - case OK: - setType("ok"); - break; - case TOO_BUSY: - setType("too busy"); - break; - default: - setType("unknown"); - break; - } - this.message = message; - } - - @XmlTransient - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } -} diff --git a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/Bootstrap.java b/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/Bootstrap.java deleted file mode 100644 index 0651af80f18..00000000000 --- a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/Bootstrap.java +++ /dev/null @@ -1,31 +0,0 @@ -package io.swagger.api; - -import io.swagger.jaxrs.config.SwaggerContextService; -import io.swagger.models.*; - -import io.swagger.models.auth.*; - -import javax.servlet.http.HttpServlet; -import javax.servlet.ServletContext; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; - -public class Bootstrap extends HttpServlet { - @Override - public void init(ServletConfig config) throws ServletException { - Info info = new Info() - .title("Swagger Server") - .description("This is a sample server Petstore server. You can find out more about\nSwagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n") - .termsOfService("http://swagger.io/terms/") - .contact(new Contact() - .email("apiteam@swagger.io")) - .license(new License() - .name("Apache 2.0") - .url("http://www.apache.org/licenses/LICENSE-2.0.html")); - - ServletContext context = config.getServletContext(); - Swagger swagger = new Swagger().info(info); - - new SwaggerContextService().withServletConfig(config).updateSwagger(swagger); - } -} diff --git a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/JacksonJsonProvider.java b/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/JacksonJsonProvider.java deleted file mode 100644 index 49792814c5e..00000000000 --- a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/JacksonJsonProvider.java +++ /dev/null @@ -1,19 +0,0 @@ -package io.swagger.api; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider; -import io.swagger.util.Json; - -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.ext.Provider; - -@Provider -@Produces({MediaType.APPLICATION_JSON}) -public class JacksonJsonProvider extends JacksonJaxbJsonProvider { - private static ObjectMapper commonMapper = Json.mapper(); - - public JacksonJsonProvider() { - super.setMapper(commonMapper); - } -} \ No newline at end of file diff --git a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/NotFoundException.java b/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/NotFoundException.java deleted file mode 100644 index b28b67ea4b2..00000000000 --- a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/NotFoundException.java +++ /dev/null @@ -1,10 +0,0 @@ -package io.swagger.api; - - -public class NotFoundException extends ApiException { - private int code; - public NotFoundException (int code, String msg) { - super(code, msg); - this.code = code; - } -} diff --git a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/PetApi.java deleted file mode 100644 index 1f9043ab85a..00000000000 --- a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/PetApi.java +++ /dev/null @@ -1,175 +0,0 @@ -package io.swagger.api; - -import io.swagger.model.*; -import io.swagger.api.PetApiService; -import io.swagger.api.factories.PetApiServiceFactory; - -import io.swagger.annotations.ApiParam; - -import io.swagger.model.Pet; -import io.swagger.model.ApiResponse; -import java.io.File; - -import java.util.List; -import io.swagger.api.NotFoundException; - -import java.io.InputStream; - -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; -import org.glassfish.jersey.media.multipart.FormDataParam; - -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 = PetApiServiceFactory.getPetApi(); - - @POST - - @Consumes({ "application/json", "application/xml" }) - @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = void.class, authorizations = { - @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { - @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") - }) - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = void.class) }) - public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body,@Context SecurityContext securityContext) - throws NotFoundException { - return delegate.addPet(body,securityContext); - } - @DELETE - @Path("/{petId}") - - @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = void.class, authorizations = { - @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { - @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") - }) - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class), - - @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = void.class) }) - 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("/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", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Pet.class, responseContainer = "List") }) - public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter",required=true) @QueryParam("status") List status,@Context SecurityContext securityContext) - throws NotFoundException { - return delegate.findPetsByStatus(status,securityContext); - } - @GET - @Path("/findByTags") - - @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Muliple tags can be provided with comma separated strings. Use\ntag1, tag2, tag3 for testing.\n", 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", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class, responseContainer = "List") }) - 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("/{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", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class), - - @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Pet.class) }) - 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 - - @Consumes({ "application/json", "application/xml" }) - @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = void.class, authorizations = { - @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { - @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") - }) - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class), - - @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = void.class), - - @io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = void.class) }) - public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body,@Context SecurityContext securityContext) - throws NotFoundException { - return delegate.updatePet(body,securityContext); - } - @POST - @Path("/{petId}") - @Consumes({ "application/x-www-form-urlencoded" }) - @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "null", response = void.class, authorizations = { - @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { - @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") - }) - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = void.class) }) - 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("/{petId}/uploadImage") - @Consumes({ "multipart/form-data" }) - @Produces({ "application/json" }) - @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ApiResponse.class, authorizations = { - @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { - @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") - }) - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ApiResponse.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")@FormDataParam("additionalMetadata") String additionalMetadata, - @FormDataParam("file") InputStream inputStream, - @FormDataParam("file") FormDataContentDisposition fileDetail,@Context SecurityContext securityContext) - throws NotFoundException { - return delegate.uploadFile(petId,additionalMetadata,inputStream, fileDetail,securityContext); - } -} diff --git a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/PetApiService.java b/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/PetApiService.java deleted file mode 100644 index 80d5170b242..00000000000 --- a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/PetApiService.java +++ /dev/null @@ -1,39 +0,0 @@ -package io.swagger.api; - -import io.swagger.api.*; -import io.swagger.model.*; - -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; - -import io.swagger.model.Pet; -import io.swagger.model.ApiResponse; -import java.io.File; - -import java.util.List; -import io.swagger.api.NotFoundException; - -import java.io.InputStream; - -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; - - -public abstract class PetApiService { - - public abstract Response addPet(Pet body,SecurityContext securityContext) throws NotFoundException; - - public abstract Response deletePet(Long petId,String apiKey,SecurityContext securityContext) throws NotFoundException; - - public abstract Response findPetsByStatus(List status,SecurityContext securityContext) throws NotFoundException; - - public abstract Response findPetsByTags(List tags,SecurityContext securityContext) throws NotFoundException; - - public abstract Response getPetById(Long petId,SecurityContext securityContext) throws NotFoundException; - - public abstract Response updatePet(Pet body,SecurityContext securityContext) throws NotFoundException; - - public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) throws NotFoundException; - - public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream inputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException; - -} diff --git a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/StoreApi.java deleted file mode 100644 index 2708e4b2cf9..00000000000 --- a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/StoreApi.java +++ /dev/null @@ -1,87 +0,0 @@ -package io.swagger.api; - -import io.swagger.model.*; -import io.swagger.api.StoreApiService; -import io.swagger.api.factories.StoreApiServiceFactory; - -import io.swagger.annotations.ApiParam; - -import java.util.Map; -import io.swagger.model.Order; - -import java.util.List; -import io.swagger.api.NotFoundException; - -import java.io.InputStream; - -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; -import org.glassfish.jersey.media.multipart.FormDataParam; - -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; -import javax.ws.rs.*; - -@Path("/store") - - -@io.swagger.annotations.Api(description = "the store API") - -public class StoreApi { - private final StoreApiService delegate = StoreApiServiceFactory.getStoreApi(); - - @DELETE - @Path("/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 positive integer value.\\ \\ Negative or non-integer values will generate API errors", response = void.class, tags={ "store", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class), - - @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = void.class) }) - public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("orderId") Long orderId,@Context SecurityContext securityContext) - throws NotFoundException { - return delegate.deleteOrder(orderId,securityContext); - } - @GET - @Path("/inventory") - - @Produces({ "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - @io.swagger.annotations.Authorization(value = "api_key") - }, tags={ "store", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") }) - public Response getInventory(@Context SecurityContext securityContext) - throws NotFoundException { - return delegate.getInventory(securityContext); - } - @GET - @Path("/order/{orderId}") - - @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value >= 1 and <= 10.\nOther values will generated exceptions\n", response = Order.class, tags={ "store", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class), - - @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Order.class) }) - public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") Long orderId,@Context SecurityContext securityContext) - throws NotFoundException { - return delegate.getOrderById(orderId,securityContext); - } - @POST - @Path("/order") - - @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Order.class) }) - public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body,@Context SecurityContext securityContext) - throws NotFoundException { - return delegate.placeOrder(body,securityContext); - } -} diff --git a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/StoreApiService.java b/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/StoreApiService.java deleted file mode 100644 index 43078d32756..00000000000 --- a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/StoreApiService.java +++ /dev/null @@ -1,30 +0,0 @@ -package io.swagger.api; - -import io.swagger.api.*; -import io.swagger.model.*; - -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; - -import java.util.Map; -import io.swagger.model.Order; - -import java.util.List; -import io.swagger.api.NotFoundException; - -import java.io.InputStream; - -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; - - -public abstract class StoreApiService { - - public abstract Response deleteOrder(Long orderId,SecurityContext securityContext) throws NotFoundException; - - public abstract Response getInventory(SecurityContext securityContext) throws NotFoundException; - - public abstract Response getOrderById(Long orderId,SecurityContext securityContext) throws NotFoundException; - - public abstract Response placeOrder(Order body,SecurityContext securityContext) throws NotFoundException; - -} diff --git a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/StringUtil.java b/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/StringUtil.java deleted file mode 100644 index 6f4a3dadbbf..00000000000 --- a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/StringUtil.java +++ /dev/null @@ -1,42 +0,0 @@ -package io.swagger.api; - - -public class StringUtil { - /** - * Check if the given array contains the given value (with case-insensitive comparison). - * - * @param array The array - * @param value The value to search - * @return true if the array contains the value - */ - public static boolean containsIgnoreCase(String[] array, String value) { - for (String str : array) { - if (value == null && str == null) return true; - if (value != null && value.equalsIgnoreCase(str)) return true; - } - return false; - } - - /** - * Join an array of strings with the given separator. - *

- * Note: This might be replaced by utility method from commons-lang or guava someday - * if one of those libraries is added as dependency. - *

- * - * @param array The array of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(String[] array, String separator) { - int len = array.length; - if (len == 0) return ""; - - StringBuilder out = new StringBuilder(); - out.append(array[0]); - for (int i = 1; i < len; i++) { - out.append(separator).append(array[i]); - } - return out.toString(); - } -} diff --git a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/UserApi.java deleted file mode 100644 index cf4af7071eb..00000000000 --- a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/UserApi.java +++ /dev/null @@ -1,131 +0,0 @@ -package io.swagger.api; - -import io.swagger.model.*; -import io.swagger.api.UserApiService; -import io.swagger.api.factories.UserApiServiceFactory; - -import io.swagger.annotations.ApiParam; - -import io.swagger.model.User; -import java.util.List; - -import java.util.List; -import io.swagger.api.NotFoundException; - -import java.io.InputStream; - -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; -import org.glassfish.jersey.media.multipart.FormDataParam; - -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; -import javax.ws.rs.*; - -@Path("/user") - - -@io.swagger.annotations.Api(description = "the user API") - -public class UserApi { - private final UserApiService delegate = UserApiServiceFactory.getUserApi(); - - @POST - - - @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.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) }) - public Response createUser(@ApiParam(value = "Created user object" ,required=true) User body,@Context SecurityContext securityContext) - throws NotFoundException { - return delegate.createUser(body,securityContext); - } - @POST - @Path("/createWithArray") - - @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) }) - public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) List body,@Context SecurityContext securityContext) - throws NotFoundException { - return delegate.createUsersWithArrayInput(body,securityContext); - } - @POST - @Path("/createWithList") - - @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) }) - public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) List body,@Context SecurityContext securityContext) - throws NotFoundException { - return delegate.createUsersWithListInput(body,securityContext); - } - @DELETE - @Path("/{username}") - - @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = void.class), - - @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = void.class) }) - public Response deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username,@Context SecurityContext securityContext) - throws NotFoundException { - return delegate.deleteUser(username,securityContext); - } - @GET - @Path("/{username}") - - @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = User.class), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = User.class), - - @io.swagger.annotations.ApiResponse(code = 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,@Context SecurityContext securityContext) - throws NotFoundException { - return delegate.getUserByName(username,securityContext); - } - @GET - @Path("/login") - - @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = String.class) }) - public Response loginUser(@ApiParam(value = "The user name for login",required=true) @QueryParam("username") String username,@ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password,@Context SecurityContext securityContext) - throws NotFoundException { - return delegate.loginUser(username,password,securityContext); - } - @GET - @Path("/logout") - - @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Logs out current logged in user session", notes = "null", response = void.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) }) - public Response logoutUser(@Context SecurityContext securityContext) - throws NotFoundException { - return delegate.logoutUser(securityContext); - } - @PUT - @Path("/{username}") - - @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = void.class), - - @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = void.class) }) - public Response updateUser(@ApiParam(value = "name that need to be updated",required=true) @PathParam("username") String username,@ApiParam(value = "Updated user object" ,required=true) User body,@Context SecurityContext securityContext) - throws NotFoundException { - return delegate.updateUser(username,body,securityContext); - } -} diff --git a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/UserApiService.java b/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/UserApiService.java deleted file mode 100644 index 0cfc9c1fb35..00000000000 --- a/samples/server/petstore/jersey2/src/gen/java/io/swagger/api/UserApiService.java +++ /dev/null @@ -1,38 +0,0 @@ -package io.swagger.api; - -import io.swagger.api.*; -import io.swagger.model.*; - -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; - -import io.swagger.model.User; -import java.util.List; - -import java.util.List; -import io.swagger.api.NotFoundException; - -import java.io.InputStream; - -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; - - -public abstract class UserApiService { - - public abstract Response createUser(User body,SecurityContext securityContext) throws NotFoundException; - - public abstract Response createUsersWithArrayInput(List body,SecurityContext securityContext) throws NotFoundException; - - public abstract Response createUsersWithListInput(List body,SecurityContext securityContext) throws NotFoundException; - - public abstract Response deleteUser(String username,SecurityContext securityContext) throws NotFoundException; - - public abstract Response getUserByName(String username,SecurityContext securityContext) throws NotFoundException; - - public abstract Response loginUser(String username,String password,SecurityContext securityContext) throws NotFoundException; - - public abstract Response logoutUser(SecurityContext securityContext) throws NotFoundException; - - public abstract Response updateUser(String username,User body,SecurityContext securityContext) throws NotFoundException; - -} diff --git a/samples/server/petstore/jersey2/src/gen/java/io/swagger/model/ApiResponse.java b/samples/server/petstore/jersey2/src/gen/java/io/swagger/model/ApiResponse.java deleted file mode 100644 index dd6bcbf2cb1..00000000000 --- a/samples/server/petstore/jersey2/src/gen/java/io/swagger/model/ApiResponse.java +++ /dev/null @@ -1,117 +0,0 @@ -package io.swagger.model; - -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - - - - - - -public class ApiResponse { - - private Integer code = null; - private String type = null; - private String message = null; - - - /** - **/ - public ApiResponse code(Integer code) { - this.code = code; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("code") - public Integer getCode() { - return code; - } - public void setCode(Integer code) { - this.code = code; - } - - - /** - **/ - public ApiResponse type(String type) { - this.type = type; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("type") - public String getType() { - return type; - } - public void setType(String type) { - this.type = type; - } - - - /** - **/ - public ApiResponse message(String message) { - this.message = message; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("message") - public String getMessage() { - return message; - } - public void setMessage(String message) { - this.message = message; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApiResponse apiResponse = (ApiResponse) o; - return Objects.equals(code, apiResponse.code) && - Objects.equals(type, apiResponse.type) && - Objects.equals(message, apiResponse.message); - } - - @Override - public int hashCode() { - return Objects.hash(code, type, message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApiResponse {\n"); - - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jersey2/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jersey2/src/gen/java/io/swagger/model/Category.java deleted file mode 100644 index fd27ccac1c4..00000000000 --- a/samples/server/petstore/jersey2/src/gen/java/io/swagger/model/Category.java +++ /dev/null @@ -1,96 +0,0 @@ -package io.swagger.model; - -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - - - - - - -public class Category { - - private Long id = null; - private String name = null; - - - /** - **/ - public Category id(Long id) { - this.id = id; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("id") - public Long getId() { - return id; - } - public void setId(Long id) { - this.id = id; - } - - - /** - **/ - public Category name(String name) { - this.name = name; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("name") - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Category category = (Category) o; - return Objects.equals(id, category.id) && - Objects.equals(name, category.name); - } - - @Override - public int hashCode() { - return Objects.hash(id, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Category {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jersey2/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jersey2/src/gen/java/io/swagger/model/Order.java deleted file mode 100644 index 0dd4222776c..00000000000 --- a/samples/server/petstore/jersey2/src/gen/java/io/swagger/model/Order.java +++ /dev/null @@ -1,203 +0,0 @@ -package io.swagger.model; - -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.Date; - - - - - - -public class Order { - - private Long id = null; - private Long petId = null; - private Integer quantity = null; - private Date shipDate = null; - - - public enum StatusEnum { - PLACED("placed"), - APPROVED("approved"), - DELIVERED("delivered"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return value; - } - } - - private StatusEnum status = null; - private Boolean complete = false; - - - /** - **/ - public Order id(Long id) { - this.id = id; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("id") - public Long getId() { - return id; - } - public void setId(Long id) { - this.id = id; - } - - - /** - **/ - public Order petId(Long petId) { - this.petId = petId; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("petId") - public Long getPetId() { - return petId; - } - public void setPetId(Long petId) { - this.petId = petId; - } - - - /** - **/ - public Order quantity(Integer quantity) { - this.quantity = quantity; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("quantity") - public Integer getQuantity() { - return quantity; - } - public void setQuantity(Integer quantity) { - this.quantity = quantity; - } - - - /** - **/ - public Order shipDate(Date shipDate) { - this.shipDate = shipDate; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("shipDate") - public Date getShipDate() { - return shipDate; - } - public void setShipDate(Date shipDate) { - this.shipDate = shipDate; - } - - - /** - * Order Status - **/ - public Order status(StatusEnum status) { - this.status = status; - return this; - } - - - @ApiModelProperty(value = "Order Status") - @JsonProperty("status") - public StatusEnum getStatus() { - return status; - } - public void setStatus(StatusEnum status) { - this.status = status; - } - - - /** - **/ - public Order complete(Boolean complete) { - this.complete = complete; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("complete") - public Boolean getComplete() { - return complete; - } - public void setComplete(Boolean complete) { - this.complete = complete; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Order order = (Order) o; - return Objects.equals(id, order.id) && - Objects.equals(petId, order.petId) && - Objects.equals(quantity, order.quantity) && - Objects.equals(shipDate, order.shipDate) && - Objects.equals(status, order.status) && - Objects.equals(complete, order.complete); - } - - @Override - public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Order {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jersey2/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jersey2/src/gen/java/io/swagger/model/Pet.java deleted file mode 100644 index 64032c00f8b..00000000000 --- a/samples/server/petstore/jersey2/src/gen/java/io/swagger/model/Pet.java +++ /dev/null @@ -1,201 +0,0 @@ -package io.swagger.client.model; - -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import io.swagger.client.model.Tag; -import java.util.ArrayList; -import java.util.List; - - -/** - * InlineResponse200 - */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T22:48:50.833+08:00") -public class InlineResponse200 { - - private List photoUrls = new ArrayList(); - private String name = null; - private Long id = null; - private Object category = null; - private List tags = new ArrayList(); - - /** - * pet status in the store - */ - public enum StatusEnum { - AVAILABLE("available"), - PENDING("pending"), - SOLD("sold"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - } - - private StatusEnum status = null; - - - /** - **/ - public InlineResponse200 photoUrls(List photoUrls) { - this.photoUrls = photoUrls; - return this; - } - - @ApiModelProperty(example = "null", value = "") - @JsonProperty("photoUrls") - public List getPhotoUrls() { - return photoUrls; - } - public void setPhotoUrls(List photoUrls) { - this.photoUrls = photoUrls; - } - - - /** - **/ - public InlineResponse200 name(String name) { - this.name = name; - return this; - } - - @ApiModelProperty(example = "doggie", value = "") - @JsonProperty("name") - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - - - /** - **/ - public InlineResponse200 id(Long id) { - this.id = id; - return this; - } - - @ApiModelProperty(example = "null", required = true, value = "") - @JsonProperty("id") - public Long getId() { - return id; - } - public void setId(Long id) { - this.id = id; - } - - - /** - **/ - public InlineResponse200 category(Object category) { - this.category = category; - return this; - } - - @ApiModelProperty(example = "null", value = "") - @JsonProperty("category") - public Object getCategory() { - return category; - } - public void setCategory(Object category) { - this.category = category; - } - - - /** - **/ - public InlineResponse200 tags(List tags) { - this.tags = tags; - return this; - } - - @ApiModelProperty(example = "null", value = "") - @JsonProperty("tags") - public List getTags() { - return tags; - } - public void setTags(List tags) { - this.tags = tags; - } - - - /** - * pet status in the store - **/ - public InlineResponse200 status(StatusEnum status) { - this.status = status; - return this; - } - - @ApiModelProperty(example = "null", value = "pet status in the store") - @JsonProperty("status") - public StatusEnum getStatus() { - return status; - } - public void setStatus(StatusEnum status) { - this.status = status; - } - - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InlineResponse200 inlineResponse200 = (InlineResponse200) o; - return Objects.equals(this.photoUrls, inlineResponse200.photoUrls) && - Objects.equals(this.name, inlineResponse200.name) && - Objects.equals(this.id, inlineResponse200.id) && - Objects.equals(this.category, inlineResponse200.category) && - Objects.equals(this.tags, inlineResponse200.tags) && - Objects.equals(this.status, inlineResponse200.status); - } - - @Override - public int hashCode() { - return Objects.hash(photoUrls, name, id, category, tags, status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InlineResponse200 {\n"); - - sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" category: ").append(toIndentedString(category)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jersey2/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jersey2/src/gen/java/io/swagger/model/Tag.java deleted file mode 100644 index b46638ccb69..00000000000 --- a/samples/server/petstore/jersey2/src/gen/java/io/swagger/model/Tag.java +++ /dev/null @@ -1,96 +0,0 @@ -package io.swagger.model; - -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - - - - - - -public class Tag { - - private Long id = null; - private String name = null; - - - /** - **/ - public Tag id(Long id) { - this.id = id; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("id") - public Long getId() { - return id; - } - public void setId(Long id) { - this.id = id; - } - - - /** - **/ - public Tag name(String name) { - this.name = name; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("name") - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Tag tag = (Tag) o; - return Objects.equals(id, tag.id) && - Objects.equals(name, tag.name); - } - - @Override - public int hashCode() { - return Objects.hash(id, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Tag {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jersey2/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jersey2/src/gen/java/io/swagger/model/User.java deleted file mode 100644 index 7f18c02f599..00000000000 --- a/samples/server/petstore/jersey2/src/gen/java/io/swagger/model/User.java +++ /dev/null @@ -1,223 +0,0 @@ -package io.swagger.model; - -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - - - - - - -public class User { - - private Long id = null; - private String username = null; - private String firstName = null; - private String lastName = null; - private String email = null; - private String password = null; - private String phone = null; - private Integer userStatus = null; - - - /** - **/ - public User id(Long id) { - this.id = id; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("id") - public Long getId() { - return id; - } - public void setId(Long id) { - this.id = id; - } - - - /** - **/ - public User username(String username) { - this.username = username; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("username") - public String getUsername() { - return username; - } - public void setUsername(String username) { - this.username = username; - } - - - /** - **/ - public User firstName(String firstName) { - this.firstName = firstName; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("firstName") - public String getFirstName() { - return firstName; - } - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - - /** - **/ - public User lastName(String lastName) { - this.lastName = lastName; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("lastName") - public String getLastName() { - return lastName; - } - public void setLastName(String lastName) { - this.lastName = lastName; - } - - - /** - **/ - public User email(String email) { - this.email = email; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("email") - public String getEmail() { - return email; - } - public void setEmail(String email) { - this.email = email; - } - - - /** - **/ - public User password(String password) { - this.password = password; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("password") - public String getPassword() { - return password; - } - public void setPassword(String password) { - this.password = password; - } - - - /** - **/ - public User phone(String phone) { - this.phone = phone; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("phone") - public String getPhone() { - return phone; - } - public void setPhone(String phone) { - this.phone = phone; - } - - - /** - * User Status - **/ - public User userStatus(Integer userStatus) { - this.userStatus = userStatus; - return this; - } - - - @ApiModelProperty(value = "User Status") - @JsonProperty("userStatus") - public Integer getUserStatus() { - return userStatus; - } - public void setUserStatus(Integer userStatus) { - this.userStatus = userStatus; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - User user = (User) o; - return Objects.equals(id, user.id) && - Objects.equals(username, user.username) && - Objects.equals(firstName, user.firstName) && - Objects.equals(lastName, user.lastName) && - Objects.equals(email, user.email) && - Objects.equals(password, user.password) && - Objects.equals(phone, user.phone) && - Objects.equals(userStatus, user.userStatus); - } - - @Override - public int hashCode() { - return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class User {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jersey2/src/main/java/io/swagger/api/Bootstrap.java b/samples/server/petstore/jersey2/src/main/java/io/swagger/api/Bootstrap.java deleted file mode 100644 index 0651af80f18..00000000000 --- a/samples/server/petstore/jersey2/src/main/java/io/swagger/api/Bootstrap.java +++ /dev/null @@ -1,31 +0,0 @@ -package io.swagger.api; - -import io.swagger.jaxrs.config.SwaggerContextService; -import io.swagger.models.*; - -import io.swagger.models.auth.*; - -import javax.servlet.http.HttpServlet; -import javax.servlet.ServletContext; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; - -public class Bootstrap extends HttpServlet { - @Override - public void init(ServletConfig config) throws ServletException { - Info info = new Info() - .title("Swagger Server") - .description("This is a sample server Petstore server. You can find out more about\nSwagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n") - .termsOfService("http://swagger.io/terms/") - .contact(new Contact() - .email("apiteam@swagger.io")) - .license(new License() - .name("Apache 2.0") - .url("http://www.apache.org/licenses/LICENSE-2.0.html")); - - ServletContext context = config.getServletContext(); - Swagger swagger = new Swagger().info(info); - - new SwaggerContextService().withServletConfig(config).updateSwagger(swagger); - } -} diff --git a/samples/server/petstore/jersey2/src/main/java/io/swagger/api/factories/PetApiServiceFactory.java b/samples/server/petstore/jersey2/src/main/java/io/swagger/api/factories/PetApiServiceFactory.java deleted file mode 100644 index 50f0288b26c..00000000000 --- a/samples/server/petstore/jersey2/src/main/java/io/swagger/api/factories/PetApiServiceFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -package io.swagger.api.factories; - -import io.swagger.api.PetApiService; -import io.swagger.api.impl.PetApiServiceImpl; - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-04-02T18:35:30.846-06:00") -public class PetApiServiceFactory { - private final static PetApiService service = new PetApiServiceImpl(); - - public static PetApiService getPetApi() { - return service; - } -} diff --git a/samples/server/petstore/jersey2/src/main/java/io/swagger/api/factories/StoreApiServiceFactory.java b/samples/server/petstore/jersey2/src/main/java/io/swagger/api/factories/StoreApiServiceFactory.java deleted file mode 100644 index 46ebd48a86f..00000000000 --- a/samples/server/petstore/jersey2/src/main/java/io/swagger/api/factories/StoreApiServiceFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -package io.swagger.api.factories; - -import io.swagger.api.StoreApiService; -import io.swagger.api.impl.StoreApiServiceImpl; - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-04-02T18:35:30.846-06:00") -public class StoreApiServiceFactory { - private final static StoreApiService service = new StoreApiServiceImpl(); - - public static StoreApiService getStoreApi() { - return service; - } -} diff --git a/samples/server/petstore/jersey2/src/main/java/io/swagger/api/factories/UserApiServiceFactory.java b/samples/server/petstore/jersey2/src/main/java/io/swagger/api/factories/UserApiServiceFactory.java deleted file mode 100644 index 9703e297248..00000000000 --- a/samples/server/petstore/jersey2/src/main/java/io/swagger/api/factories/UserApiServiceFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -package io.swagger.api.factories; - -import io.swagger.api.UserApiService; -import io.swagger.api.impl.UserApiServiceImpl; - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-04-02T18:35:30.846-06:00") -public class UserApiServiceFactory { - private final static UserApiService service = new UserApiServiceImpl(); - - public static UserApiService getUserApi() { - return service; - } -} diff --git a/samples/server/petstore/jersey2/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jersey2/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java deleted file mode 100644 index fead74f3b6c..00000000000 --- a/samples/server/petstore/jersey2/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java +++ /dev/null @@ -1,71 +0,0 @@ -package io.swagger.api.impl; - -import io.swagger.api.*; -import io.swagger.model.*; - -import io.swagger.model.Pet; -import io.swagger.model.ApiResponse; -import java.io.File; - -import java.util.List; -import io.swagger.api.NotFoundException; - -import java.io.InputStream; - -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; - -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-04-02T18:35:30.846-06:00") -public class PetApiServiceImpl extends PetApiService { - - @Override - public Response addPet(Pet body, SecurityContext securityContext) throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - - @Override - public Response deletePet(Long petId, String apiKey, SecurityContext securityContext) throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - - @Override - public Response findPetsByStatus(List status, SecurityContext securityContext) throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - - @Override - public Response findPetsByTags(List tags, SecurityContext securityContext) throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - - @Override - public Response getPetById(Long petId, SecurityContext securityContext) throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - - @Override - public Response updatePet(Pet body, SecurityContext securityContext) throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - - @Override - public Response updatePetWithForm(Long petId, String name, String status, SecurityContext securityContext) throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - - @Override - public Response uploadFile(Long petId, String additionalMetadata, InputStream inputStream, FormDataContentDisposition fileDetail, SecurityContext securityContext) throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - -} diff --git a/samples/server/petstore/jersey2/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jersey2/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java deleted file mode 100644 index 176e893db35..00000000000 --- a/samples/server/petstore/jersey2/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -package io.swagger.api.impl; - -import io.swagger.api.*; -import io.swagger.model.*; - -import java.util.Map; -import io.swagger.model.Order; - -import java.util.List; -import io.swagger.api.NotFoundException; - -import java.io.InputStream; - -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; - -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-04-02T18:35:30.846-06:00") -public class StoreApiServiceImpl extends StoreApiService { - - @Override - public Response deleteOrder(Long orderId, SecurityContext securityContext) throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - - @Override - public Response getInventory(SecurityContext securityContext) throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - - @Override - public Response getOrderById(Long orderId, SecurityContext securityContext) throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - - @Override - public Response placeOrder(Order body, SecurityContext securityContext) throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - -} diff --git a/samples/server/petstore/jersey2/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jersey2/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java deleted file mode 100644 index 1c4d449a7bd..00000000000 --- a/samples/server/petstore/jersey2/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -package io.swagger.api.impl; - -import io.swagger.api.*; -import io.swagger.model.*; - -import io.swagger.model.User; -import java.util.List; - -import java.util.List; -import io.swagger.api.NotFoundException; - -import java.io.InputStream; - -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; - -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-04-02T18:35:30.846-06:00") -public class UserApiServiceImpl extends UserApiService { - - @Override - public Response createUser(User body, SecurityContext securityContext) throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - - @Override - public Response createUsersWithArrayInput(List body, SecurityContext securityContext) throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - - @Override - public Response createUsersWithListInput(List body, SecurityContext securityContext) throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - - @Override - public Response deleteUser(String username, SecurityContext securityContext) throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - - @Override - public Response getUserByName(String username, SecurityContext securityContext) throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - - @Override - public Response loginUser(String username, String password, SecurityContext securityContext) throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - - @Override - public Response logoutUser(SecurityContext securityContext) throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - - @Override - public Response updateUser(String username, User body, SecurityContext securityContext) throws NotFoundException { - // do some magic! - return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); - } - -} diff --git a/samples/server/petstore/jersey2/src/main/webapp/WEB-INF/web.xml b/samples/server/petstore/jersey2/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 66837dccab8..00000000000 --- a/samples/server/petstore/jersey2/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - jersey - org.glassfish.jersey.servlet.ServletContainer - - jersey.config.server.provider.packages - - io.swagger.jaxrs.listing, - io.swagger.sample.resource, - io.swagger.api - - - - jersey.config.server.provider.classnames - org.glassfish.jersey.media.multipart.MultiPartFeature - - - jersey.config.server.wadl.disableWadl - true - - 1 - - - - Jersey2Config - io.swagger.jersey.config.JerseyJaxrsConfig - - api.version - 1.0.0 - - - swagger.api.title - Swagger Server - - - swagger.api.basepath - http://petstore.swagger.io/v2 - - - 2 - - - Bootstrap - io.swagger.api.Bootstrap - 2 - - - jersey - /v2/* - - - ApiOriginFilter - io.swagger.api.ApiOriginFilter - - - ApiOriginFilter - /* - -