From 1b2d918232f11f96451d74f7db761d8d1bc883da Mon Sep 17 00:00:00 2001 From: Jeremie Bresson Date: Wed, 21 Mar 2018 17:36:15 +0100 Subject: [PATCH] Fix sh script for 'jaxrs-cxf-client' and generate sample --- bin/jaxrs-cxf-client-petstore.sh | 2 +- .../jaxrs-cxf-client/.swagger-codegen-ignore | 2 - .../jaxrs-cxf-client/.swagger-codegen/VERSION | 2 +- .../client/petstore/jaxrs-cxf-client/pom.xml | 34 ++------- .../src/gen/java/io/swagger/api/PetApi.java | 50 +++++++------ .../src/gen/java/io/swagger/api/StoreApi.java | 27 ++++--- .../src/gen/java/io/swagger/api/UserApi.java | 51 +++++++------ .../gen/java/io/swagger/model/Category.java | 1 - .../io/swagger/model/ModelApiResponse.java | 1 - .../src/gen/java/io/swagger/model/Order.java | 1 - .../src/gen/java/io/swagger/model/Pet.java | 3 - .../src/gen/java/io/swagger/model/Tag.java | 1 - .../src/gen/java/io/swagger/model/User.java | 1 - .../swagger/api/impl/PetApiServiceImpl.java | 71 ------------------- .../swagger/api/impl/StoreApiServiceImpl.java | 46 ------------ .../swagger/api/impl/UserApiServiceImpl.java | 70 ------------------ .../test/java/io/swagger/api/PetApiTest.java | 6 +- .../java/io/swagger/api/StoreApiTest.java | 7 +- .../test/java/io/swagger/api/UserApiTest.java | 7 +- 19 files changed, 82 insertions(+), 301 deletions(-) delete mode 100644 samples/client/petstore/jaxrs-cxf-client/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java delete mode 100644 samples/client/petstore/jaxrs-cxf-client/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java delete mode 100644 samples/client/petstore/jaxrs-cxf-client/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java diff --git a/bin/jaxrs-cxf-client-petstore.sh b/bin/jaxrs-cxf-client-petstore.sh index a0d30ea29ff..227618b0cb4 100755 --- a/bin/jaxrs-cxf-client-petstore.sh +++ b/bin/jaxrs-cxf-client-petstore.sh @@ -26,6 +26,6 @@ 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 --artifact-id "jaxrs-cxf-petstore-client" -t modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/ -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l jaxrs-cxf -o samples/client/petstore/jaxrs-cxf-client/" +ags="$@ generate --artifact-id "jaxrs-cxf-petstore-client" -t modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/ -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l jaxrs-cxf-client -o samples/client/petstore/jaxrs-cxf-client/" java $JAVA_OPTS -jar $executable $ags diff --git a/samples/client/petstore/jaxrs-cxf-client/.swagger-codegen-ignore b/samples/client/petstore/jaxrs-cxf-client/.swagger-codegen-ignore index 70b88e71039..c5fa491b4c5 100644 --- a/samples/client/petstore/jaxrs-cxf-client/.swagger-codegen-ignore +++ b/samples/client/petstore/jaxrs-cxf-client/.swagger-codegen-ignore @@ -21,5 +21,3 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md - -**/impl/* \ No newline at end of file diff --git a/samples/client/petstore/jaxrs-cxf-client/.swagger-codegen/VERSION b/samples/client/petstore/jaxrs-cxf-client/.swagger-codegen/VERSION index 50794f17f1a..855ff9501eb 100644 --- a/samples/client/petstore/jaxrs-cxf-client/.swagger-codegen/VERSION +++ b/samples/client/petstore/jaxrs-cxf-client/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.1-SNAPSHOT \ No newline at end of file +2.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/jaxrs-cxf-client/pom.xml b/samples/client/petstore/jaxrs-cxf-client/pom.xml index 2a3b7a5ed31..1ec025434d5 100644 --- a/samples/client/petstore/jaxrs-cxf-client/pom.xml +++ b/samples/client/petstore/jaxrs-cxf-client/pom.xml @@ -2,7 +2,7 @@ 4.0.0 io.swagger jaxrs-cxf-petstore-client - war + jar jaxrs-cxf-petstore-client This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. 1.0.0 @@ -33,7 +33,7 @@ 8079 stopit - 8080 + 60000 @@ -77,15 +77,6 @@ - - - - maven-war-plugin - 3.1.0 - - false - - @@ -113,13 +104,6 @@ ${junit-version} test - - - javax.validation - validation-api - ${beanvalidation-version} - provided - org.apache.cxf @@ -141,12 +125,6 @@ ${cxf-version} compile - - org.apache.cxf - cxf-rt-rs-service-description-swagger - ${cxf-version} - compile - org.apache.cxf cxf-rt-ws-policy @@ -166,10 +144,9 @@ compile - com.fasterxml.jackson.datatype - jackson-datatype-joda - ${jackson-jaxrs-version} - compile + com.fasterxml.jackson.datatype + jackson-datatype-joda + ${jackson-jaxrs-version} @@ -190,7 +167,6 @@ 4.12 1.1.7 2.5 - 1.1.0.Final 3.2.1 2.9.1 UTF-8 diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/api/PetApi.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/api/PetApi.java index f8b8a10d288..fcdff549032 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/api/PetApi.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/api/PetApi.java @@ -18,8 +18,6 @@ import io.swagger.annotations.ApiResponses; import io.swagger.annotations.ApiResponse; import io.swagger.jaxrs.PATCH; -import javax.validation.constraints.*; -import javax.validation.Valid; /** * Swagger Petstore @@ -41,10 +39,10 @@ public interface PetApi { @Path("/pet") @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Add a new pet to the store", tags={ "pet", }) + @ApiOperation(value = "Add a new pet to the store", tags={ }) @ApiResponses(value = { - @ApiResponse(code = 405, message = "Invalid input") }) - public void addPet(@Valid Pet body); + @ApiResponse(code = 405, message = "Invalid input", response = .class) }) + public void addPet(Pet body); /** * Deletes a pet @@ -55,9 +53,9 @@ public interface PetApi { @DELETE @Path("/pet/{petId}") @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Deletes a pet", tags={ "pet", }) + @ApiOperation(value = "Deletes a pet", tags={ }) @ApiResponses(value = { - @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiResponse(code = 400, message = "Invalid pet value", response = .class) }) public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey); /** @@ -69,11 +67,11 @@ public interface PetApi { @GET @Path("/pet/findByStatus") @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Finds Pets by status", tags={ "pet", }) + @ApiOperation(value = "Finds Pets by status", tags={ }) @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - @ApiResponse(code = 400, message = "Invalid status value") }) - public List findPetsByStatus(@QueryParam("status") @NotNull List status); + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), + @ApiResponse(code = 400, message = "Invalid status value", response = .class) }) + public List findPetsByStatus(@QueryParam("status")List status); /** * Finds Pets by tags @@ -84,11 +82,11 @@ public interface PetApi { @GET @Path("/pet/findByTags") @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Finds Pets by tags", tags={ "pet", }) + @ApiOperation(value = "Finds Pets by tags", tags={ }) @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - @ApiResponse(code = 400, message = "Invalid tag value") }) - public List findPetsByTags(@QueryParam("tags") @NotNull List tags); + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), + @ApiResponse(code = 400, message = "Invalid tag value", response = .class) }) + public List findPetsByTags(@QueryParam("tags")List tags); /** * Find pet by ID @@ -99,11 +97,11 @@ public interface PetApi { @GET @Path("/pet/{petId}") @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Find pet by ID", tags={ "pet", }) + @ApiOperation(value = "Find pet by ID", tags={ }) @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") }) + @ApiResponse(code = 400, message = "Invalid ID supplied", response = .class), + @ApiResponse(code = 404, message = "Pet not found", response = .class) }) public Pet getPetById(@PathParam("petId") Long petId); /** @@ -116,12 +114,12 @@ public interface PetApi { @Path("/pet") @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Update an existing pet", tags={ "pet", }) + @ApiOperation(value = "Update an existing pet", tags={ }) @ApiResponses(value = { - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - @ApiResponse(code = 405, message = "Validation exception") }) - public void updatePet(@Valid Pet body); + @ApiResponse(code = 400, message = "Invalid ID supplied", response = .class), + @ApiResponse(code = 404, message = "Pet not found", response = .class), + @ApiResponse(code = 405, message = "Validation exception", response = .class) }) + public void updatePet(Pet body); /** * Updates a pet in the store with form data @@ -133,9 +131,9 @@ public interface PetApi { @Path("/pet/{petId}") @Consumes({ "application/x-www-form-urlencoded" }) @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Updates a pet in the store with form data", tags={ "pet", }) + @ApiOperation(value = "Updates a pet in the store with form data", tags={ }) @ApiResponses(value = { - @ApiResponse(code = 405, message = "Invalid input") }) + @ApiResponse(code = 405, message = "Invalid input", response = .class) }) public void updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status); /** @@ -148,7 +146,7 @@ public interface PetApi { @Path("/pet/{petId}/uploadImage") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - @ApiOperation(value = "uploads an image", tags={ "pet" }) + @ApiOperation(value = "uploads an image", tags={ }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment fileDetail); diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/api/StoreApi.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/api/StoreApi.java index 72508ea286a..5f127a02189 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/api/StoreApi.java @@ -1,6 +1,5 @@ package io.swagger.api; -import java.util.Map; import io.swagger.model.Order; import java.io.InputStream; @@ -17,8 +16,6 @@ import io.swagger.annotations.ApiResponses; import io.swagger.annotations.ApiResponse; import io.swagger.jaxrs.PATCH; -import javax.validation.constraints.*; -import javax.validation.Valid; /** * Swagger Petstore @@ -39,10 +36,10 @@ public interface StoreApi { @DELETE @Path("/store/order/{orderId}") @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Delete purchase order by ID", tags={ "store", }) + @ApiOperation(value = "Delete purchase order by ID", tags={ }) @ApiResponses(value = { - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Order not found") }) + @ApiResponse(code = 400, message = "Invalid ID supplied", response = .class), + @ApiResponse(code = 404, message = "Order not found", response = .class) }) public void deleteOrder(@PathParam("orderId") String orderId); /** @@ -54,9 +51,9 @@ public interface StoreApi { @GET @Path("/store/inventory") @Produces({ "application/json" }) - @ApiOperation(value = "Returns pet inventories by status", tags={ "store", }) + @ApiOperation(value = "Returns pet inventories by status", tags={ }) @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "map") }) public Map getInventory(); /** @@ -68,12 +65,12 @@ public interface StoreApi { @GET @Path("/store/order/{orderId}") @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Find purchase order by ID", tags={ "store", }) + @ApiOperation(value = "Find purchase order by ID", tags={ }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Order not found") }) - public Order getOrderById(@PathParam("orderId") @Min(1) @Max(5) Long orderId); + @ApiResponse(code = 400, message = "Invalid ID supplied", response = .class), + @ApiResponse(code = 404, message = "Order not found", response = .class) }) + public Order getOrderById(@PathParam("orderId") Long orderId); /** * Place an order for a pet @@ -84,10 +81,10 @@ public interface StoreApi { @POST @Path("/store/order") @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Place an order for a pet", tags={ "store" }) + @ApiOperation(value = "Place an order for a pet", tags={ }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid Order") }) - public Order placeOrder(@Valid Order body); + @ApiResponse(code = 400, message = "Invalid Order", response = .class) }) + public Order placeOrder(Order body); } diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/api/UserApi.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/api/UserApi.java index 7aba6911b46..b8da4805d0c 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/api/UserApi.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/api/UserApi.java @@ -1,6 +1,5 @@ package io.swagger.api; -import java.util.List; import io.swagger.model.User; import java.io.InputStream; @@ -17,8 +16,6 @@ import io.swagger.annotations.ApiResponses; import io.swagger.annotations.ApiResponse; import io.swagger.jaxrs.PATCH; -import javax.validation.constraints.*; -import javax.validation.Valid; /** * Swagger Petstore @@ -39,10 +36,10 @@ public interface UserApi { @POST @Path("/user") @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Create user", tags={ "user", }) + @ApiOperation(value = "Create user", tags={ }) @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation") }) - public void createUser(@Valid User body); + @ApiResponse(code = 0, message = "successful operation", response = .class) }) + public void createUser(User body); /** * Creates list of users with given input array @@ -53,10 +50,10 @@ public interface UserApi { @POST @Path("/user/createWithArray") @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Creates list of users with given input array", tags={ "user", }) + @ApiOperation(value = "Creates list of users with given input array", tags={ }) @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation") }) - public void createUsersWithArrayInput(@Valid List body); + @ApiResponse(code = 0, message = "successful operation", response = .class) }) + public void createUsersWithArrayInput(List body); /** * Creates list of users with given input array @@ -67,10 +64,10 @@ public interface UserApi { @POST @Path("/user/createWithList") @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Creates list of users with given input array", tags={ "user", }) + @ApiOperation(value = "Creates list of users with given input array", tags={ }) @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation") }) - public void createUsersWithListInput(@Valid List body); + @ApiResponse(code = 0, message = "successful operation", response = .class) }) + public void createUsersWithListInput(List body); /** * Delete user @@ -81,10 +78,10 @@ public interface UserApi { @DELETE @Path("/user/{username}") @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Delete user", tags={ "user", }) + @ApiOperation(value = "Delete user", tags={ }) @ApiResponses(value = { - @ApiResponse(code = 400, message = "Invalid username supplied"), - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 400, message = "Invalid username supplied", response = .class), + @ApiResponse(code = 404, message = "User not found", response = .class) }) public void deleteUser(@PathParam("username") String username); /** @@ -96,11 +93,11 @@ public interface UserApi { @GET @Path("/user/{username}") @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Get user by user name", tags={ "user", }) + @ApiOperation(value = "Get user by user name", tags={ }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - @ApiResponse(code = 404, message = "User not found") }) + @ApiResponse(code = 400, message = "Invalid username supplied", response = .class), + @ApiResponse(code = 404, message = "User not found", response = .class) }) public User getUserByName(@PathParam("username") String username); /** @@ -112,11 +109,11 @@ public interface UserApi { @GET @Path("/user/login") @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Logs user into the system", tags={ "user", }) + @ApiOperation(value = "Logs user into the system", tags={ }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = String.class), - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) - public String loginUser(@QueryParam("username") @NotNull String username, @QueryParam("password") @NotNull String password); + @ApiResponse(code = 400, message = "Invalid username/password supplied", response = .class) }) + public String loginUser(@QueryParam("username")String username, @QueryParam("password")String password); /** * Logs out current logged in user session @@ -127,9 +124,9 @@ public interface UserApi { @GET @Path("/user/logout") @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Logs out current logged in user session", tags={ "user", }) + @ApiOperation(value = "Logs out current logged in user session", tags={ }) @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation") }) + @ApiResponse(code = 0, message = "successful operation", response = .class) }) public void logoutUser(); /** @@ -141,10 +138,10 @@ public interface UserApi { @PUT @Path("/user/{username}") @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Updated user", tags={ "user" }) + @ApiOperation(value = "Updated user", tags={ }) @ApiResponses(value = { - @ApiResponse(code = 400, message = "Invalid user supplied"), - @ApiResponse(code = 404, message = "User not found") }) - public void updateUser(@PathParam("username") String username, @Valid User body); + @ApiResponse(code = 400, message = "Invalid user supplied", response = .class), + @ApiResponse(code = 404, message = "User not found", response = .class) }) + public void updateUser(@PathParam("username") String username, User body); } diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Category.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Category.java index 0e190cbe457..a718f7f60e6 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Category.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Category.java @@ -1,7 +1,6 @@ package io.swagger.model; import io.swagger.annotations.ApiModel; -import javax.validation.constraints.*; import io.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlElement; diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/ModelApiResponse.java index c6aab8b6a07..be82193b308 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -1,7 +1,6 @@ package io.swagger.model; import io.swagger.annotations.ApiModel; -import javax.validation.constraints.*; import io.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlElement; diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Order.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Order.java index 973b0260b36..9c1c79300cb 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Order.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Order.java @@ -2,7 +2,6 @@ import io.swagger.annotations.ApiModel; import java.util.Date; -import javax.validation.constraints.*; import io.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlElement; diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Pet.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Pet.java index 6e3fcf954ec..7c24a892298 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Pet.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Pet.java @@ -5,7 +5,6 @@ import io.swagger.model.Tag; import java.util.ArrayList; import java.util.List; -import javax.validation.constraints.*; import io.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlElement; @@ -117,7 +116,6 @@ public Pet category(Category category) { * @return name **/ @JsonProperty("name") - @NotNull public String getName() { return name; } @@ -136,7 +134,6 @@ public Pet name(String name) { * @return photoUrls **/ @JsonProperty("photoUrls") - @NotNull public List getPhotoUrls() { return photoUrls; } diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Tag.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Tag.java index 71801d143d3..4f6240b5be7 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Tag.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Tag.java @@ -1,7 +1,6 @@ package io.swagger.model; import io.swagger.annotations.ApiModel; -import javax.validation.constraints.*; import io.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlElement; diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/User.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/User.java index e7d2773ea70..a2a336d3e94 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/User.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/User.java @@ -1,7 +1,6 @@ package io.swagger.model; import io.swagger.annotations.ApiModel; -import javax.validation.constraints.*; import io.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlElement; diff --git a/samples/client/petstore/jaxrs-cxf-client/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java b/samples/client/petstore/jaxrs-cxf-client/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java deleted file mode 100644 index d9b9345d339..00000000000 --- a/samples/client/petstore/jaxrs-cxf-client/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 java.io.File; -import io.swagger.model.ModelApiResponse; -import io.swagger.model.Pet; - -import java.io.InputStream; -import java.io.OutputStream; -import java.util.List; -import java.util.Map; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; -import org.apache.cxf.jaxrs.model.wadl.Description; -import org.apache.cxf.jaxrs.model.wadl.DocTarget; - -import org.apache.cxf.jaxrs.ext.multipart.*; - -import io.swagger.annotations.Api; - -public class PetApiServiceImpl implements PetApi { - public void addPet(Pet body) { - // TODO: Implement... - - - } - - public void deletePet(Long petId, String apiKey) { - // TODO: Implement... - - - } - - public List findPetsByStatus(List status) { - // TODO: Implement... - - return null; - } - - public List findPetsByTags(List tags) { - // TODO: Implement... - - return null; - } - - public Pet getPetById(Long petId) { - // TODO: Implement... - - return null; - } - - public void updatePet(Pet body) { - // TODO: Implement... - - - } - - public void updatePetWithForm(Long petId, String name, String status) { - // TODO: Implement... - - - } - - public ModelApiResponse uploadFile(Long petId, String additionalMetadata, Attachment fileDetail) { - // TODO: Implement... - - return null; - } - -} - diff --git a/samples/client/petstore/jaxrs-cxf-client/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java b/samples/client/petstore/jaxrs-cxf-client/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java deleted file mode 100644 index 3f791097b6b..00000000000 --- a/samples/client/petstore/jaxrs-cxf-client/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 java.util.Map; -import io.swagger.model.Order; - -import java.io.InputStream; -import java.io.OutputStream; -import java.util.List; -import java.util.Map; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; -import org.apache.cxf.jaxrs.model.wadl.Description; -import org.apache.cxf.jaxrs.model.wadl.DocTarget; - -import org.apache.cxf.jaxrs.ext.multipart.*; - -import io.swagger.annotations.Api; - -public class StoreApiServiceImpl implements StoreApi { - public void deleteOrder(String orderId) { - // TODO: Implement... - - - } - - public Map getInventory() { - // TODO: Implement... - - return null; - } - - public Order getOrderById(Long orderId) { - // TODO: Implement... - - return null; - } - - public Order placeOrder(Order body) { - // TODO: Implement... - - return null; - } - -} - diff --git a/samples/client/petstore/jaxrs-cxf-client/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java b/samples/client/petstore/jaxrs-cxf-client/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java deleted file mode 100644 index 861273cfb7b..00000000000 --- a/samples/client/petstore/jaxrs-cxf-client/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 java.util.List; -import io.swagger.model.User; - -import java.io.InputStream; -import java.io.OutputStream; -import java.util.List; -import java.util.Map; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; -import org.apache.cxf.jaxrs.model.wadl.Description; -import org.apache.cxf.jaxrs.model.wadl.DocTarget; - -import org.apache.cxf.jaxrs.ext.multipart.*; - -import io.swagger.annotations.Api; - -public class UserApiServiceImpl implements UserApi { - public void createUser(User body) { - // TODO: Implement... - - - } - - public void createUsersWithArrayInput(List body) { - // TODO: Implement... - - - } - - public void createUsersWithListInput(List body) { - // TODO: Implement... - - - } - - public void deleteUser(String username) { - // TODO: Implement... - - - } - - public User getUserByName(String username) { - // TODO: Implement... - - return null; - } - - public String loginUser(String username, String password) { - // TODO: Implement... - - return null; - } - - public void logoutUser() { - // TODO: Implement... - - - } - - public void updateUser(String username, User body) { - // TODO: Implement... - - - } - -} - diff --git a/samples/client/petstore/jaxrs-cxf-client/src/test/java/io/swagger/api/PetApiTest.java b/samples/client/petstore/jaxrs-cxf-client/src/test/java/io/swagger/api/PetApiTest.java index b7a13f76849..95743b0f965 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/test/java/io/swagger/api/PetApiTest.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/test/java/io/swagger/api/PetApiTest.java @@ -49,7 +49,11 @@ /** - * API tests for PetApi + * Swagger Petstore + * + *

This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * API tests for PetApi */ public class PetApiTest { diff --git a/samples/client/petstore/jaxrs-cxf-client/src/test/java/io/swagger/api/StoreApiTest.java b/samples/client/petstore/jaxrs-cxf-client/src/test/java/io/swagger/api/StoreApiTest.java index 92bb0e8b8f9..f4a89608902 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/test/java/io/swagger/api/StoreApiTest.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/test/java/io/swagger/api/StoreApiTest.java @@ -25,7 +25,6 @@ package io.swagger.api; -import java.util.Map; import io.swagger.model.Order; import org.junit.Test; import org.junit.Before; @@ -48,7 +47,11 @@ /** - * API tests for StoreApi + * Swagger Petstore + * + *

This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * API tests for StoreApi */ public class StoreApiTest { diff --git a/samples/client/petstore/jaxrs-cxf-client/src/test/java/io/swagger/api/UserApiTest.java b/samples/client/petstore/jaxrs-cxf-client/src/test/java/io/swagger/api/UserApiTest.java index a0ecb1dbee2..afccde9fe27 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/test/java/io/swagger/api/UserApiTest.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/test/java/io/swagger/api/UserApiTest.java @@ -25,7 +25,6 @@ package io.swagger.api; -import java.util.List; import io.swagger.model.User; import org.junit.Test; import org.junit.Before; @@ -48,7 +47,11 @@ /** - * API tests for UserApi + * Swagger Petstore + * + *

This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * API tests for UserApi */ public class UserApiTest {