diff --git a/bin/jaxrs-cxf-petstore-server-annotated-base-path.sh b/bin/jaxrs-cxf-petstore-server-annotated-base-path.sh
new file mode 100755
index 000000000000..eb79a73b25a4
--- /dev/null
+++ b/bin/jaxrs-cxf-petstore-server-annotated-base-path.sh
@@ -0,0 +1,31 @@
+#!/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/cxf -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l jaxrs-cxf -o samples/server/petstore/jaxrs-cxf-annotated-base-path -DhideGenerationTimestamp=true,useAnnotatedBasePath=true"
+
+java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/jaxrs-cxf-petstore-server-non-spring-application.sh b/bin/jaxrs-cxf-petstore-server-non-spring-application.sh
new file mode 100755
index 000000000000..e22a18dea6e7
--- /dev/null
+++ b/bin/jaxrs-cxf-petstore-server-non-spring-application.sh
@@ -0,0 +1,31 @@
+#!/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/cxf -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l jaxrs-cxf -o samples/server/petstore/jaxrs-cxf-non-spring-app -DhideGenerationTimestamp=true,generateNonSpringApplication=true"
+
+java $JAVA_OPTS -jar $executable $ags
diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaCXFServerCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaCXFServerCodegen.java
index 6404f74e3a0b..ffb166e33a5b 100644
--- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaCXFServerCodegen.java
+++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaCXFServerCodegen.java
@@ -56,6 +56,10 @@ public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen
protected boolean useLoggingFeatureForTests = false;
+ protected boolean useAnnotatedBasePath = false;
+
+ protected boolean generateNonSpringApplication = false;
+
public JavaCXFServerCodegen()
{
super();
@@ -108,6 +112,9 @@ public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen
cliOptions
.add(CliOption.newBoolean(ADD_CONSUMES_PRODUCES_JSON, "Add @Consumes/@Produces Json to API interface"));
+ cliOptions.add(CliOption.newBoolean(USE_ANNOTATED_BASE_PATH, "Use @Path annotations for basePath"));
+
+ cliOptions.add(CliOption.newBoolean(GENERATE_NON_SPRING_APPLICATION, "Generate non-Spring application"));
}
@@ -159,6 +166,16 @@ public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen
this.setGenerateJbossDeploymentDescriptor(generateJbossDeploymentDescriptorProp);
}
+ if (additionalProperties.containsKey(USE_ANNOTATED_BASE_PATH)) {
+ boolean useAnnotatedBasePathProp = convertPropertyToBooleanAndWriteBack(USE_ANNOTATED_BASE_PATH);
+ this.setUseAnnotatedBasePath(useAnnotatedBasePathProp);
+ }
+
+ if (additionalProperties.containsKey(GENERATE_NON_SPRING_APPLICATION)) {
+ boolean generateNonSpringApplication = convertPropertyToBooleanAndWriteBack(GENERATE_NON_SPRING_APPLICATION);
+ this.setGenerateNonSpringApplication(generateNonSpringApplication);
+ }
+
supportingFiles.clear(); // Don't need extra files provided by AbstractJAX-RS & Java Codegen
writeOptional(outputFolder, new SupportingFile("server/pom.mustache", "", "pom.xml"));
@@ -191,10 +208,12 @@ public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen
(testResourcesFolder + '/'), "application.properties"));
}
-
}
-
+ if (this.generateNonSpringApplication) {
+ writeOptional(outputFolder, new SupportingFile("server/nonspring-web.mustache",
+ ("src/main/webapp/WEB-INF"), "web.xml"));
+ }
}
@Override
@@ -293,4 +312,12 @@ public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen
this.addConsumesProducesJson = addConsumesProducesJson;
}
+ public void setUseAnnotatedBasePath(boolean useAnnotatedBasePath) {
+ this.useAnnotatedBasePath = useAnnotatedBasePath;
+ }
+
+ public void setGenerateNonSpringApplication(boolean generateNonSpringApplication) {
+ this.generateNonSpringApplication = generateNonSpringApplication;
+ }
+
}
diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/features/CXFServerFeatures.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/features/CXFServerFeatures.java
index eaa012b987a8..78e4f3decc9a 100644
--- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/features/CXFServerFeatures.java
+++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/features/CXFServerFeatures.java
@@ -15,10 +15,18 @@ public interface CXFServerFeatures
public static final String ADD_CONSUMES_PRODUCES_JSON = "addConsumesProducesJson";
+ public static final String USE_ANNOTATED_BASE_PATH = "useAnnotatedBasePath";
+
+ public static final String GENERATE_NON_SPRING_APPLICATION = "generateNonSpringApplication";
+
public void setUseWadlFeature(boolean useWadlFeature);
public void setUseMultipartFeature(boolean useMultipartFeature);
public void setAddConsumesProducesJson(boolean addConsumesProducesJson);
+ public void setUseAnnotatedBasePath(boolean useAnnotatedBasePath);
+
+ public void setGenerateNonSpringApplication(boolean generateNonSpringApplication);
+
}
diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/api.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/api.mustache
index 9ed95f1a1928..b15a8797154c 100644
--- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/api.mustache
+++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/api.mustache
@@ -19,7 +19,7 @@ import io.swagger.jaxrs.PATCH;
import javax.validation.constraints.*;
{{/useBeanValidation}}
-@Path("/")
+@Path("{{^useAnnotatedBasePath}}/{{/useAnnotatedBasePath}}{{#useAnnotatedBasePath}}{{contextPath}}{{/useAnnotatedBasePath}}")
@Api(value = "/", description = "{{description}}")
{{#addConsumesProducesJson}}
@Consumes(MediaType.APPLICATION_JSON)
diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/server/nonspring-web.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/server/nonspring-web.mustache
new file mode 100644
index 000000000000..4542e024b87e
--- /dev/null
+++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/server/nonspring-web.mustache
@@ -0,0 +1,26 @@
+
+
+
+
+ CXF Non-Spring Jaxrs Servlet
+ CXFNonSpringJaxrsServlet
+ org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet
+{{#apiInfo}}
+
+ jaxrs.serviceClasses
+ {{#apis}}{{package}}.impl.{{classname}}ServiceImpl{{^-last}},{{/-last}}{{/apis}}
+
+{{/apiInfo}}
+
+ jaxrs.providers
+ com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider
+
+
+
+
+ CXFNonSpringJaxrsServlet
+ /rest/*
+
+
+
diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/JavaCXFServerOptionsProvider.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/JavaCXFServerOptionsProvider.java
index fa32252c0b09..22deb3daacec 100644
--- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/JavaCXFServerOptionsProvider.java
+++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/JavaCXFServerOptionsProvider.java
@@ -40,6 +40,10 @@ public class JavaCXFServerOptionsProvider extends JavaOptionsProvider {
public static final String ADD_CONSUMES_PRODUCES_JSON = "true";
public static final String IMPL_FOLDER_VALUE = "src/main/java";
+
+ public static final String USE_ANNOTATED_BASE_PATH = "true";
+
+ public static final String GENERATE_NON_SPRING_APPLICATION = "true";
@Override
public boolean isServer() {
@@ -85,6 +89,10 @@ public class JavaCXFServerOptionsProvider extends JavaOptionsProvider {
builder.put(JavaCXFServerCodegen.ADD_CONSUMES_PRODUCES_JSON, ADD_CONSUMES_PRODUCES_JSON);
+ builder.put(JavaCXFServerCodegen.USE_ANNOTATED_BASE_PATH, USE_ANNOTATED_BASE_PATH);
+
+ builder.put(JavaCXFServerCodegen.GENERATE_NON_SPRING_APPLICATION, GENERATE_NON_SPRING_APPLICATION);
+
return builder.build();
}
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.swagger-codegen-ignore b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.swagger-codegen-ignore
new file mode 100644
index 000000000000..c5fa491b4c55
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.swagger-codegen-ignore
@@ -0,0 +1,23 @@
+# Swagger Codegen Ignore
+# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml b/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml
new file mode 100644
index 000000000000..cdf3a68ed8f7
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml
@@ -0,0 +1,177 @@
+
+ 4.0.0
+ io.swagger
+ swagger-cxf-server
+ war
+ swagger-cxf-server
+ 1.0.0
+
+ src/main/java
+
+
+ maven-failsafe-plugin
+ 2.6
+
+
+
+ integration-test
+ verify
+
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ 1.9.1
+
+
+ add-source
+ generate-sources
+
+ add-source
+
+
+
+ src/gen/java
+
+
+
+
+
+
+
+
+ maven-war-plugin
+ 2.1.1
+
+ false
+
+
+
+
+
+
+ io.swagger
+ swagger-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
+
+
+
+ org.apache.cxf
+ cxf-rt-rs-client
+ ${cxf-version}
+ test
+
+
+
+
+ org.apache.cxf
+ cxf-rt-frontend-jaxrs
+ ${cxf-version}
+ compile
+
+
+ org.apache.cxf
+ cxf-rt-rs-service-description
+ ${cxf-version}
+ compile
+
+
+ org.apache.cxf
+ cxf-rt-rs-service-description-swagger
+ ${cxf-version}
+ compile
+
+
+ org.apache.cxf
+ cxf-rt-ws-policy
+ ${cxf-version}
+ compile
+
+
+ org.apache.cxf
+ cxf-rt-wsdl
+ ${cxf-version}
+ compile
+
+
+
+
+ sonatype-snapshots
+ https://oss.sonatype.org/content/repositories/snapshots
+
+ true
+
+
+
+
+ 1.7
+ ${java.version}
+ ${java.version}
+ 1.5.10
+ 9.2.9.v20150224
+ 2.22.2
+ 4.12
+ 1.1.7
+ 2.5
+ 3.1.8
+ UTF-8
+
+
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/PetApi.java
new file mode 100644
index 000000000000..524bc0085c10
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/PetApi.java
@@ -0,0 +1,75 @@
+package 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 javax.ws.rs.core.MediaType;
+import org.apache.cxf.jaxrs.ext.multipart.*;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+@Path("/v2")
+@Api(value = "/", description = "")
+public interface PetApi {
+
+ @POST
+ @Path("/pet")
+ @Consumes({ "application/json", "application/xml" })
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Add a new pet to the store", tags={ "pet", })
+ public void addPet(Pet body);
+
+ @DELETE
+ @Path("/pet/{petId}")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Deletes a pet", tags={ "pet", })
+ public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey);
+
+ @GET
+ @Path("/pet/findByStatus")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Finds Pets by status", tags={ "pet", })
+ public List findPetsByStatus(@QueryParam("status")List status);
+
+ @GET
+ @Path("/pet/findByTags")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Finds Pets by tags", tags={ "pet", })
+ public List findPetsByTags(@QueryParam("tags")List tags);
+
+ @GET
+ @Path("/pet/{petId}")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Find pet by ID", tags={ "pet", })
+ public Pet getPetById(@PathParam("petId") Long petId);
+
+ @PUT
+ @Path("/pet")
+ @Consumes({ "application/json", "application/xml" })
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Update an existing pet", tags={ "pet", })
+ public void updatePet(Pet body);
+
+ @POST
+ @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", })
+ public void updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status);
+
+ @POST
+ @Path("/pet/{petId}/uploadImage")
+ @Consumes({ "multipart/form-data" })
+ @Produces({ "application/json" })
+ @ApiOperation(value = "uploads an image", tags={ "pet" })
+ 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/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/StoreApi.java
new file mode 100644
index 000000000000..747f772dad3a
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/StoreApi.java
@@ -0,0 +1,46 @@
+package 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 javax.ws.rs.core.MediaType;
+import org.apache.cxf.jaxrs.ext.multipart.*;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+@Path("/v2")
+@Api(value = "/", description = "")
+public interface StoreApi {
+
+ @DELETE
+ @Path("/store/order/{orderId}")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Delete purchase order by ID", tags={ "store", })
+ public void deleteOrder(@PathParam("orderId") String orderId);
+
+ @GET
+ @Path("/store/inventory")
+ @Produces({ "application/json" })
+ @ApiOperation(value = "Returns pet inventories by status", tags={ "store", })
+ public Map getInventory();
+
+ @GET
+ @Path("/store/order/{orderId}")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Find purchase order by ID", tags={ "store", })
+ public Order getOrderById(@PathParam("orderId") Long orderId);
+
+ @POST
+ @Path("/store/order")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Place an order for a pet", tags={ "store" })
+ public Order placeOrder(Order body);
+}
+
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/UserApi.java
new file mode 100644
index 000000000000..94d94a703fae
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/UserApi.java
@@ -0,0 +1,70 @@
+package 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 javax.ws.rs.core.MediaType;
+import org.apache.cxf.jaxrs.ext.multipart.*;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+@Path("/v2")
+@Api(value = "/", description = "")
+public interface UserApi {
+
+ @POST
+ @Path("/user")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Create user", tags={ "user", })
+ public void createUser(User body);
+
+ @POST
+ @Path("/user/createWithArray")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
+ public void createUsersWithArrayInput(List body);
+
+ @POST
+ @Path("/user/createWithList")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
+ public void createUsersWithListInput(List body);
+
+ @DELETE
+ @Path("/user/{username}")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Delete user", tags={ "user", })
+ public void deleteUser(@PathParam("username") String username);
+
+ @GET
+ @Path("/user/{username}")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Get user by user name", tags={ "user", })
+ public User getUserByName(@PathParam("username") String username);
+
+ @GET
+ @Path("/user/login")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Logs user into the system", tags={ "user", })
+ public String loginUser(@QueryParam("username")String username, @QueryParam("password")String password);
+
+ @GET
+ @Path("/user/logout")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Logs out current logged in user session", tags={ "user", })
+ public void logoutUser();
+
+ @PUT
+ @Path("/user/{username}")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Updated user", tags={ "user" })
+ public void updateUser(@PathParam("username") String username, User body);
+}
+
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Category.java
new file mode 100644
index 000000000000..591a6e22a69b
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Category.java
@@ -0,0 +1,65 @@
+package io.swagger.model;
+
+import io.swagger.annotations.ApiModel;
+
+import io.swagger.annotations.ApiModelProperty;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+
+@ApiModel(description="A category for a pet")
+public class Category {
+
+ @ApiModelProperty(example = "null", value = "")
+ private Long id = null;
+ @ApiModelProperty(example = "null", value = "")
+ private String name = null;
+
+ /**
+ * Get id
+ * @return id
+ **/
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ /**
+ * Get name
+ * @return name
+ **/
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = 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 static String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/ModelApiResponse.java
new file mode 100644
index 000000000000..f3c6f56cfc4c
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/ModelApiResponse.java
@@ -0,0 +1,78 @@
+package io.swagger.model;
+
+import io.swagger.annotations.ApiModel;
+
+import io.swagger.annotations.ApiModelProperty;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+
+@ApiModel(description="Describes the result of uploading an image resource")
+public class ModelApiResponse {
+
+ @ApiModelProperty(example = "null", value = "")
+ private Integer code = null;
+ @ApiModelProperty(example = "null", value = "")
+ private String type = null;
+ @ApiModelProperty(example = "null", value = "")
+ private String message = null;
+
+ /**
+ * Get code
+ * @return code
+ **/
+ public Integer getCode() {
+ return code;
+ }
+ public void setCode(Integer code) {
+ this.code = code;
+ }
+ /**
+ * Get type
+ * @return type
+ **/
+ public String getType() {
+ return type;
+ }
+ public void setType(String type) {
+ this.type = type;
+ }
+ /**
+ * Get message
+ * @return message
+ **/
+ public String getMessage() {
+ return message;
+ }
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ModelApiResponse {\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 static String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Order.java
new file mode 100644
index 000000000000..af6f5e0e38e9
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Order.java
@@ -0,0 +1,150 @@
+package io.swagger.model;
+
+import io.swagger.annotations.ApiModel;
+
+import io.swagger.annotations.ApiModelProperty;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+
+@ApiModel(description="An order for a pets from the pet store")
+public class Order {
+
+ @ApiModelProperty(example = "null", value = "")
+ private Long id = null;
+ @ApiModelProperty(example = "null", value = "")
+ private Long petId = null;
+ @ApiModelProperty(example = "null", value = "")
+ private Integer quantity = null;
+ @ApiModelProperty(example = "null", value = "")
+ private javax.xml.datatype.XMLGregorianCalendar shipDate = null;
+
+@XmlType(name="StatusEnum")
+@XmlEnum(String.class)
+public enum StatusEnum {
+
+ @XmlEnumValue("placed") PLACED(String.valueOf("placed")), @XmlEnumValue("approved") APPROVED(String.valueOf("approved")), @XmlEnumValue("delivered") DELIVERED(String.valueOf("delivered"));
+
+
+ private String value;
+
+ StatusEnum (String v) {
+ value = v;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static StatusEnum fromValue(String v) {
+ for (StatusEnum b : StatusEnum.values()) {
+ if (String.valueOf(b.value).equals(v)) {
+ return b;
+ }
+ }
+ return null;
+ }
+}
+
+ @ApiModelProperty(example = "null", value = "Order Status")
+ private StatusEnum status = null;
+ @ApiModelProperty(example = "null", value = "")
+ private Boolean complete = false;
+
+ /**
+ * Get id
+ * @return id
+ **/
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ /**
+ * Get petId
+ * @return petId
+ **/
+ public Long getPetId() {
+ return petId;
+ }
+ public void setPetId(Long petId) {
+ this.petId = petId;
+ }
+ /**
+ * Get quantity
+ * @return quantity
+ **/
+ public Integer getQuantity() {
+ return quantity;
+ }
+ public void setQuantity(Integer quantity) {
+ this.quantity = quantity;
+ }
+ /**
+ * Get shipDate
+ * @return shipDate
+ **/
+ public javax.xml.datatype.XMLGregorianCalendar getShipDate() {
+ return shipDate;
+ }
+ public void setShipDate(javax.xml.datatype.XMLGregorianCalendar shipDate) {
+ this.shipDate = shipDate;
+ }
+ /**
+ * Order Status
+ * @return status
+ **/
+ public StatusEnum getStatus() {
+ return status;
+ }
+ public void setStatus(StatusEnum status) {
+ this.status = status;
+ }
+ /**
+ * Get complete
+ * @return complete
+ **/
+ public Boolean getComplete() {
+ return complete;
+ }
+ public void setComplete(Boolean complete) {
+ this.complete = 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 static String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Pet.java
new file mode 100644
index 000000000000..0cfc0a30ee0e
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Pet.java
@@ -0,0 +1,154 @@
+package io.swagger.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.model.Category;
+import io.swagger.model.Tag;
+import java.util.ArrayList;
+import java.util.List;
+
+import io.swagger.annotations.ApiModelProperty;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+
+@ApiModel(description="A pet for sale in the pet store")
+public class Pet {
+
+ @ApiModelProperty(example = "null", value = "")
+ private Long id = null;
+ @ApiModelProperty(example = "null", value = "")
+ private Category category = null;
+ @ApiModelProperty(example = "doggie", required = true, value = "")
+ private String name = null;
+ @ApiModelProperty(example = "null", required = true, value = "")
+ private List photoUrls = new ArrayList();
+ @ApiModelProperty(example = "null", value = "")
+ private List tags = new ArrayList();
+
+@XmlType(name="StatusEnum")
+@XmlEnum(String.class)
+public enum StatusEnum {
+
+ @XmlEnumValue("available") AVAILABLE(String.valueOf("available")), @XmlEnumValue("pending") PENDING(String.valueOf("pending")), @XmlEnumValue("sold") SOLD(String.valueOf("sold"));
+
+
+ private String value;
+
+ StatusEnum (String v) {
+ value = v;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static StatusEnum fromValue(String v) {
+ for (StatusEnum b : StatusEnum.values()) {
+ if (String.valueOf(b.value).equals(v)) {
+ return b;
+ }
+ }
+ return null;
+ }
+}
+
+ @ApiModelProperty(example = "null", value = "pet status in the store")
+ private StatusEnum status = null;
+
+ /**
+ * Get id
+ * @return id
+ **/
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ /**
+ * Get category
+ * @return category
+ **/
+ public Category getCategory() {
+ return category;
+ }
+ public void setCategory(Category category) {
+ this.category = category;
+ }
+ /**
+ * Get name
+ * @return name
+ **/
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ /**
+ * Get photoUrls
+ * @return photoUrls
+ **/
+ public List getPhotoUrls() {
+ return photoUrls;
+ }
+ public void setPhotoUrls(List photoUrls) {
+ this.photoUrls = photoUrls;
+ }
+ /**
+ * Get tags
+ * @return tags
+ **/
+ public List getTags() {
+ return tags;
+ }
+ public void setTags(List tags) {
+ this.tags = tags;
+ }
+ /**
+ * pet status in the store
+ * @return status
+ **/
+ public StatusEnum getStatus() {
+ return status;
+ }
+ public void setStatus(StatusEnum status) {
+ this.status = status;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Pet {\n");
+
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" category: ").append(toIndentedString(category)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).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 static String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Tag.java
new file mode 100644
index 000000000000..4eb99ad2fc1a
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Tag.java
@@ -0,0 +1,65 @@
+package io.swagger.model;
+
+import io.swagger.annotations.ApiModel;
+
+import io.swagger.annotations.ApiModelProperty;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+
+@ApiModel(description="A tag for a pet")
+public class Tag {
+
+ @ApiModelProperty(example = "null", value = "")
+ private Long id = null;
+ @ApiModelProperty(example = "null", value = "")
+ private String name = null;
+
+ /**
+ * Get id
+ * @return id
+ **/
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ /**
+ * Get name
+ * @return name
+ **/
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = 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 static String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/User.java
new file mode 100644
index 000000000000..005d9aa8c74b
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/User.java
@@ -0,0 +1,143 @@
+package io.swagger.model;
+
+import io.swagger.annotations.ApiModel;
+
+import io.swagger.annotations.ApiModelProperty;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+
+@ApiModel(description="A User who is purchasing from the pet store")
+public class User {
+
+ @ApiModelProperty(example = "null", value = "")
+ private Long id = null;
+ @ApiModelProperty(example = "null", value = "")
+ private String username = null;
+ @ApiModelProperty(example = "null", value = "")
+ private String firstName = null;
+ @ApiModelProperty(example = "null", value = "")
+ private String lastName = null;
+ @ApiModelProperty(example = "null", value = "")
+ private String email = null;
+ @ApiModelProperty(example = "null", value = "")
+ private String password = null;
+ @ApiModelProperty(example = "null", value = "")
+ private String phone = null;
+ @ApiModelProperty(example = "null", value = "User Status")
+ private Integer userStatus = null;
+
+ /**
+ * Get id
+ * @return id
+ **/
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ /**
+ * Get username
+ * @return username
+ **/
+ public String getUsername() {
+ return username;
+ }
+ public void setUsername(String username) {
+ this.username = username;
+ }
+ /**
+ * Get firstName
+ * @return firstName
+ **/
+ public String getFirstName() {
+ return firstName;
+ }
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+ /**
+ * Get lastName
+ * @return lastName
+ **/
+ public String getLastName() {
+ return lastName;
+ }
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+ /**
+ * Get email
+ * @return email
+ **/
+ public String getEmail() {
+ return email;
+ }
+ public void setEmail(String email) {
+ this.email = email;
+ }
+ /**
+ * Get password
+ * @return password
+ **/
+ public String getPassword() {
+ return password;
+ }
+ public void setPassword(String password) {
+ this.password = password;
+ }
+ /**
+ * Get phone
+ * @return phone
+ **/
+ public String getPhone() {
+ return phone;
+ }
+ public void setPhone(String phone) {
+ this.phone = phone;
+ }
+ /**
+ * User Status
+ * @return userStatus
+ **/
+ public Integer getUserStatus() {
+ return userStatus;
+ }
+ public void setUserStatus(Integer userStatus) {
+ this.userStatus = 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 static String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
new file mode 100644
index 000000000000..d9b9345d3396
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
@@ -0,0 +1,71 @@
+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/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
new file mode 100644
index 000000000000..3f791097b6b1
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
@@ -0,0 +1,46 @@
+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/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
new file mode 100644
index 000000000000..861273cfb7b4
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
@@ -0,0 +1,70 @@
+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/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/PetApiTest.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/PetApiTest.java
new file mode 100644
index 000000000000..bbb67c243906
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/PetApiTest.java
@@ -0,0 +1,221 @@
+/**
+ * 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.
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: apiteam@swagger.io
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package io.swagger.api;
+
+import java.io.File;
+import io.swagger.model.ModelApiResponse;
+import io.swagger.model.Pet;
+import org.junit.Test;
+import org.junit.Before;
+import static org.junit.Assert.*;
+
+import javax.ws.rs.core.Response;
+import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
+import org.apache.cxf.jaxrs.client.ClientConfiguration;
+import org.apache.cxf.jaxrs.client.WebClient;
+
+
+import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+
+
+/**
+ * API tests for PetApi
+ */
+public class PetApiTest {
+
+
+ private PetApi api;
+
+ @Before
+ public void setup() {
+ JacksonJsonProvider provider = new JacksonJsonProvider();
+ List providers = new ArrayList();
+ providers.add(provider);
+
+ api = JAXRSClientFactory.create("http://petstore.swagger.io/v2", PetApi.class, providers);
+ org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
+
+ ClientConfiguration config = WebClient.getConfig(client);
+ }
+
+
+ /**
+ * Add a new pet to the store
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void addPetTest() {
+ Pet body = null;
+ //api.addPet(body);
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Deletes a pet
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void deletePetTest() {
+ Long petId = null;
+ String apiKey = null;
+ //api.deletePet(petId, apiKey);
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Finds Pets by status
+ *
+ * Multiple status values can be provided with comma separated strings
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void findPetsByStatusTest() {
+ List status = null;
+ //List response = api.findPetsByStatus(status);
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Finds Pets by tags
+ *
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void findPetsByTagsTest() {
+ List tags = null;
+ //List response = api.findPetsByTags(tags);
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Find pet by ID
+ *
+ * Returns a single pet
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void getPetByIdTest() {
+ Long petId = null;
+ //Pet response = api.getPetById(petId);
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Update an existing pet
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void updatePetTest() {
+ Pet body = null;
+ //api.updatePet(body);
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Updates a pet in the store with form data
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void updatePetWithFormTest() {
+ Long petId = null;
+ String name = null;
+ String status = null;
+ //api.updatePetWithForm(petId, name, status);
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * uploads an image
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void uploadFileTest() {
+ Long petId = null;
+ String additionalMetadata = null;
+ org.apache.cxf.jaxrs.ext.multipart.Attachment file = null;
+ //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+}
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/StoreApiTest.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/StoreApiTest.java
new file mode 100644
index 000000000000..af89e255a9ff
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/StoreApiTest.java
@@ -0,0 +1,142 @@
+/**
+ * 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.
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: apiteam@swagger.io
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package io.swagger.api;
+
+import java.util.Map;
+import io.swagger.model.Order;
+import org.junit.Test;
+import org.junit.Before;
+import static org.junit.Assert.*;
+
+import javax.ws.rs.core.Response;
+import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
+import org.apache.cxf.jaxrs.client.ClientConfiguration;
+import org.apache.cxf.jaxrs.client.WebClient;
+
+
+import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+
+
+/**
+ * API tests for StoreApi
+ */
+public class StoreApiTest {
+
+
+ private StoreApi api;
+
+ @Before
+ public void setup() {
+ JacksonJsonProvider provider = new JacksonJsonProvider();
+ List providers = new ArrayList();
+ providers.add(provider);
+
+ api = JAXRSClientFactory.create("http://petstore.swagger.io/v2", StoreApi.class, providers);
+ org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
+
+ ClientConfiguration config = WebClient.getConfig(client);
+ }
+
+
+ /**
+ * Delete purchase order by ID
+ *
+ * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void deleteOrderTest() {
+ String orderId = null;
+ //api.deleteOrder(orderId);
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Returns pet inventories by status
+ *
+ * Returns a map of status codes to quantities
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void getInventoryTest() {
+ //Map response = api.getInventory();
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Find purchase order by ID
+ *
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void getOrderByIdTest() {
+ Long orderId = null;
+ //Order response = api.getOrderById(orderId);
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Place an order for a pet
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void placeOrderTest() {
+ Order body = null;
+ //Order response = api.placeOrder(body);
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+}
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/UserApiTest.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/UserApiTest.java
new file mode 100644
index 000000000000..f789f0fc9366
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/UserApiTest.java
@@ -0,0 +1,216 @@
+/**
+ * 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.
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: apiteam@swagger.io
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package io.swagger.api;
+
+import java.util.List;
+import io.swagger.model.User;
+import org.junit.Test;
+import org.junit.Before;
+import static org.junit.Assert.*;
+
+import javax.ws.rs.core.Response;
+import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
+import org.apache.cxf.jaxrs.client.ClientConfiguration;
+import org.apache.cxf.jaxrs.client.WebClient;
+
+
+import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+
+
+/**
+ * API tests for UserApi
+ */
+public class UserApiTest {
+
+
+ private UserApi api;
+
+ @Before
+ public void setup() {
+ JacksonJsonProvider provider = new JacksonJsonProvider();
+ List providers = new ArrayList();
+ providers.add(provider);
+
+ api = JAXRSClientFactory.create("http://petstore.swagger.io/v2", UserApi.class, providers);
+ org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
+
+ ClientConfiguration config = WebClient.getConfig(client);
+ }
+
+
+ /**
+ * Create user
+ *
+ * This can only be done by the logged in user.
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void createUserTest() {
+ User body = null;
+ //api.createUser(body);
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Creates list of users with given input array
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void createUsersWithArrayInputTest() {
+ List body = null;
+ //api.createUsersWithArrayInput(body);
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Creates list of users with given input array
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void createUsersWithListInputTest() {
+ List body = null;
+ //api.createUsersWithListInput(body);
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Delete user
+ *
+ * This can only be done by the logged in user.
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void deleteUserTest() {
+ String username = null;
+ //api.deleteUser(username);
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Get user by user name
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void getUserByNameTest() {
+ String username = null;
+ //User response = api.getUserByName(username);
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Logs user into the system
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void loginUserTest() {
+ String username = null;
+ String password = null;
+ //String response = api.loginUser(username, password);
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Logs out current logged in user session
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void logoutUserTest() {
+ //api.logoutUser();
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Updated user
+ *
+ * This can only be done by the logged in user.
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void updateUserTest() {
+ String username = null;
+ User body = null;
+ //api.updateUser(username, body);
+
+ // TODO: test validations
+
+
+ }
+
+}
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/.swagger-codegen-ignore b/samples/server/petstore/jaxrs-cxf-non-spring-app/.swagger-codegen-ignore
new file mode 100644
index 000000000000..c5fa491b4c55
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/.swagger-codegen-ignore
@@ -0,0 +1,23 @@
+# Swagger Codegen Ignore
+# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml b/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml
new file mode 100644
index 000000000000..cdf3a68ed8f7
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml
@@ -0,0 +1,177 @@
+
+ 4.0.0
+ io.swagger
+ swagger-cxf-server
+ war
+ swagger-cxf-server
+ 1.0.0
+
+ src/main/java
+
+
+ maven-failsafe-plugin
+ 2.6
+
+
+
+ integration-test
+ verify
+
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ 1.9.1
+
+
+ add-source
+ generate-sources
+
+ add-source
+
+
+
+ src/gen/java
+
+
+
+
+
+
+
+
+ maven-war-plugin
+ 2.1.1
+
+ false
+
+
+
+
+
+
+ io.swagger
+ swagger-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
+
+
+
+ org.apache.cxf
+ cxf-rt-rs-client
+ ${cxf-version}
+ test
+
+
+
+
+ org.apache.cxf
+ cxf-rt-frontend-jaxrs
+ ${cxf-version}
+ compile
+
+
+ org.apache.cxf
+ cxf-rt-rs-service-description
+ ${cxf-version}
+ compile
+
+
+ org.apache.cxf
+ cxf-rt-rs-service-description-swagger
+ ${cxf-version}
+ compile
+
+
+ org.apache.cxf
+ cxf-rt-ws-policy
+ ${cxf-version}
+ compile
+
+
+ org.apache.cxf
+ cxf-rt-wsdl
+ ${cxf-version}
+ compile
+
+
+
+
+ sonatype-snapshots
+ https://oss.sonatype.org/content/repositories/snapshots
+
+ true
+
+
+
+
+ 1.7
+ ${java.version}
+ ${java.version}
+ 1.5.10
+ 9.2.9.v20150224
+ 2.22.2
+ 4.12
+ 1.1.7
+ 2.5
+ 3.1.8
+ UTF-8
+
+
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/PetApi.java
new file mode 100644
index 000000000000..4ef2db0e2049
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/PetApi.java
@@ -0,0 +1,75 @@
+package 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 javax.ws.rs.core.MediaType;
+import org.apache.cxf.jaxrs.ext.multipart.*;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+@Path("/")
+@Api(value = "/", description = "")
+public interface PetApi {
+
+ @POST
+ @Path("/pet")
+ @Consumes({ "application/json", "application/xml" })
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Add a new pet to the store", tags={ "pet", })
+ public void addPet(Pet body);
+
+ @DELETE
+ @Path("/pet/{petId}")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Deletes a pet", tags={ "pet", })
+ public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey);
+
+ @GET
+ @Path("/pet/findByStatus")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Finds Pets by status", tags={ "pet", })
+ public List findPetsByStatus(@QueryParam("status")List status);
+
+ @GET
+ @Path("/pet/findByTags")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Finds Pets by tags", tags={ "pet", })
+ public List findPetsByTags(@QueryParam("tags")List tags);
+
+ @GET
+ @Path("/pet/{petId}")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Find pet by ID", tags={ "pet", })
+ public Pet getPetById(@PathParam("petId") Long petId);
+
+ @PUT
+ @Path("/pet")
+ @Consumes({ "application/json", "application/xml" })
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Update an existing pet", tags={ "pet", })
+ public void updatePet(Pet body);
+
+ @POST
+ @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", })
+ public void updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status);
+
+ @POST
+ @Path("/pet/{petId}/uploadImage")
+ @Consumes({ "multipart/form-data" })
+ @Produces({ "application/json" })
+ @ApiOperation(value = "uploads an image", tags={ "pet" })
+ 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/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/StoreApi.java
new file mode 100644
index 000000000000..e26c47769b4e
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/StoreApi.java
@@ -0,0 +1,46 @@
+package 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 javax.ws.rs.core.MediaType;
+import org.apache.cxf.jaxrs.ext.multipart.*;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+@Path("/")
+@Api(value = "/", description = "")
+public interface StoreApi {
+
+ @DELETE
+ @Path("/store/order/{orderId}")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Delete purchase order by ID", tags={ "store", })
+ public void deleteOrder(@PathParam("orderId") String orderId);
+
+ @GET
+ @Path("/store/inventory")
+ @Produces({ "application/json" })
+ @ApiOperation(value = "Returns pet inventories by status", tags={ "store", })
+ public Map getInventory();
+
+ @GET
+ @Path("/store/order/{orderId}")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Find purchase order by ID", tags={ "store", })
+ public Order getOrderById(@PathParam("orderId") Long orderId);
+
+ @POST
+ @Path("/store/order")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Place an order for a pet", tags={ "store" })
+ public Order placeOrder(Order body);
+}
+
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/UserApi.java
new file mode 100644
index 000000000000..a51b1fe0c70d
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/UserApi.java
@@ -0,0 +1,70 @@
+package 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 javax.ws.rs.core.MediaType;
+import org.apache.cxf.jaxrs.ext.multipart.*;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+@Path("/")
+@Api(value = "/", description = "")
+public interface UserApi {
+
+ @POST
+ @Path("/user")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Create user", tags={ "user", })
+ public void createUser(User body);
+
+ @POST
+ @Path("/user/createWithArray")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
+ public void createUsersWithArrayInput(List body);
+
+ @POST
+ @Path("/user/createWithList")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Creates list of users with given input array", tags={ "user", })
+ public void createUsersWithListInput(List body);
+
+ @DELETE
+ @Path("/user/{username}")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Delete user", tags={ "user", })
+ public void deleteUser(@PathParam("username") String username);
+
+ @GET
+ @Path("/user/{username}")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Get user by user name", tags={ "user", })
+ public User getUserByName(@PathParam("username") String username);
+
+ @GET
+ @Path("/user/login")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Logs user into the system", tags={ "user", })
+ public String loginUser(@QueryParam("username")String username, @QueryParam("password")String password);
+
+ @GET
+ @Path("/user/logout")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Logs out current logged in user session", tags={ "user", })
+ public void logoutUser();
+
+ @PUT
+ @Path("/user/{username}")
+ @Produces({ "application/xml", "application/json" })
+ @ApiOperation(value = "Updated user", tags={ "user" })
+ public void updateUser(@PathParam("username") String username, User body);
+}
+
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Category.java
new file mode 100644
index 000000000000..591a6e22a69b
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Category.java
@@ -0,0 +1,65 @@
+package io.swagger.model;
+
+import io.swagger.annotations.ApiModel;
+
+import io.swagger.annotations.ApiModelProperty;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+
+@ApiModel(description="A category for a pet")
+public class Category {
+
+ @ApiModelProperty(example = "null", value = "")
+ private Long id = null;
+ @ApiModelProperty(example = "null", value = "")
+ private String name = null;
+
+ /**
+ * Get id
+ * @return id
+ **/
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ /**
+ * Get name
+ * @return name
+ **/
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = 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 static String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/ModelApiResponse.java
new file mode 100644
index 000000000000..f3c6f56cfc4c
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/ModelApiResponse.java
@@ -0,0 +1,78 @@
+package io.swagger.model;
+
+import io.swagger.annotations.ApiModel;
+
+import io.swagger.annotations.ApiModelProperty;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+
+@ApiModel(description="Describes the result of uploading an image resource")
+public class ModelApiResponse {
+
+ @ApiModelProperty(example = "null", value = "")
+ private Integer code = null;
+ @ApiModelProperty(example = "null", value = "")
+ private String type = null;
+ @ApiModelProperty(example = "null", value = "")
+ private String message = null;
+
+ /**
+ * Get code
+ * @return code
+ **/
+ public Integer getCode() {
+ return code;
+ }
+ public void setCode(Integer code) {
+ this.code = code;
+ }
+ /**
+ * Get type
+ * @return type
+ **/
+ public String getType() {
+ return type;
+ }
+ public void setType(String type) {
+ this.type = type;
+ }
+ /**
+ * Get message
+ * @return message
+ **/
+ public String getMessage() {
+ return message;
+ }
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ModelApiResponse {\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 static String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Order.java
new file mode 100644
index 000000000000..af6f5e0e38e9
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Order.java
@@ -0,0 +1,150 @@
+package io.swagger.model;
+
+import io.swagger.annotations.ApiModel;
+
+import io.swagger.annotations.ApiModelProperty;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+
+@ApiModel(description="An order for a pets from the pet store")
+public class Order {
+
+ @ApiModelProperty(example = "null", value = "")
+ private Long id = null;
+ @ApiModelProperty(example = "null", value = "")
+ private Long petId = null;
+ @ApiModelProperty(example = "null", value = "")
+ private Integer quantity = null;
+ @ApiModelProperty(example = "null", value = "")
+ private javax.xml.datatype.XMLGregorianCalendar shipDate = null;
+
+@XmlType(name="StatusEnum")
+@XmlEnum(String.class)
+public enum StatusEnum {
+
+ @XmlEnumValue("placed") PLACED(String.valueOf("placed")), @XmlEnumValue("approved") APPROVED(String.valueOf("approved")), @XmlEnumValue("delivered") DELIVERED(String.valueOf("delivered"));
+
+
+ private String value;
+
+ StatusEnum (String v) {
+ value = v;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static StatusEnum fromValue(String v) {
+ for (StatusEnum b : StatusEnum.values()) {
+ if (String.valueOf(b.value).equals(v)) {
+ return b;
+ }
+ }
+ return null;
+ }
+}
+
+ @ApiModelProperty(example = "null", value = "Order Status")
+ private StatusEnum status = null;
+ @ApiModelProperty(example = "null", value = "")
+ private Boolean complete = false;
+
+ /**
+ * Get id
+ * @return id
+ **/
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ /**
+ * Get petId
+ * @return petId
+ **/
+ public Long getPetId() {
+ return petId;
+ }
+ public void setPetId(Long petId) {
+ this.petId = petId;
+ }
+ /**
+ * Get quantity
+ * @return quantity
+ **/
+ public Integer getQuantity() {
+ return quantity;
+ }
+ public void setQuantity(Integer quantity) {
+ this.quantity = quantity;
+ }
+ /**
+ * Get shipDate
+ * @return shipDate
+ **/
+ public javax.xml.datatype.XMLGregorianCalendar getShipDate() {
+ return shipDate;
+ }
+ public void setShipDate(javax.xml.datatype.XMLGregorianCalendar shipDate) {
+ this.shipDate = shipDate;
+ }
+ /**
+ * Order Status
+ * @return status
+ **/
+ public StatusEnum getStatus() {
+ return status;
+ }
+ public void setStatus(StatusEnum status) {
+ this.status = status;
+ }
+ /**
+ * Get complete
+ * @return complete
+ **/
+ public Boolean getComplete() {
+ return complete;
+ }
+ public void setComplete(Boolean complete) {
+ this.complete = 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 static String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Pet.java
new file mode 100644
index 000000000000..0cfc0a30ee0e
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Pet.java
@@ -0,0 +1,154 @@
+package io.swagger.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.model.Category;
+import io.swagger.model.Tag;
+import java.util.ArrayList;
+import java.util.List;
+
+import io.swagger.annotations.ApiModelProperty;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+
+@ApiModel(description="A pet for sale in the pet store")
+public class Pet {
+
+ @ApiModelProperty(example = "null", value = "")
+ private Long id = null;
+ @ApiModelProperty(example = "null", value = "")
+ private Category category = null;
+ @ApiModelProperty(example = "doggie", required = true, value = "")
+ private String name = null;
+ @ApiModelProperty(example = "null", required = true, value = "")
+ private List photoUrls = new ArrayList();
+ @ApiModelProperty(example = "null", value = "")
+ private List tags = new ArrayList();
+
+@XmlType(name="StatusEnum")
+@XmlEnum(String.class)
+public enum StatusEnum {
+
+ @XmlEnumValue("available") AVAILABLE(String.valueOf("available")), @XmlEnumValue("pending") PENDING(String.valueOf("pending")), @XmlEnumValue("sold") SOLD(String.valueOf("sold"));
+
+
+ private String value;
+
+ StatusEnum (String v) {
+ value = v;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static StatusEnum fromValue(String v) {
+ for (StatusEnum b : StatusEnum.values()) {
+ if (String.valueOf(b.value).equals(v)) {
+ return b;
+ }
+ }
+ return null;
+ }
+}
+
+ @ApiModelProperty(example = "null", value = "pet status in the store")
+ private StatusEnum status = null;
+
+ /**
+ * Get id
+ * @return id
+ **/
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ /**
+ * Get category
+ * @return category
+ **/
+ public Category getCategory() {
+ return category;
+ }
+ public void setCategory(Category category) {
+ this.category = category;
+ }
+ /**
+ * Get name
+ * @return name
+ **/
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ /**
+ * Get photoUrls
+ * @return photoUrls
+ **/
+ public List getPhotoUrls() {
+ return photoUrls;
+ }
+ public void setPhotoUrls(List photoUrls) {
+ this.photoUrls = photoUrls;
+ }
+ /**
+ * Get tags
+ * @return tags
+ **/
+ public List getTags() {
+ return tags;
+ }
+ public void setTags(List tags) {
+ this.tags = tags;
+ }
+ /**
+ * pet status in the store
+ * @return status
+ **/
+ public StatusEnum getStatus() {
+ return status;
+ }
+ public void setStatus(StatusEnum status) {
+ this.status = status;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Pet {\n");
+
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" category: ").append(toIndentedString(category)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).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 static String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Tag.java
new file mode 100644
index 000000000000..4eb99ad2fc1a
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Tag.java
@@ -0,0 +1,65 @@
+package io.swagger.model;
+
+import io.swagger.annotations.ApiModel;
+
+import io.swagger.annotations.ApiModelProperty;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+
+@ApiModel(description="A tag for a pet")
+public class Tag {
+
+ @ApiModelProperty(example = "null", value = "")
+ private Long id = null;
+ @ApiModelProperty(example = "null", value = "")
+ private String name = null;
+
+ /**
+ * Get id
+ * @return id
+ **/
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ /**
+ * Get name
+ * @return name
+ **/
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = 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 static String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/User.java
new file mode 100644
index 000000000000..005d9aa8c74b
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/User.java
@@ -0,0 +1,143 @@
+package io.swagger.model;
+
+import io.swagger.annotations.ApiModel;
+
+import io.swagger.annotations.ApiModelProperty;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+
+@ApiModel(description="A User who is purchasing from the pet store")
+public class User {
+
+ @ApiModelProperty(example = "null", value = "")
+ private Long id = null;
+ @ApiModelProperty(example = "null", value = "")
+ private String username = null;
+ @ApiModelProperty(example = "null", value = "")
+ private String firstName = null;
+ @ApiModelProperty(example = "null", value = "")
+ private String lastName = null;
+ @ApiModelProperty(example = "null", value = "")
+ private String email = null;
+ @ApiModelProperty(example = "null", value = "")
+ private String password = null;
+ @ApiModelProperty(example = "null", value = "")
+ private String phone = null;
+ @ApiModelProperty(example = "null", value = "User Status")
+ private Integer userStatus = null;
+
+ /**
+ * Get id
+ * @return id
+ **/
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ /**
+ * Get username
+ * @return username
+ **/
+ public String getUsername() {
+ return username;
+ }
+ public void setUsername(String username) {
+ this.username = username;
+ }
+ /**
+ * Get firstName
+ * @return firstName
+ **/
+ public String getFirstName() {
+ return firstName;
+ }
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+ /**
+ * Get lastName
+ * @return lastName
+ **/
+ public String getLastName() {
+ return lastName;
+ }
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+ /**
+ * Get email
+ * @return email
+ **/
+ public String getEmail() {
+ return email;
+ }
+ public void setEmail(String email) {
+ this.email = email;
+ }
+ /**
+ * Get password
+ * @return password
+ **/
+ public String getPassword() {
+ return password;
+ }
+ public void setPassword(String password) {
+ this.password = password;
+ }
+ /**
+ * Get phone
+ * @return phone
+ **/
+ public String getPhone() {
+ return phone;
+ }
+ public void setPhone(String phone) {
+ this.phone = phone;
+ }
+ /**
+ * User Status
+ * @return userStatus
+ **/
+ public Integer getUserStatus() {
+ return userStatus;
+ }
+ public void setUserStatus(Integer userStatus) {
+ this.userStatus = 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 static String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
new file mode 100644
index 000000000000..d9b9345d3396
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java
@@ -0,0 +1,71 @@
+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/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
new file mode 100644
index 000000000000..3f791097b6b1
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java
@@ -0,0 +1,46 @@
+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/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
new file mode 100644
index 000000000000..861273cfb7b4
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java
@@ -0,0 +1,70 @@
+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/server/petstore/jaxrs-cxf-non-spring-app/src/main/webapp/WEB-INF/web.xml b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 000000000000..f10eaf1921bd
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,24 @@
+
+
+
+
+ CXF Non-Spring Jaxrs Servlet
+ CXFNonSpringJaxrsServlet
+ org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet
+
+ jaxrs.serviceClasses
+ io.swagger.api.impl.PetApiServiceImpl,io.swagger.api.impl.StoreApiServiceImpl,io.swagger.api.impl.UserApiServiceImpl
+
+
+ jaxrs.providers
+ com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider
+
+
+
+
+ CXFNonSpringJaxrsServlet
+ /rest/*
+
+
+
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/api/PetApiTest.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/api/PetApiTest.java
new file mode 100644
index 000000000000..bbb67c243906
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/api/PetApiTest.java
@@ -0,0 +1,221 @@
+/**
+ * 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.
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: apiteam@swagger.io
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package io.swagger.api;
+
+import java.io.File;
+import io.swagger.model.ModelApiResponse;
+import io.swagger.model.Pet;
+import org.junit.Test;
+import org.junit.Before;
+import static org.junit.Assert.*;
+
+import javax.ws.rs.core.Response;
+import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
+import org.apache.cxf.jaxrs.client.ClientConfiguration;
+import org.apache.cxf.jaxrs.client.WebClient;
+
+
+import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+
+
+/**
+ * API tests for PetApi
+ */
+public class PetApiTest {
+
+
+ private PetApi api;
+
+ @Before
+ public void setup() {
+ JacksonJsonProvider provider = new JacksonJsonProvider();
+ List providers = new ArrayList();
+ providers.add(provider);
+
+ api = JAXRSClientFactory.create("http://petstore.swagger.io/v2", PetApi.class, providers);
+ org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
+
+ ClientConfiguration config = WebClient.getConfig(client);
+ }
+
+
+ /**
+ * Add a new pet to the store
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void addPetTest() {
+ Pet body = null;
+ //api.addPet(body);
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Deletes a pet
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void deletePetTest() {
+ Long petId = null;
+ String apiKey = null;
+ //api.deletePet(petId, apiKey);
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Finds Pets by status
+ *
+ * Multiple status values can be provided with comma separated strings
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void findPetsByStatusTest() {
+ List status = null;
+ //List response = api.findPetsByStatus(status);
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Finds Pets by tags
+ *
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void findPetsByTagsTest() {
+ List tags = null;
+ //List response = api.findPetsByTags(tags);
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Find pet by ID
+ *
+ * Returns a single pet
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void getPetByIdTest() {
+ Long petId = null;
+ //Pet response = api.getPetById(petId);
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Update an existing pet
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void updatePetTest() {
+ Pet body = null;
+ //api.updatePet(body);
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Updates a pet in the store with form data
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void updatePetWithFormTest() {
+ Long petId = null;
+ String name = null;
+ String status = null;
+ //api.updatePetWithForm(petId, name, status);
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * uploads an image
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void uploadFileTest() {
+ Long petId = null;
+ String additionalMetadata = null;
+ org.apache.cxf.jaxrs.ext.multipart.Attachment file = null;
+ //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+}
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/api/StoreApiTest.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/api/StoreApiTest.java
new file mode 100644
index 000000000000..af89e255a9ff
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/api/StoreApiTest.java
@@ -0,0 +1,142 @@
+/**
+ * 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.
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: apiteam@swagger.io
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package io.swagger.api;
+
+import java.util.Map;
+import io.swagger.model.Order;
+import org.junit.Test;
+import org.junit.Before;
+import static org.junit.Assert.*;
+
+import javax.ws.rs.core.Response;
+import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
+import org.apache.cxf.jaxrs.client.ClientConfiguration;
+import org.apache.cxf.jaxrs.client.WebClient;
+
+
+import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+
+
+/**
+ * API tests for StoreApi
+ */
+public class StoreApiTest {
+
+
+ private StoreApi api;
+
+ @Before
+ public void setup() {
+ JacksonJsonProvider provider = new JacksonJsonProvider();
+ List providers = new ArrayList();
+ providers.add(provider);
+
+ api = JAXRSClientFactory.create("http://petstore.swagger.io/v2", StoreApi.class, providers);
+ org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
+
+ ClientConfiguration config = WebClient.getConfig(client);
+ }
+
+
+ /**
+ * Delete purchase order by ID
+ *
+ * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void deleteOrderTest() {
+ String orderId = null;
+ //api.deleteOrder(orderId);
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Returns pet inventories by status
+ *
+ * Returns a map of status codes to quantities
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void getInventoryTest() {
+ //Map response = api.getInventory();
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Find purchase order by ID
+ *
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void getOrderByIdTest() {
+ Long orderId = null;
+ //Order response = api.getOrderById(orderId);
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Place an order for a pet
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void placeOrderTest() {
+ Order body = null;
+ //Order response = api.placeOrder(body);
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+}
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/api/UserApiTest.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/api/UserApiTest.java
new file mode 100644
index 000000000000..f789f0fc9366
--- /dev/null
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/api/UserApiTest.java
@@ -0,0 +1,216 @@
+/**
+ * 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.
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: apiteam@swagger.io
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package io.swagger.api;
+
+import java.util.List;
+import io.swagger.model.User;
+import org.junit.Test;
+import org.junit.Before;
+import static org.junit.Assert.*;
+
+import javax.ws.rs.core.Response;
+import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
+import org.apache.cxf.jaxrs.client.ClientConfiguration;
+import org.apache.cxf.jaxrs.client.WebClient;
+
+
+import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+
+
+/**
+ * API tests for UserApi
+ */
+public class UserApiTest {
+
+
+ private UserApi api;
+
+ @Before
+ public void setup() {
+ JacksonJsonProvider provider = new JacksonJsonProvider();
+ List providers = new ArrayList();
+ providers.add(provider);
+
+ api = JAXRSClientFactory.create("http://petstore.swagger.io/v2", UserApi.class, providers);
+ org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
+
+ ClientConfiguration config = WebClient.getConfig(client);
+ }
+
+
+ /**
+ * Create user
+ *
+ * This can only be done by the logged in user.
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void createUserTest() {
+ User body = null;
+ //api.createUser(body);
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Creates list of users with given input array
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void createUsersWithArrayInputTest() {
+ List body = null;
+ //api.createUsersWithArrayInput(body);
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Creates list of users with given input array
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void createUsersWithListInputTest() {
+ List body = null;
+ //api.createUsersWithListInput(body);
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Delete user
+ *
+ * This can only be done by the logged in user.
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void deleteUserTest() {
+ String username = null;
+ //api.deleteUser(username);
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Get user by user name
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void getUserByNameTest() {
+ String username = null;
+ //User response = api.getUserByName(username);
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Logs user into the system
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void loginUserTest() {
+ String username = null;
+ String password = null;
+ //String response = api.loginUser(username, password);
+ //assertNotNull(response);
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Logs out current logged in user session
+ *
+ *
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void logoutUserTest() {
+ //api.logoutUser();
+
+ // TODO: test validations
+
+
+ }
+
+ /**
+ * Updated user
+ *
+ * This can only be done by the logged in user.
+ *
+ * @throws ApiException
+ * if the Api call fails
+ */
+ @Test
+ public void updateUserTest() {
+ String username = null;
+ User body = null;
+ //api.updateUser(username, body);
+
+ // TODO: test validations
+
+
+ }
+
+}