diff --git a/bin/android-petstore-volley.json b/bin/android-petstore-volley.json
index 913ef5c0139..7366f4817c9 100644
--- a/bin/android-petstore-volley.json
+++ b/bin/android-petstore-volley.json
@@ -1,4 +1,4 @@
{
"library": "volley",
- "artifactId": "swagger-petstore-android-volley"
+ "artifactId": "petstore-android-volley"
}
diff --git a/bin/java-petstore-feign.json b/bin/java-petstore-feign.json
index 5502ee3bbad..2b1db7d5f96 100644
--- a/bin/java-petstore-feign.json
+++ b/bin/java-petstore-feign.json
@@ -1,4 +1,4 @@
{
"library": "feign",
- "artifactId": "swagger-petstore-feign"
+ "artifactId": "petstore-feign"
}
diff --git a/bin/java-petstore-google-api-client.json b/bin/java-petstore-google-api-client.json
index 66df1f8c601..c25698724b0 100644
--- a/bin/java-petstore-google-api-client.json
+++ b/bin/java-petstore-google-api-client.json
@@ -1,4 +1,4 @@
{
"library": "google-api-client",
- "artifactId": "swagger-petstore-google-api-client"
+ "artifactId": "petstore-google-api-client"
}
diff --git a/bin/java-petstore-jersey1.sh b/bin/java-petstore-jersey1.sh
index 988ce6e4deb..19005ca2114 100755
--- a/bin/java-petstore-jersey1.sh
+++ b/bin/java-petstore-jersey1.sh
@@ -27,7 +27,7 @@ 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/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -o samples/client/petstore/java/jersey1 -DhideGenerationTimestamp=true --library=jersey1"
+ags="$@ generate --artifact-id petstore-java-client-jersey1 -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -o samples/client/petstore/java/jersey1 -DhideGenerationTimestamp=true --library=jersey1"
echo "Removing files and folders under samples/client/petstore/java/jersey1/src/main"
rm -rf samples/client/petstore/java/jersey1/src/main
diff --git a/bin/java-petstore-jersey2.json b/bin/java-petstore-jersey2.json
index 6efa52949a4..79ed4cbc2e1 100644
--- a/bin/java-petstore-jersey2.json
+++ b/bin/java-petstore-jersey2.json
@@ -1,4 +1,4 @@
{
"library": "jersey2",
- "artifactId": "swagger-petstore-jersey2"
+ "artifactId": "petstore-jersey2"
}
diff --git a/bin/java-petstore-okhttp-gson-parcelable.sh b/bin/java-petstore-okhttp-gson-parcelable.sh
index 49f62b15c03..f6bad79d995 100755
--- a/bin/java-petstore-okhttp-gson-parcelable.sh
+++ b/bin/java-petstore-okhttp-gson-parcelable.sh
@@ -27,7 +27,7 @@ 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/openapi-generator/src/main/resources/Java/libraries/okhttp-gson -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java-petstore-okhttp-gson.json -o samples/client/petstore/java/okhttp-gson-parcelableModel -DhideGenerationTimestamp=true,parcelableModel=true"
+ags="$@ generate --artifact-id petstore-okhttp-gson-parcelableModel -t modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java-petstore-okhttp-gson.json -o samples/client/petstore/java/okhttp-gson-parcelableModel -DhideGenerationTimestamp=true,parcelableModel=true"
rm -rf samples/client/petstore/java/okhttp-gson-parcelableModel/src/main
find samples/client/petstore/java/okhttp-gson-parcelableModel -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
diff --git a/bin/java-petstore-okhttp-gson.json b/bin/java-petstore-okhttp-gson.json
index b894d172630..8ee5473563b 100644
--- a/bin/java-petstore-okhttp-gson.json
+++ b/bin/java-petstore-okhttp-gson.json
@@ -1,4 +1,4 @@
{
"library": "okhttp-gson",
- "artifactId": "swagger-petstore-okhttp-gson"
+ "artifactId": "petstore-okhttp-gson"
}
diff --git a/bin/java-petstore-rest-assured.json b/bin/java-petstore-rest-assured.json
index 0e56d218fa2..86e6216a23f 100644
--- a/bin/java-petstore-rest-assured.json
+++ b/bin/java-petstore-rest-assured.json
@@ -1,4 +1,4 @@
{
"library": "rest-assured",
- "artifactId": "swagger-petstore-rest-assured"
+ "artifactId": "petstore-rest-assured"
}
diff --git a/bin/java-petstore-resteasy.json b/bin/java-petstore-resteasy.json
index 772ae582002..6998a56fd74 100644
--- a/bin/java-petstore-resteasy.json
+++ b/bin/java-petstore-resteasy.json
@@ -1,4 +1,4 @@
{
"library": "resteasy",
- "artifactId": "swagger-petstore-resteasy"
+ "artifactId": "petstore-resteasy"
}
diff --git a/bin/java-petstore-resttemplate.json b/bin/java-petstore-resttemplate.json
index c5cfe6b2cdd..ab1bc1e4dd7 100644
--- a/bin/java-petstore-resttemplate.json
+++ b/bin/java-petstore-resttemplate.json
@@ -1,4 +1,4 @@
{
"library": "resttemplate",
- "artifactId": "swagger-petstore-resttemplate"
+ "artifactId": "petstore-resttemplate"
}
diff --git a/bin/java-petstore-retrofit.json b/bin/java-petstore-retrofit.json
index 86da9d17099..34ca51f008b 100644
--- a/bin/java-petstore-retrofit.json
+++ b/bin/java-petstore-retrofit.json
@@ -1,4 +1,4 @@
{
"library": "retrofit",
- "artifactId": "swagger-petstore-retrofit"
+ "artifactId": "petstore-retrofit"
}
diff --git a/bin/java-petstore-retrofit2-play24.sh b/bin/java-petstore-retrofit2-play24.sh
index 640f45d3aa3..eab84d44178 100755
--- a/bin/java-petstore-retrofit2-play24.sh
+++ b/bin/java-petstore-retrofit2-play24.sh
@@ -27,7 +27,7 @@ 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 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java-petstore-retrofit2-play24.json -o samples/client/petstore/java/retrofit2-play24 -DhideGenerationTimestamp=true"
+ags="$@ generate --artifact-id petstore-java-client-retrofit2-play24 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java-petstore-retrofit2-play24.json -o samples/client/petstore/java/retrofit2-play24 -DhideGenerationTimestamp=true"
echo "Removing files and folders under samples/client/petstore/java/retrofit2-play24/src/main"
rm -rf samples/client/petstore/java/retrofit2-play24/src/main
diff --git a/bin/java-petstore-retrofit2-play25.sh b/bin/java-petstore-retrofit2-play25.sh
index 53f987f4b6c..7d6e3dabaef 100755
--- a/bin/java-petstore-retrofit2-play25.sh
+++ b/bin/java-petstore-retrofit2-play25.sh
@@ -27,7 +27,7 @@ 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 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java-petstore-retrofit2-play25.json -o samples/client/petstore/java/retrofit2-play25 -DhideGenerationTimestamp=true"
+ags="$@ generate --artifact-id petstore-java-client-retrofit2-play25 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java-petstore-retrofit2-play25.json -o samples/client/petstore/java/retrofit2-play25 -DhideGenerationTimestamp=true"
echo "Removing files and folders under samples/client/petstore/java/retrofit2-play25/src/main"
rm -rf samples/client/petstore/java/retrofit2-play25/src/main
diff --git a/bin/java-petstore-retrofit2.json b/bin/java-petstore-retrofit2.json
index 4829fd6dd4b..dd835a73442 100644
--- a/bin/java-petstore-retrofit2.json
+++ b/bin/java-petstore-retrofit2.json
@@ -1,4 +1,4 @@
{
"library": "retrofit2",
- "artifactId": "swagger-petstore-retrofit2"
+ "artifactId": "petstore-retrofit2"
}
diff --git a/bin/java-petstore-retrofit2rx.json b/bin/java-petstore-retrofit2rx.json
index c9e4301f2da..739b1ddd272 100644
--- a/bin/java-petstore-retrofit2rx.json
+++ b/bin/java-petstore-retrofit2rx.json
@@ -1,4 +1,4 @@
{
"library": "retrofit2",
- "artifactId": "swagger-petstore-retrofit2-rx"
+ "artifactId": "petstore-retrofit2-rx"
}
diff --git a/bin/java-petstore-retrofit2rx2.json b/bin/java-petstore-retrofit2rx2.json
index 39e06109a62..1f4fb291897 100644
--- a/bin/java-petstore-retrofit2rx2.json
+++ b/bin/java-petstore-retrofit2rx2.json
@@ -1,4 +1,4 @@
{
"library": "retrofit2",
- "artifactId": "swagger-petstore-retrofit2-rx2"
+ "artifactId": "petstore-retrofit2-rx2"
}
diff --git a/bin/java-petstore-vertx.json b/bin/java-petstore-vertx.json
index 9f979f78605..6fd532ccfe4 100644
--- a/bin/java-petstore-vertx.json
+++ b/bin/java-petstore-vertx.json
@@ -1,4 +1,4 @@
{
"library": "vertx",
- "artifactId": "swagger-petstore-vertx"
+ "artifactId": "petstore-vertx"
}
diff --git a/bin/java8-petstore-jersey2.json b/bin/java8-petstore-jersey2.json
index 0b390ba2d67..2c5ee492f6c 100644
--- a/bin/java8-petstore-jersey2.json
+++ b/bin/java8-petstore-jersey2.json
@@ -1,5 +1,5 @@
{
"library": "jersey2",
- "artifactId": "swagger-petstore-jersey2",
+ "artifactId": "petstore-jersey2",
"dateLibrary": "java8"
}
diff --git a/bin/java8-petstore-jersey2.sh b/bin/java8-petstore-jersey2.sh
index 20bc858f101..1fc9be47fa0 100755
--- a/bin/java8-petstore-jersey2.sh
+++ b/bin/java8-petstore-jersey2.sh
@@ -27,7 +27,7 @@ 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 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java8-petstore-jersey2.json -o samples/client/petstore/java/jersey2-java8 -DhideGenerationTimestamp=true"
+ags="$@ generate --artifact-id petstore-jersey2-java8 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java8-petstore-jersey2.json -o samples/client/petstore/java/jersey2-java8 -DhideGenerationTimestamp=true"
echo "Removing files and folders under samples/client/petstore/java/jersey2-java8/src/main"
rm -rf samples/client/petstore/java/jersey2-java8/src/main
diff --git a/bin/spring-cloud-feign-petstore.json b/bin/spring-cloud-feign-petstore.json
index 7425cee47f6..572f58c1c7e 100644
--- a/bin/spring-cloud-feign-petstore.json
+++ b/bin/spring-cloud-feign-petstore.json
@@ -1,4 +1,4 @@
{
"library": "spring-cloud",
- "artifactId": "swagger-petstore-spring-cloud"
+ "artifactId": "petstore-spring-cloud"
}
diff --git a/bin/spring-mvc-petstore-j8-async.json b/bin/spring-mvc-petstore-j8-async.json
index 92baa989c36..b73cbb09fe4 100644
--- a/bin/spring-mvc-petstore-j8-async.json
+++ b/bin/spring-mvc-petstore-j8-async.json
@@ -2,5 +2,5 @@
"java8": true,
"async": true,
"library": "spring-mvc",
- "artifactId": "swagger-spring-mvc-server-j8-async"
+ "artifactId": "spring-mvc-server-j8-async"
}
diff --git a/bin/spring-mvc-petstore-j8-localdatetime.json b/bin/spring-mvc-petstore-j8-localdatetime.json
index 4fc23da84fd..6eeb5d21443 100644
--- a/bin/spring-mvc-petstore-j8-localdatetime.json
+++ b/bin/spring-mvc-petstore-j8-localdatetime.json
@@ -1,5 +1,5 @@
{
"library": "spring-mvc",
"dateLibrary": "java8-localdatetime",
- "artifactId": "swagger-spring-mvc-j8-localdatetime"
+ "artifactId": "spring-mvc-j8-localdatetime"
}
diff --git a/bin/spring-mvc-petstore-server.json b/bin/spring-mvc-petstore-server.json
index 4642abf8015..d07026ffcbc 100644
--- a/bin/spring-mvc-petstore-server.json
+++ b/bin/spring-mvc-petstore-server.json
@@ -1,4 +1,4 @@
{
"library": "spring-mvc",
- "artifactId": "swagger-spring-mvc-server"
+ "artifactId": "spring-mvc-server"
}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/api.mustache
index 6538ed53d2f..9d43d64d78a 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/api.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/api.mustache
@@ -8,6 +8,8 @@ import {{invokerPackage}}.CollectionFormats.*;
import retrofit2.http.*;
import okhttp3.RequestBody;
+import okhttp3.ResponseBody;
+import okhttp3.MultipartBody;
{{#imports}}import {{import}};
{{/imports}}
diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/api.mustache
index 51b1812b49e..32de090e435 100644
--- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/api.mustache
+++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/api.mustache
@@ -8,6 +8,8 @@ import {{invokerPackage}}.CollectionFormats.*;
import retrofit2.http.*;
import okhttp3.RequestBody;
+import okhttp3.ResponseBody;
+import okhttp3.MultipartBody;
{{#imports}}import {{import}};
{{/imports}}
diff --git a/samples/client/petstore/java/feign/.openapi-generator-ignore b/samples/client/petstore/java/feign/.openapi-generator-ignore
index c5fa491b4c5..7484ee590a3 100644
--- a/samples/client/petstore/java/feign/.openapi-generator-ignore
+++ b/samples/client/petstore/java/feign/.openapi-generator-ignore
@@ -1,11 +1,11 @@
-# Swagger Codegen Ignore
-# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# 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:
+# You can make changes and tell OpenAPI Generator 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 (*):
diff --git a/samples/client/petstore/java/feign/README.md b/samples/client/petstore/java/feign/README.md
index d5d447e2865..3bad98d153e 100644
--- a/samples/client/petstore/java/feign/README.md
+++ b/samples/client/petstore/java/feign/README.md
@@ -1,4 +1,4 @@
-# swagger-petstore-feign
+# petstore-feign
## Requirements
@@ -24,8 +24,8 @@ After the client library is installed/deployed, you can use it in your Maven pro
```xml
- io.swagger
- swagger-petstore-feign
+ org.openapitools
+ petstore-feign1.0.0compile
@@ -34,7 +34,7 @@ After the client library is installed/deployed, you can use it in your Maven pro
## Recommendation
-It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issue.
+It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.
## Author
diff --git a/samples/client/petstore/java/feign/build.gradle b/samples/client/petstore/java/feign/build.gradle
index bacb0517115..b4d7da79267 100644
--- a/samples/client/petstore/java/feign/build.gradle
+++ b/samples/client/petstore/java/feign/build.gradle
@@ -1,7 +1,7 @@
apply plugin: 'idea'
apply plugin: 'eclipse'
-group = 'io.swagger'
+group = 'org.openapitools'
version = '1.0.0'
buildscript {
@@ -83,7 +83,7 @@ if(hasProperty('target') && target == 'android') {
install {
repositories.mavenInstaller {
- pom.artifactId = 'swagger-petstore-feign'
+ pom.artifactId = 'petstore-feign'
}
}
diff --git a/samples/client/petstore/java/feign/build.sbt b/samples/client/petstore/java/feign/build.sbt
index fac8ce229a7..0b09ff26bd1 100644
--- a/samples/client/petstore/java/feign/build.sbt
+++ b/samples/client/petstore/java/feign/build.sbt
@@ -1,7 +1,7 @@
lazy val root = (project in file(".")).
settings(
- organization := "io.swagger",
- name := "swagger-petstore-feign",
+ organization := "org.openapitools",
+ name := "petstore-feign",
version := "1.0.0",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
diff --git a/samples/client/petstore/java/feign/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/feign/docs/AdditionalPropertiesClass.md
deleted file mode 100644
index 0437c4dd8cc..00000000000
--- a/samples/client/petstore/java/feign/docs/AdditionalPropertiesClass.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-# AdditionalPropertiesClass
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**mapProperty** | **Map<String, String>** | | [optional]
-**mapOfMapProperty** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/Animal.md b/samples/client/petstore/java/feign/docs/Animal.md
deleted file mode 100644
index b3f325c3524..00000000000
--- a/samples/client/petstore/java/feign/docs/Animal.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-# Animal
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**className** | **String** | |
-**color** | **String** | | [optional]
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/feign/docs/ArrayOfArrayOfNumberOnly.md
deleted file mode 100644
index 77292549927..00000000000
--- a/samples/client/petstore/java/feign/docs/ArrayOfArrayOfNumberOnly.md
+++ /dev/null
@@ -1,10 +0,0 @@
-
-# ArrayOfArrayOfNumberOnly
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**arrayArrayNumber** | [**List<List<BigDecimal>>**](List.md) | | [optional]
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/feign/docs/ArrayOfNumberOnly.md
deleted file mode 100644
index e8cc4cd36dc..00000000000
--- a/samples/client/petstore/java/feign/docs/ArrayOfNumberOnly.md
+++ /dev/null
@@ -1,10 +0,0 @@
-
-# ArrayOfNumberOnly
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**arrayNumber** | [**List<BigDecimal>**](BigDecimal.md) | | [optional]
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/ArrayTest.md b/samples/client/petstore/java/feign/docs/ArrayTest.md
deleted file mode 100644
index 9feee16427f..00000000000
--- a/samples/client/petstore/java/feign/docs/ArrayTest.md
+++ /dev/null
@@ -1,12 +0,0 @@
-
-# ArrayTest
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**arrayOfString** | **List<String>** | | [optional]
-**arrayArrayOfInteger** | [**List<List<Long>>**](List.md) | | [optional]
-**arrayArrayOfModel** | [**List<List<ReadOnlyFirst>>**](List.md) | | [optional]
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/Cat.md b/samples/client/petstore/java/feign/docs/Cat.md
deleted file mode 100644
index be6e56fa8ce..00000000000
--- a/samples/client/petstore/java/feign/docs/Cat.md
+++ /dev/null
@@ -1,12 +0,0 @@
-
-# Cat
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**className** | **String** | |
-**color** | **String** | | [optional]
-**declawed** | **Boolean** | | [optional]
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/Category.md b/samples/client/petstore/java/feign/docs/Category.md
deleted file mode 100644
index e2df0803278..00000000000
--- a/samples/client/petstore/java/feign/docs/Category.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-# Category
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**id** | **Long** | | [optional]
-**name** | **String** | | [optional]
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/Dog.md b/samples/client/petstore/java/feign/docs/Dog.md
deleted file mode 100644
index 71a7dbe809e..00000000000
--- a/samples/client/petstore/java/feign/docs/Dog.md
+++ /dev/null
@@ -1,12 +0,0 @@
-
-# Dog
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**className** | **String** | |
-**color** | **String** | | [optional]
-**breed** | **String** | | [optional]
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/EnumClass.md b/samples/client/petstore/java/feign/docs/EnumClass.md
deleted file mode 100644
index c746edc3cb1..00000000000
--- a/samples/client/petstore/java/feign/docs/EnumClass.md
+++ /dev/null
@@ -1,14 +0,0 @@
-
-# EnumClass
-
-## Enum
-
-
-* `_ABC` (value: `"_abc"`)
-
-* `_EFG` (value: `"-efg"`)
-
-* `_XYZ_` (value: `"(xyz)"`)
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/EnumTest.md b/samples/client/petstore/java/feign/docs/EnumTest.md
deleted file mode 100644
index deb1951c552..00000000000
--- a/samples/client/petstore/java/feign/docs/EnumTest.md
+++ /dev/null
@@ -1,36 +0,0 @@
-
-# EnumTest
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional]
-**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional]
-**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional]
-
-
-
-## Enum: EnumStringEnum
-Name | Value
----- | -----
-UPPER | "UPPER"
-LOWER | "lower"
-
-
-
-## Enum: EnumIntegerEnum
-Name | Value
----- | -----
-NUMBER_1 | 1
-NUMBER_MINUS_1 | -1
-
-
-
-## Enum: EnumNumberEnum
-Name | Value
----- | -----
-NUMBER_1_DOT_1 | 1.1
-NUMBER_MINUS_1_DOT_2 | -1.2
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/FakeApi.md b/samples/client/petstore/java/feign/docs/FakeApi.md
deleted file mode 100644
index 21a4db7c377..00000000000
--- a/samples/client/petstore/java/feign/docs/FakeApi.md
+++ /dev/null
@@ -1,122 +0,0 @@
-# FakeApi
-
-All URIs are relative to *http://petstore.swagger.io/v2*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
-[**testEnumQueryParameters**](FakeApi.md#testEnumQueryParameters) | **GET** /fake | To test enum query parameters
-
-
-
-# **testEndpointParameters**
-> testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password)
-
-Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
-
-Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiException;
-//import io.swagger.client.api.FakeApi;
-
-
-FakeApi apiInstance = new FakeApi();
-BigDecimal number = new BigDecimal(); // BigDecimal | None
-Double _double = 3.4D; // Double | None
-String string = "string_example"; // String | None
-byte[] _byte = B; // byte[] | None
-Integer integer = 56; // Integer | None
-Integer int32 = 56; // Integer | None
-Long int64 = 789L; // Long | None
-Float _float = 3.4F; // Float | None
-byte[] binary = B; // byte[] | None
-LocalDate date = new LocalDate(); // LocalDate | None
-DateTime dateTime = new DateTime(); // DateTime | None
-String password = "password_example"; // String | None
-try {
- apiInstance.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testEndpointParameters");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **number** | **BigDecimal**| None |
- **_double** | **Double**| None |
- **string** | **String**| None |
- **_byte** | **byte[]**| None |
- **integer** | **Integer**| None | [optional]
- **int32** | **Integer**| None | [optional]
- **int64** | **Long**| None | [optional]
- **_float** | **Float**| None | [optional]
- **binary** | **byte[]**| None | [optional]
- **date** | **LocalDate**| None | [optional]
- **dateTime** | **DateTime**| None | [optional]
- **password** | **String**| None | [optional]
-
-### Return type
-
-null (empty response body)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: application/xml; charset=utf-8, application/json; charset=utf-8
- - **Accept**: application/xml; charset=utf-8, application/json; charset=utf-8
-
-
-# **testEnumQueryParameters**
-> testEnumQueryParameters(enumQueryString, enumQueryInteger, enumQueryDouble)
-
-To test enum query parameters
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiException;
-//import io.swagger.client.api.FakeApi;
-
-
-FakeApi apiInstance = new FakeApi();
-String enumQueryString = "-efg"; // String | Query parameter enum test (string)
-BigDecimal enumQueryInteger = new BigDecimal(); // BigDecimal | Query parameter enum test (double)
-Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double)
-try {
- apiInstance.testEnumQueryParameters(enumQueryString, enumQueryInteger, enumQueryDouble);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testEnumQueryParameters");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
- **enumQueryInteger** | **BigDecimal**| Query parameter enum test (double) | [optional]
- **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional]
-
-### Return type
-
-null (empty response body)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: application/json
- - **Accept**: application/json
-
diff --git a/samples/client/petstore/java/feign/docs/FormatTest.md b/samples/client/petstore/java/feign/docs/FormatTest.md
deleted file mode 100644
index 44de7d9511a..00000000000
--- a/samples/client/petstore/java/feign/docs/FormatTest.md
+++ /dev/null
@@ -1,22 +0,0 @@
-
-# FormatTest
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**integer** | **Integer** | | [optional]
-**int32** | **Integer** | | [optional]
-**int64** | **Long** | | [optional]
-**number** | [**BigDecimal**](BigDecimal.md) | |
-**_float** | **Float** | | [optional]
-**_double** | **Double** | | [optional]
-**string** | **String** | | [optional]
-**_byte** | **byte[]** | |
-**binary** | **byte[]** | | [optional]
-**date** | [**LocalDate**](LocalDate.md) | |
-**dateTime** | [**DateTime**](DateTime.md) | | [optional]
-**uuid** | **String** | | [optional]
-**password** | **String** | |
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/feign/docs/HasOnlyReadOnly.md
deleted file mode 100644
index c1d0aac5672..00000000000
--- a/samples/client/petstore/java/feign/docs/HasOnlyReadOnly.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-# HasOnlyReadOnly
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**bar** | **String** | | [optional]
-**foo** | **String** | | [optional]
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/MapTest.md b/samples/client/petstore/java/feign/docs/MapTest.md
deleted file mode 100644
index c671e97ffbc..00000000000
--- a/samples/client/petstore/java/feign/docs/MapTest.md
+++ /dev/null
@@ -1,17 +0,0 @@
-
-# MapTest
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
-**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional]
-
-
-
-## Enum: Map<String, InnerEnum>
-Name | Value
----- | -----
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/feign/docs/MixedPropertiesAndAdditionalPropertiesClass.md
deleted file mode 100644
index e3487bcc501..00000000000
--- a/samples/client/petstore/java/feign/docs/MixedPropertiesAndAdditionalPropertiesClass.md
+++ /dev/null
@@ -1,12 +0,0 @@
-
-# MixedPropertiesAndAdditionalPropertiesClass
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**uuid** | **String** | | [optional]
-**dateTime** | [**DateTime**](DateTime.md) | | [optional]
-**map** | [**Map<String, Animal>**](Animal.md) | | [optional]
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/Model200Response.md b/samples/client/petstore/java/feign/docs/Model200Response.md
deleted file mode 100644
index b47618b28cc..00000000000
--- a/samples/client/petstore/java/feign/docs/Model200Response.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-# Model200Response
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**name** | **Integer** | | [optional]
-**PropertyClass** | **String** | | [optional]
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/ModelApiResponse.md b/samples/client/petstore/java/feign/docs/ModelApiResponse.md
deleted file mode 100644
index 3eec8686cc9..00000000000
--- a/samples/client/petstore/java/feign/docs/ModelApiResponse.md
+++ /dev/null
@@ -1,12 +0,0 @@
-
-# ModelApiResponse
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**code** | **Integer** | | [optional]
-**type** | **String** | | [optional]
-**message** | **String** | | [optional]
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/Name.md b/samples/client/petstore/java/feign/docs/Name.md
deleted file mode 100644
index ce2fb4dee50..00000000000
--- a/samples/client/petstore/java/feign/docs/Name.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-# Name
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**name** | **Integer** | |
-**snakeCase** | **Integer** | | [optional]
-**property** | **String** | | [optional]
-**_123Number** | **Integer** | | [optional]
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/NumberOnly.md b/samples/client/petstore/java/feign/docs/NumberOnly.md
deleted file mode 100644
index a3feac7fadc..00000000000
--- a/samples/client/petstore/java/feign/docs/NumberOnly.md
+++ /dev/null
@@ -1,10 +0,0 @@
-
-# NumberOnly
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**justNumber** | [**BigDecimal**](BigDecimal.md) | | [optional]
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/Order.md b/samples/client/petstore/java/feign/docs/Order.md
deleted file mode 100644
index a1089f5384e..00000000000
--- a/samples/client/petstore/java/feign/docs/Order.md
+++ /dev/null
@@ -1,24 +0,0 @@
-
-# Order
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**id** | **Long** | | [optional]
-**petId** | **Long** | | [optional]
-**quantity** | **Integer** | | [optional]
-**shipDate** | [**DateTime**](DateTime.md) | | [optional]
-**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional]
-**complete** | **Boolean** | | [optional]
-
-
-
-## Enum: StatusEnum
-Name | Value
----- | -----
-PLACED | "placed"
-APPROVED | "approved"
-DELIVERED | "delivered"
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/Pet.md b/samples/client/petstore/java/feign/docs/Pet.md
deleted file mode 100644
index 5b63109ef92..00000000000
--- a/samples/client/petstore/java/feign/docs/Pet.md
+++ /dev/null
@@ -1,24 +0,0 @@
-
-# Pet
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**id** | **Long** | | [optional]
-**category** | [**Category**](Category.md) | | [optional]
-**name** | **String** | |
-**photoUrls** | **List<String>** | |
-**tags** | [**List<Tag>**](Tag.md) | | [optional]
-**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional]
-
-
-
-## Enum: StatusEnum
-Name | Value
----- | -----
-AVAILABLE | "available"
-PENDING | "pending"
-SOLD | "sold"
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/PetApi.md b/samples/client/petstore/java/feign/docs/PetApi.md
deleted file mode 100644
index e0314e20e51..00000000000
--- a/samples/client/petstore/java/feign/docs/PetApi.md
+++ /dev/null
@@ -1,448 +0,0 @@
-# PetApi
-
-All URIs are relative to *http://petstore.swagger.io/v2*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
-[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
-[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
-[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
-[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
-[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
-[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
-[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
-
-
-
-# **addPet**
-> addPet(body)
-
-Add a new pet to the store
-
-
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiClient;
-//import io.swagger.client.ApiException;
-//import io.swagger.client.Configuration;
-//import io.swagger.client.auth.*;
-//import io.swagger.client.api.PetApi;
-
-ApiClient defaultClient = Configuration.getDefaultApiClient();
-
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
-try {
- apiInstance.addPet(body);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#addPet");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
-
-### Return type
-
-null (empty response body)
-
-### Authorization
-
-[petstore_auth](../README.md#petstore_auth)
-
-### HTTP request headers
-
- - **Content-Type**: application/json, application/xml
- - **Accept**: application/xml, application/json
-
-
-# **deletePet**
-> deletePet(petId, apiKey)
-
-Deletes a pet
-
-
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiClient;
-//import io.swagger.client.ApiException;
-//import io.swagger.client.Configuration;
-//import io.swagger.client.auth.*;
-//import io.swagger.client.api.PetApi;
-
-ApiClient defaultClient = Configuration.getDefaultApiClient();
-
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-Long petId = 789L; // Long | Pet id to delete
-String apiKey = "apiKey_example"; // String |
-try {
- apiInstance.deletePet(petId, apiKey);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#deletePet");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **petId** | **Long**| Pet id to delete |
- **apiKey** | **String**| | [optional]
-
-### Return type
-
-null (empty response body)
-
-### Authorization
-
-[petstore_auth](../README.md#petstore_auth)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
-
-
-# **findPetsByStatus**
-> List<Pet> findPetsByStatus(status)
-
-Finds Pets by status
-
-Multiple status values can be provided with comma separated strings
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiClient;
-//import io.swagger.client.ApiException;
-//import io.swagger.client.Configuration;
-//import io.swagger.client.auth.*;
-//import io.swagger.client.api.PetApi;
-
-ApiClient defaultClient = Configuration.getDefaultApiClient();
-
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-List status = Arrays.asList("status_example"); // List | Status values that need to be considered for filter
-try {
- List result = apiInstance.findPetsByStatus(status);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#findPetsByStatus");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **status** | [**List<String>**](String.md)| Status values that need to be considered for filter |
-
-### Return type
-
-[**List<Pet>**](Pet.md)
-
-### Authorization
-
-[petstore_auth](../README.md#petstore_auth)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
-
-
-# **findPetsByTags**
-> List<Pet> findPetsByTags(tags)
-
-Finds Pets by tags
-
-Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiClient;
-//import io.swagger.client.ApiException;
-//import io.swagger.client.Configuration;
-//import io.swagger.client.auth.*;
-//import io.swagger.client.api.PetApi;
-
-ApiClient defaultClient = Configuration.getDefaultApiClient();
-
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-List tags = Arrays.asList("tags_example"); // List | Tags to filter by
-try {
- List result = apiInstance.findPetsByTags(tags);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#findPetsByTags");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **tags** | [**List<String>**](String.md)| Tags to filter by |
-
-### Return type
-
-[**List<Pet>**](Pet.md)
-
-### Authorization
-
-[petstore_auth](../README.md#petstore_auth)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
-
-
-# **getPetById**
-> Pet getPetById(petId)
-
-Find pet by ID
-
-Returns a single pet
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiClient;
-//import io.swagger.client.ApiException;
-//import io.swagger.client.Configuration;
-//import io.swagger.client.auth.*;
-//import io.swagger.client.api.PetApi;
-
-ApiClient defaultClient = Configuration.getDefaultApiClient();
-
-// Configure API key authorization: api_key
-ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
-api_key.setApiKey("YOUR API KEY");
-// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
-//api_key.setApiKeyPrefix("Token");
-
-PetApi apiInstance = new PetApi();
-Long petId = 789L; // Long | ID of pet to return
-try {
- Pet result = apiInstance.getPetById(petId);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#getPetById");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **petId** | **Long**| ID of pet to return |
-
-### Return type
-
-[**Pet**](Pet.md)
-
-### Authorization
-
-[api_key](../README.md#api_key)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
-
-
-# **updatePet**
-> updatePet(body)
-
-Update an existing pet
-
-
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiClient;
-//import io.swagger.client.ApiException;
-//import io.swagger.client.Configuration;
-//import io.swagger.client.auth.*;
-//import io.swagger.client.api.PetApi;
-
-ApiClient defaultClient = Configuration.getDefaultApiClient();
-
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
-try {
- apiInstance.updatePet(body);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#updatePet");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
-
-### Return type
-
-null (empty response body)
-
-### Authorization
-
-[petstore_auth](../README.md#petstore_auth)
-
-### HTTP request headers
-
- - **Content-Type**: application/json, application/xml
- - **Accept**: application/xml, application/json
-
-
-# **updatePetWithForm**
-> updatePetWithForm(petId, name, status)
-
-Updates a pet in the store with form data
-
-
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiClient;
-//import io.swagger.client.ApiException;
-//import io.swagger.client.Configuration;
-//import io.swagger.client.auth.*;
-//import io.swagger.client.api.PetApi;
-
-ApiClient defaultClient = Configuration.getDefaultApiClient();
-
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-Long petId = 789L; // Long | ID of pet that needs to be updated
-String name = "name_example"; // String | Updated name of the pet
-String status = "status_example"; // String | Updated status of the pet
-try {
- apiInstance.updatePetWithForm(petId, name, status);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#updatePetWithForm");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **petId** | **Long**| ID of pet that needs to be updated |
- **name** | **String**| Updated name of the pet | [optional]
- **status** | **String**| Updated status of the pet | [optional]
-
-### Return type
-
-null (empty response body)
-
-### Authorization
-
-[petstore_auth](../README.md#petstore_auth)
-
-### HTTP request headers
-
- - **Content-Type**: application/x-www-form-urlencoded
- - **Accept**: application/xml, application/json
-
-
-# **uploadFile**
-> ModelApiResponse uploadFile(petId, additionalMetadata, file)
-
-uploads an image
-
-
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiClient;
-//import io.swagger.client.ApiException;
-//import io.swagger.client.Configuration;
-//import io.swagger.client.auth.*;
-//import io.swagger.client.api.PetApi;
-
-ApiClient defaultClient = Configuration.getDefaultApiClient();
-
-// Configure OAuth2 access token for authorization: petstore_auth
-OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
-petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
-PetApi apiInstance = new PetApi();
-Long petId = 789L; // Long | ID of pet to update
-String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
-File file = new File("/path/to/file.txt"); // File | file to upload
-try {
- ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling PetApi#uploadFile");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **petId** | **Long**| ID of pet to update |
- **additionalMetadata** | **String**| Additional data to pass to server | [optional]
- **file** | **File**| file to upload | [optional]
-
-### Return type
-
-[**ModelApiResponse**](ModelApiResponse.md)
-
-### Authorization
-
-[petstore_auth](../README.md#petstore_auth)
-
-### HTTP request headers
-
- - **Content-Type**: multipart/form-data
- - **Accept**: application/json
-
diff --git a/samples/client/petstore/java/feign/docs/ReadOnlyFirst.md b/samples/client/petstore/java/feign/docs/ReadOnlyFirst.md
deleted file mode 100644
index 426b7cde95a..00000000000
--- a/samples/client/petstore/java/feign/docs/ReadOnlyFirst.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-# ReadOnlyFirst
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**bar** | **String** | | [optional]
-**baz** | **String** | | [optional]
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/SpecialModelName.md b/samples/client/petstore/java/feign/docs/SpecialModelName.md
deleted file mode 100644
index c2c6117c552..00000000000
--- a/samples/client/petstore/java/feign/docs/SpecialModelName.md
+++ /dev/null
@@ -1,10 +0,0 @@
-
-# SpecialModelName
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**specialPropertyName** | **Long** | | [optional]
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/StoreApi.md b/samples/client/petstore/java/feign/docs/StoreApi.md
deleted file mode 100644
index 0b30791725a..00000000000
--- a/samples/client/petstore/java/feign/docs/StoreApi.md
+++ /dev/null
@@ -1,197 +0,0 @@
-# StoreApi
-
-All URIs are relative to *http://petstore.swagger.io/v2*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
-[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
-[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
-[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
-
-
-
-# **deleteOrder**
-> deleteOrder(orderId)
-
-Delete purchase order by ID
-
-For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiException;
-//import io.swagger.client.api.StoreApi;
-
-
-StoreApi apiInstance = new StoreApi();
-String orderId = "orderId_example"; // String | ID of the order that needs to be deleted
-try {
- apiInstance.deleteOrder(orderId);
-} catch (ApiException e) {
- System.err.println("Exception when calling StoreApi#deleteOrder");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **orderId** | **String**| ID of the order that needs to be deleted |
-
-### Return type
-
-null (empty response body)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
-
-
-# **getInventory**
-> Map<String, Integer> getInventory()
-
-Returns pet inventories by status
-
-Returns a map of status codes to quantities
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiClient;
-//import io.swagger.client.ApiException;
-//import io.swagger.client.Configuration;
-//import io.swagger.client.auth.*;
-//import io.swagger.client.api.StoreApi;
-
-ApiClient defaultClient = Configuration.getDefaultApiClient();
-
-// Configure API key authorization: api_key
-ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
-api_key.setApiKey("YOUR API KEY");
-// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
-//api_key.setApiKeyPrefix("Token");
-
-StoreApi apiInstance = new StoreApi();
-try {
- Map result = apiInstance.getInventory();
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling StoreApi#getInventory");
- e.printStackTrace();
-}
-```
-
-### Parameters
-This endpoint does not need any parameter.
-
-### Return type
-
-[**Map<String, Integer>**](Map.md)
-
-### Authorization
-
-[api_key](../README.md#api_key)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-
-# **getOrderById**
-> Order getOrderById(orderId)
-
-Find purchase order by ID
-
-For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiException;
-//import io.swagger.client.api.StoreApi;
-
-
-StoreApi apiInstance = new StoreApi();
-Long orderId = 789L; // Long | ID of pet that needs to be fetched
-try {
- Order result = apiInstance.getOrderById(orderId);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling StoreApi#getOrderById");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **orderId** | **Long**| ID of pet that needs to be fetched |
-
-### Return type
-
-[**Order**](Order.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
-
-
-# **placeOrder**
-> Order placeOrder(body)
-
-Place an order for a pet
-
-
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiException;
-//import io.swagger.client.api.StoreApi;
-
-
-StoreApi apiInstance = new StoreApi();
-Order body = new Order(); // Order | order placed for purchasing the pet
-try {
- Order result = apiInstance.placeOrder(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling StoreApi#placeOrder");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **body** | [**Order**](Order.md)| order placed for purchasing the pet |
-
-### Return type
-
-[**Order**](Order.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
-
diff --git a/samples/client/petstore/java/feign/docs/Tag.md b/samples/client/petstore/java/feign/docs/Tag.md
deleted file mode 100644
index de6814b55d5..00000000000
--- a/samples/client/petstore/java/feign/docs/Tag.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-# Tag
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**id** | **Long** | | [optional]
-**name** | **String** | | [optional]
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/User.md b/samples/client/petstore/java/feign/docs/User.md
deleted file mode 100644
index 8b6753dd284..00000000000
--- a/samples/client/petstore/java/feign/docs/User.md
+++ /dev/null
@@ -1,17 +0,0 @@
-
-# User
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**id** | **Long** | | [optional]
-**username** | **String** | | [optional]
-**firstName** | **String** | | [optional]
-**lastName** | **String** | | [optional]
-**email** | **String** | | [optional]
-**password** | **String** | | [optional]
-**phone** | **String** | | [optional]
-**userStatus** | **Integer** | User Status | [optional]
-
-
-
diff --git a/samples/client/petstore/java/feign/docs/UserApi.md b/samples/client/petstore/java/feign/docs/UserApi.md
deleted file mode 100644
index 8cdc15992ee..00000000000
--- a/samples/client/petstore/java/feign/docs/UserApi.md
+++ /dev/null
@@ -1,370 +0,0 @@
-# UserApi
-
-All URIs are relative to *http://petstore.swagger.io/v2*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**createUser**](UserApi.md#createUser) | **POST** /user | Create user
-[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
-[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
-[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
-[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
-[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system
-[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
-[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
-
-
-
-# **createUser**
-> createUser(body)
-
-Create user
-
-This can only be done by the logged in user.
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiException;
-//import io.swagger.client.api.UserApi;
-
-
-UserApi apiInstance = new UserApi();
-User body = new User(); // User | Created user object
-try {
- apiInstance.createUser(body);
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#createUser");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **body** | [**User**](User.md)| Created user object |
-
-### Return type
-
-null (empty response body)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
-
-
-# **createUsersWithArrayInput**
-> createUsersWithArrayInput(body)
-
-Creates list of users with given input array
-
-
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiException;
-//import io.swagger.client.api.UserApi;
-
-
-UserApi apiInstance = new UserApi();
-List body = Arrays.asList(new User()); // List | List of user object
-try {
- apiInstance.createUsersWithArrayInput(body);
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **body** | [**List<User>**](User.md)| List of user object |
-
-### Return type
-
-null (empty response body)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
-
-
-# **createUsersWithListInput**
-> createUsersWithListInput(body)
-
-Creates list of users with given input array
-
-
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiException;
-//import io.swagger.client.api.UserApi;
-
-
-UserApi apiInstance = new UserApi();
-List body = Arrays.asList(new User()); // List | List of user object
-try {
- apiInstance.createUsersWithListInput(body);
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#createUsersWithListInput");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **body** | [**List<User>**](User.md)| List of user object |
-
-### Return type
-
-null (empty response body)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
-
-
-# **deleteUser**
-> deleteUser(username)
-
-Delete user
-
-This can only be done by the logged in user.
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiException;
-//import io.swagger.client.api.UserApi;
-
-
-UserApi apiInstance = new UserApi();
-String username = "username_example"; // String | The name that needs to be deleted
-try {
- apiInstance.deleteUser(username);
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#deleteUser");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **username** | **String**| The name that needs to be deleted |
-
-### Return type
-
-null (empty response body)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
-
-
-# **getUserByName**
-> User getUserByName(username)
-
-Get user by user name
-
-
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiException;
-//import io.swagger.client.api.UserApi;
-
-
-UserApi apiInstance = new UserApi();
-String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
-try {
- User result = apiInstance.getUserByName(username);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#getUserByName");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **username** | **String**| The name that needs to be fetched. Use user1 for testing. |
-
-### Return type
-
-[**User**](User.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
-
-
-# **loginUser**
-> String loginUser(username, password)
-
-Logs user into the system
-
-
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiException;
-//import io.swagger.client.api.UserApi;
-
-
-UserApi apiInstance = new UserApi();
-String username = "username_example"; // String | The user name for login
-String password = "password_example"; // String | The password for login in clear text
-try {
- String result = apiInstance.loginUser(username, password);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#loginUser");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **username** | **String**| The user name for login |
- **password** | **String**| The password for login in clear text |
-
-### Return type
-
-**String**
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
-
-
-# **logoutUser**
-> logoutUser()
-
-Logs out current logged in user session
-
-
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiException;
-//import io.swagger.client.api.UserApi;
-
-
-UserApi apiInstance = new UserApi();
-try {
- apiInstance.logoutUser();
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#logoutUser");
- e.printStackTrace();
-}
-```
-
-### Parameters
-This endpoint does not need any parameter.
-
-### Return type
-
-null (empty response body)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
-
-
-# **updateUser**
-> updateUser(username, body)
-
-Updated user
-
-This can only be done by the logged in user.
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiException;
-//import io.swagger.client.api.UserApi;
-
-
-UserApi apiInstance = new UserApi();
-String username = "username_example"; // String | name that need to be deleted
-User body = new User(); // User | Updated user object
-try {
- apiInstance.updateUser(username, body);
-} catch (ApiException e) {
- System.err.println("Exception when calling UserApi#updateUser");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **username** | **String**| name that need to be deleted |
- **body** | [**User**](User.md)| Updated user object |
-
-### Return type
-
-null (empty response body)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
-
diff --git a/samples/client/petstore/java/feign/pom.xml b/samples/client/petstore/java/feign/pom.xml
index 12c6e74e6ed..ce837265abd 100644
--- a/samples/client/petstore/java/feign/pom.xml
+++ b/samples/client/petstore/java/feign/pom.xml
@@ -1,17 +1,17 @@
4.0.0
- io.swagger
- swagger-petstore-feign
+ org.openapitools
+ petstore-feignjar
- swagger-petstore-feign
+ petstore-feign1.0.0
- https://github.com/swagger-api/swagger-codegen
- Swagger Java
+ https://github.com/openapitools/openapi-generator
+ OpenAPI Java
- scm:git:git@github.com:swagger-api/swagger-codegen.git
- scm:git:git@github.com:swagger-api/swagger-codegen.git
- https://github.com/swagger-api/swagger-codegen
+ scm:git:git@github.com:openapitools/openapi-generator.git
+ scm:git:git@github.com:openapitools/openapi-generator.git
+ https://github.com/openapitools/openapi-generator
@@ -24,10 +24,10 @@
- Swagger
- apiteam@swagger.io
- Swagger
- http://swagger.io
+ OpenAPI
+ team@openapitools.org
+ OpenAPI
+ http://openapitools.org
diff --git a/samples/client/petstore/java/feign/settings.gradle b/samples/client/petstore/java/feign/settings.gradle
index a25109c126e..56240d66842 100644
--- a/samples/client/petstore/java/feign/settings.gradle
+++ b/samples/client/petstore/java/feign/settings.gradle
@@ -1 +1 @@
-rootProject.name = "swagger-petstore-feign"
\ No newline at end of file
+rootProject.name = "petstore-feign"
\ No newline at end of file
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/AnotherFakeApi.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/AnotherFakeApi.java
index 6cef5dde04d..80a9ad82788 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/AnotherFakeApi.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/AnotherFakeApi.java
@@ -18,7 +18,7 @@ public interface AnotherFakeApi extends ApiClient.Api {
/**
* To test special tags
* To test special tags
- * @param body client model (required)
+ * @param client client model (required)
* @return Client
*/
@RequestLine("PATCH /another-fake/dummy")
@@ -26,5 +26,5 @@ public interface AnotherFakeApi extends ApiClient.Api {
"Content-Type: application/json",
"Accept: application/json",
})
- Client testSpecialTags(Client body);
+ Client testSpecialTags(Client client);
}
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/FakeApi.java
index 613e8a22fe6..24ab4157c1e 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/FakeApi.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/FakeApi.java
@@ -5,9 +5,11 @@ import io.swagger.client.EncodingUtils;
import java.math.BigDecimal;
import io.swagger.client.model.Client;
+import java.io.File;
import org.threeten.bp.LocalDate;
import org.threeten.bp.OffsetDateTime;
import io.swagger.client.model.OuterComposite;
+import io.swagger.client.model.User;
import java.util.ArrayList;
import java.util.HashMap;
@@ -22,28 +24,28 @@ public interface FakeApi extends ApiClient.Api {
/**
*
* Test serialization of outer boolean types
- * @param body Input boolean as post body (optional)
+ * @param booleanPostBody Input boolean as post body (optional)
* @return Boolean
*/
@RequestLine("POST /fake/outer/boolean")
@Headers({
- "Content-Type: application/json",
- "Accept: application/json",
+ "Content-Type: */*",
+ "Accept: */*",
})
- Boolean fakeOuterBooleanSerialize(Boolean body);
+ Boolean fakeOuterBooleanSerialize(Boolean booleanPostBody);
/**
*
* Test serialization of object with outer number type
- * @param body Input composite as post body (optional)
+ * @param outerComposite Input composite as post body (optional)
* @return OuterComposite
*/
@RequestLine("POST /fake/outer/composite")
@Headers({
- "Content-Type: application/json",
- "Accept: application/json",
+ "Content-Type: */*",
+ "Accept: */*",
})
- OuterComposite fakeOuterCompositeSerialize(OuterComposite body);
+ OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite);
/**
*
@@ -53,8 +55,8 @@ public interface FakeApi extends ApiClient.Api {
*/
@RequestLine("POST /fake/outer/number")
@Headers({
- "Content-Type: application/json",
- "Accept: application/json",
+ "Content-Type: */*",
+ "Accept: */*",
})
BigDecimal fakeOuterNumberSerialize(BigDecimal body);
@@ -66,15 +68,61 @@ public interface FakeApi extends ApiClient.Api {
*/
@RequestLine("POST /fake/outer/string")
@Headers({
- "Content-Type: application/json",
- "Accept: application/json",
+ "Content-Type: */*",
+ "Accept: */*",
})
String fakeOuterStringSerialize(String body);
+ /**
+ *
+ *
+ * @param query (required)
+ * @param user (required)
+ */
+ @RequestLine("PUT /fake/body-with-query-params?query={query}")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ })
+ void testBodyWithQueryParams(@Param("query") String query, User user);
+
+ /**
+ *
+ *
+ * Note, this is equivalent to the other testBodyWithQueryParams method,
+ * but with the query parameters collected into a single Map parameter. This
+ * is convenient for services with optional query parameters, especially when
+ * used with the {@link TestBodyWithQueryParamsQueryParams} class that allows for
+ * building up this map in a fluent style.
+ * @param user (required)
+ * @param queryParams Map of query parameters as name-value pairs
+ *
The following elements may be specified in the query map:
+ *
+ *
query - (required)
+ *
+ */
+ @RequestLine("PUT /fake/body-with-query-params?query={query}")
+ @Headers({
+ "Content-Type: application/json",
+ "Accept: application/json",
+ })
+ void testBodyWithQueryParams(User user, @QueryMap(encoded=true) Map queryParams);
+
+ /**
+ * A convenience class for generating query parameters for the
+ * testBodyWithQueryParams method in a fluent style.
+ */
+ public static class TestBodyWithQueryParamsQueryParams extends HashMap {
+ public TestBodyWithQueryParamsQueryParams query(final String value) {
+ put("query", EncodingUtils.encode(value));
+ return this;
+ }
+ }
+
/**
* To test \"client\" model
* To test \"client\" model
- * @param body client model (required)
+ * @param client client model (required)
* @return Client
*/
@RequestLine("PATCH /fake")
@@ -82,7 +130,7 @@ public interface FakeApi extends ApiClient.Api {
"Content-Type: application/json",
"Accept: application/json",
})
- Client testClientModel(Client body);
+ Client testClientModel(Client client);
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
@@ -104,32 +152,32 @@ public interface FakeApi extends ApiClient.Api {
*/
@RequestLine("POST /fake")
@Headers({
- "Content-Type: application/xml; charset=utf-8",
- "Accept: application/xml; charset=utf-8,application/json; charset=utf-8",
+ "Content-Type: application/x-www-form-urlencoded",
+ "Accept: application/json",
})
- void testEndpointParameters(@Param("number") BigDecimal number, @Param("_double") Double _double, @Param("patternWithoutDelimiter") String patternWithoutDelimiter, @Param("_byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("_float") Float _float, @Param("string") String string, @Param("binary") byte[] binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("paramCallback") String paramCallback);
+ void testEndpointParameters(@Param("number") BigDecimal number, @Param("_double") Double _double, @Param("patternWithoutDelimiter") String patternWithoutDelimiter, @Param("_byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("_float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("paramCallback") String paramCallback);
/**
* To test enum parameters
* To test enum parameters
- * @param enumFormStringArray Form parameter enum test (string array) (optional)
- * @param enumFormString Form parameter enum test (string) (optional, default to -efg)
* @param enumHeaderStringArray Header parameter enum test (string array) (optional)
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
* @param enumQueryStringArray Query parameter enum test (string array) (optional)
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
* @param enumQueryInteger Query parameter enum test (double) (optional)
* @param enumQueryDouble Query parameter enum test (double) (optional)
+ * @param enumFormStringArray Form parameter enum test (string array) (optional)
+ * @param enumFormString Form parameter enum test (string) (optional)
*/
- @RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}")
+ @RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}")
@Headers({
- "Content-Type: */*",
- "Accept: */*",
+ "Content-Type: application/x-www-form-urlencoded",
+ "Accept: application/json",
"enum_header_string_array: {enumHeaderStringArray}",
"enum_header_string: {enumHeaderString}"
})
- void testEnumParameters(@Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString, @Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble);
+ void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString);
/**
* To test enum parameters
@@ -139,28 +187,28 @@ public interface FakeApi extends ApiClient.Api {
* is convenient for services with optional query parameters, especially when
* used with the {@link TestEnumParametersQueryParams} class that allows for
* building up this map in a fluent style.
- * @param enumFormStringArray Form parameter enum test (string array) (optional)
- * @param enumFormString Form parameter enum test (string) (optional, default to -efg)
* @param enumHeaderStringArray Header parameter enum test (string array) (optional)
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
- * @param enumQueryDouble Query parameter enum test (double) (optional)
+ * @param enumFormStringArray Form parameter enum test (string array) (optional)
+ * @param enumFormString Form parameter enum test (string) (optional)
* @param queryParams Map of query parameters as name-value pairs
*
The following elements may be specified in the query map:
*
*
enumQueryStringArray - Query parameter enum test (string array) (optional)
*
enumQueryString - Query parameter enum test (string) (optional, default to -efg)
*
enumQueryInteger - Query parameter enum test (double) (optional)
+ *
enumQueryDouble - Query parameter enum test (double) (optional)
*
*/
- @RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}")
+ @RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}")
@Headers({
- "Content-Type: */*",
- "Accept: */*",
+ "Content-Type: application/x-www-form-urlencoded",
+ "Accept: application/json",
"enum_header_string_array: {enumHeaderStringArray}",
"enum_header_string: {enumHeaderString}"
})
- void testEnumParameters(@Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString, @Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryDouble") Double enumQueryDouble, @QueryMap(encoded=true) Map queryParams);
+ void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString, @QueryMap(encoded=true) Map queryParams);
/**
* A convenience class for generating query parameters for the
@@ -179,19 +227,23 @@ public interface FakeApi extends ApiClient.Api {
put("enum_query_integer", EncodingUtils.encode(value));
return this;
}
+ public TestEnumParametersQueryParams enumQueryDouble(final Double value) {
+ put("enum_query_double", EncodingUtils.encode(value));
+ return this;
+ }
}
/**
* test inline additionalProperties
*
- * @param param request body (required)
+ * @param requestBody request body (required)
*/
@RequestLine("POST /fake/inline-additionalProperties")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
- void testInlineAdditionalProperties(Object param);
+ void testInlineAdditionalProperties(String requestBody);
/**
* test json serialization of form data
@@ -201,7 +253,7 @@ public interface FakeApi extends ApiClient.Api {
*/
@RequestLine("GET /fake/jsonFormData")
@Headers({
- "Content-Type: application/json",
+ "Content-Type: application/x-www-form-urlencoded",
"Accept: application/json",
})
void testJsonFormData(@Param("param") String param, @Param("param2") String param2);
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java
index efc51ae9b3a..d2ed35d88b5 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java
@@ -18,7 +18,7 @@ public interface FakeClassnameTags123Api extends ApiClient.Api {
/**
* To test class name in snake case
* To test class name in snake case
- * @param body client model (required)
+ * @param client client model (required)
* @return Client
*/
@RequestLine("PATCH /fake_classname_test")
@@ -26,5 +26,5 @@ public interface FakeClassnameTags123Api extends ApiClient.Api {
"Content-Type: application/json",
"Accept: application/json",
})
- Client testClassname(Client body);
+ Client testClassname(Client client);
}
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/PetApi.java
index 70fbb3b6710..c3332266c24 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/PetApi.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/PetApi.java
@@ -20,14 +20,14 @@ public interface PetApi extends ApiClient.Api {
/**
* Add a new pet to the store
*
- * @param body Pet object that needs to be added to the store (required)
+ * @param pet Pet object that needs to be added to the store (required)
*/
@RequestLine("POST /pet")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
- void addPet(Pet body);
+ void addPet(Pet pet);
/**
* Deletes a pet
@@ -145,14 +145,14 @@ public interface PetApi extends ApiClient.Api {
/**
* Update an existing pet
*
- * @param body Pet object that needs to be added to the store (required)
+ * @param pet Pet object that needs to be added to the store (required)
*/
@RequestLine("PUT /pet")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
- void updatePet(Pet body);
+ void updatePet(Pet pet);
/**
* Updates a pet in the store with form data
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/StoreApi.java
index 42aaf047b73..8d79ef8ef26 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/StoreApi.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/StoreApi.java
@@ -52,13 +52,13 @@ public interface StoreApi extends ApiClient.Api {
/**
* Place an order for a pet
*
- * @param body order placed for purchasing the pet (required)
+ * @param order order placed for purchasing the pet (required)
* @return Order
*/
@RequestLine("POST /store/order")
@Headers({
- "Content-Type: application/json",
+ "Content-Type: */*",
"Accept: application/json",
})
- Order placeOrder(Order body);
+ Order placeOrder(Order order);
}
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/UserApi.java
index cc174ebb548..73897a3e60e 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/UserApi.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/UserApi.java
@@ -18,38 +18,38 @@ public interface UserApi extends ApiClient.Api {
/**
* Create user
* This can only be done by the logged in user.
- * @param body Created user object (required)
+ * @param user Created user object (required)
*/
@RequestLine("POST /user")
@Headers({
- "Content-Type: application/json",
+ "Content-Type: */*",
"Accept: application/json",
})
- void createUser(User body);
+ void createUser(User user);
/**
* Creates list of users with given input array
*
- * @param body List of user object (required)
+ * @param user List of user object (required)
*/
@RequestLine("POST /user/createWithArray")
@Headers({
- "Content-Type: application/json",
+ "Content-Type: */*",
"Accept: application/json",
})
- void createUsersWithArrayInput(List body);
+ void createUsersWithArrayInput(List user);
/**
* Creates list of users with given input array
*
- * @param body List of user object (required)
+ * @param user List of user object (required)
*/
@RequestLine("POST /user/createWithList")
@Headers({
- "Content-Type: application/json",
+ "Content-Type: */*",
"Accept: application/json",
})
- void createUsersWithListInput(List body);
+ void createUsersWithListInput(List user);
/**
* Delete user
@@ -138,12 +138,12 @@ public interface UserApi extends ApiClient.Api {
* Updated user
* This can only be done by the logged in user.
* @param username name that need to be deleted (required)
- * @param body Updated user object (required)
+ * @param user Updated user object (required)
*/
@RequestLine("PUT /user/{username}")
@Headers({
- "Content-Type: application/json",
+ "Content-Type: */*",
"Accept: application/json",
})
- void updateUser(@Param("username") String username, User body);
+ void updateUser(@Param("username") String username, User user);
}
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/EnumTest.java
index 193d7f101db..2bb7dd17d43 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/EnumTest.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/EnumTest.java
@@ -67,6 +67,46 @@ public class EnumTest {
@JsonProperty("enum_string")
private EnumStringEnum enumString = null;
+ /**
+ * Gets or Sets enumStringRequired
+ */
+ public enum EnumStringRequiredEnum {
+ UPPER("UPPER"),
+
+ LOWER("lower"),
+
+ EMPTY("");
+
+ private String value;
+
+ EnumStringRequiredEnum(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static EnumStringRequiredEnum fromValue(String text) {
+ for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) {
+ if (String.valueOf(b.value).equals(text)) {
+ return b;
+ }
+ }
+ return null;
+ }
+ }
+
+ @JsonProperty("enum_string_required")
+ private EnumStringRequiredEnum enumStringRequired = null;
+
/**
* Gets or Sets enumInteger
*/
@@ -164,6 +204,24 @@ public class EnumTest {
this.enumString = enumString;
}
+ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) {
+ this.enumStringRequired = enumStringRequired;
+ return this;
+ }
+
+ /**
+ * Get enumStringRequired
+ * @return enumStringRequired
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public EnumStringRequiredEnum getEnumStringRequired() {
+ return enumStringRequired;
+ }
+
+ public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) {
+ this.enumStringRequired = enumStringRequired;
+ }
+
public EnumTest enumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger;
return this;
@@ -229,6 +287,7 @@ public class EnumTest {
}
EnumTest enumTest = (EnumTest) o;
return Objects.equals(this.enumString, enumTest.enumString) &&
+ Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) &&
Objects.equals(this.enumInteger, enumTest.enumInteger) &&
Objects.equals(this.enumNumber, enumTest.enumNumber) &&
Objects.equals(this.outerEnum, enumTest.outerEnum);
@@ -236,7 +295,7 @@ public class EnumTest {
@Override
public int hashCode() {
- return Objects.hash(enumString, enumInteger, enumNumber, outerEnum);
+ return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum);
}
@@ -246,6 +305,7 @@ public class EnumTest {
sb.append("class EnumTest {\n");
sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n");
+ sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n");
sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n");
sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n");
sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n");
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/FormatTest.java
index 67879022f96..5f601300b95 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/FormatTest.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/FormatTest.java
@@ -20,6 +20,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
+import java.io.File;
import java.math.BigDecimal;
import java.util.UUID;
import org.threeten.bp.LocalDate;
@@ -55,7 +56,7 @@ public class FormatTest {
private byte[] _byte = null;
@JsonProperty("binary")
- private byte[] binary = null;
+ private File binary = null;
@JsonProperty("date")
private LocalDate date = null;
@@ -223,7 +224,7 @@ public class FormatTest {
this._byte = _byte;
}
- public FormatTest binary(byte[] binary) {
+ public FormatTest binary(File binary) {
this.binary = binary;
return this;
}
@@ -233,11 +234,11 @@ public class FormatTest {
* @return binary
**/
@ApiModelProperty(value = "")
- public byte[] getBinary() {
+ public File getBinary() {
return binary;
}
- public void setBinary(byte[] binary) {
+ public void setBinary(File binary) {
this.binary = binary;
}
@@ -331,7 +332,7 @@ public class FormatTest {
Objects.equals(this._double, formatTest._double) &&
Objects.equals(this.string, formatTest.string) &&
Arrays.equals(this._byte, formatTest._byte) &&
- Arrays.equals(this.binary, formatTest.binary) &&
+ Objects.equals(this.binary, formatTest.binary) &&
Objects.equals(this.date, formatTest.date) &&
Objects.equals(this.dateTime, formatTest.dateTime) &&
Objects.equals(this.uuid, formatTest.uuid) &&
@@ -340,7 +341,7 @@ public class FormatTest {
@Override
public int hashCode() {
- return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), Arrays.hashCode(binary), date, dateTime, uuid, password);
+ return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password);
}
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Model200Response.java
index 38fb1481a3d..46fb5650ff0 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Model200Response.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Model200Response.java
@@ -78,9 +78,9 @@ public class Model200Response {
if (o == null || getClass() != o.getClass()) {
return false;
}
- Model200Response _200Response = (Model200Response) o;
- return Objects.equals(this.name, _200Response.name) &&
- Objects.equals(this.propertyClass, _200Response.propertyClass);
+ Model200Response _200response = (Model200Response) o;
+ return Objects.equals(this.name, _200response.name) &&
+ Objects.equals(this.propertyClass, _200response.propertyClass);
}
@Override
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Name.java
index a62db5e76e6..e12c1072478 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Name.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Name.java
@@ -37,7 +37,7 @@ public class Name {
private String property = null;
@JsonProperty("123Number")
- private Integer _123Number = null;
+ private Integer _123number = null;
public Name name(Integer name) {
this.name = name;
@@ -85,12 +85,12 @@ public class Name {
}
/**
- * Get _123Number
- * @return _123Number
+ * Get _123number
+ * @return _123number
**/
@ApiModelProperty(value = "")
- public Integer get123Number() {
- return _123Number;
+ public Integer get123number() {
+ return _123number;
}
@@ -106,12 +106,12 @@ public class Name {
return Objects.equals(this.name, name.name) &&
Objects.equals(this.snakeCase, name.snakeCase) &&
Objects.equals(this.property, name.property) &&
- Objects.equals(this._123Number, name._123Number);
+ Objects.equals(this._123number, name._123number);
}
@Override
public int hashCode() {
- return Objects.hash(name, snakeCase, property, _123Number);
+ return Objects.hash(name, snakeCase, property, _123number);
}
@@ -123,7 +123,7 @@ public class Name {
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n");
sb.append(" property: ").append(toIndentedString(property)).append("\n");
- sb.append(" _123Number: ").append(toIndentedString(_123Number)).append("\n");
+ sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n");
sb.append("}");
return sb.toString();
}
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/OuterBoolean.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/OuterBoolean.java
new file mode 100644
index 00000000000..78bfcb1442a
--- /dev/null
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/OuterBoolean.java
@@ -0,0 +1,63 @@
+/*
+ * Swagger Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * 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.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+
+/**
+ * OuterBoolean
+ */
+
+public class OuterBoolean {
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash();
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OuterBoolean {\n");
+
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/OuterNumber.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/OuterNumber.java
new file mode 100644
index 00000000000..d775aa68499
--- /dev/null
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/OuterNumber.java
@@ -0,0 +1,63 @@
+/*
+ * Swagger Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * 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.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+
+/**
+ * OuterNumber
+ */
+
+public class OuterNumber {
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash();
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OuterNumber {\n");
+
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/OuterString.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/OuterString.java
new file mode 100644
index 00000000000..fa2539d33de
--- /dev/null
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/OuterString.java
@@ -0,0 +1,63 @@
+/*
+ * Swagger Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * 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.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+
+/**
+ * OuterString
+ */
+
+public class OuterString {
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash();
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OuterString {\n");
+
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/SpecialModelName.java
index 209b4263f7e..3676b70365a 100644
--- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/SpecialModelName.java
+++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/SpecialModelName.java
@@ -27,24 +27,24 @@ import io.swagger.annotations.ApiModelProperty;
public class SpecialModelName {
@JsonProperty("$special[property.name]")
- private Long specialPropertyName = null;
+ private Long $specialPropertyName = null;
- public SpecialModelName specialPropertyName(Long specialPropertyName) {
- this.specialPropertyName = specialPropertyName;
+ public SpecialModelName $specialPropertyName(Long $specialPropertyName) {
+ this.$specialPropertyName = $specialPropertyName;
return this;
}
/**
- * Get specialPropertyName
- * @return specialPropertyName
+ * Get $specialPropertyName
+ * @return $specialPropertyName
**/
@ApiModelProperty(value = "")
- public Long getSpecialPropertyName() {
- return specialPropertyName;
+ public Long get$SpecialPropertyName() {
+ return $specialPropertyName;
}
- public void setSpecialPropertyName(Long specialPropertyName) {
- this.specialPropertyName = specialPropertyName;
+ public void set$SpecialPropertyName(Long $specialPropertyName) {
+ this.$specialPropertyName = $specialPropertyName;
}
@@ -56,13 +56,13 @@ public class SpecialModelName {
if (o == null || getClass() != o.getClass()) {
return false;
}
- SpecialModelName specialModelName = (SpecialModelName) o;
- return Objects.equals(this.specialPropertyName, specialModelName.specialPropertyName);
+ SpecialModelName $specialModelName = (SpecialModelName) o;
+ return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName);
}
@Override
public int hashCode() {
- return Objects.hash(specialPropertyName);
+ return Objects.hash($specialPropertyName);
}
@@ -71,7 +71,7 @@ public class SpecialModelName {
StringBuilder sb = new StringBuilder();
sb.append("class SpecialModelName {\n");
- sb.append(" specialPropertyName: ").append(toIndentedString(specialPropertyName)).append("\n");
+ sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n");
sb.append("}");
return sb.toString();
}
diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/TestUtils.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/TestUtils.java
deleted file mode 100644
index 7ddf142426e..00000000000
--- a/samples/client/petstore/java/feign/src/test/java/io/swagger/TestUtils.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package io.swagger;
-
-import java.util.Random;
-import java.util.concurrent.atomic.AtomicLong;
-
-public class TestUtils {
- private static final AtomicLong atomicId = createAtomicId();
-
- public static long nextId() {
- return atomicId.getAndIncrement();
- }
-
- private static AtomicLong createAtomicId() {
- int baseId = new Random(System.currentTimeMillis()).nextInt(1000000) + 20000;
- return new AtomicLong((long) baseId);
- }
-}
diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/StringUtilTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/StringUtilTest.java
deleted file mode 100644
index c93908b8482..00000000000
--- a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/StringUtilTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package io.swagger.client;
-
-import org.junit.*;
-import static org.junit.Assert.*;
-
-public class StringUtilTest {
- @Test
- public void testContainsIgnoreCase() {
- assertTrue(StringUtil.containsIgnoreCase(new String[]{"abc"}, "abc"));
- assertTrue(StringUtil.containsIgnoreCase(new String[]{"abc"}, "ABC"));
- assertTrue(StringUtil.containsIgnoreCase(new String[]{"ABC"}, "abc"));
- assertTrue(StringUtil.containsIgnoreCase(new String[]{null, "abc"}, "ABC"));
- assertTrue(StringUtil.containsIgnoreCase(new String[]{null, "abc"}, null));
-
- assertFalse(StringUtil.containsIgnoreCase(new String[]{"abc"}, "def"));
- assertFalse(StringUtil.containsIgnoreCase(new String[]{}, "ABC"));
- assertFalse(StringUtil.containsIgnoreCase(new String[]{}, null));
- }
-
- @Test
- public void testJoin() {
- String[] array = {"aa", "bb", "cc"};
- assertEquals("aa,bb,cc", StringUtil.join(array, ","));
- assertEquals("aa, bb, cc", StringUtil.join(array, ", "));
- assertEquals("aabbcc", StringUtil.join(array, ""));
- assertEquals("aa bb cc", StringUtil.join(array, " "));
- assertEquals("aa\nbb\ncc", StringUtil.join(array, "\n"));
-
- assertEquals("", StringUtil.join(new String[]{}, ","));
- assertEquals("abc", StringUtil.join(new String[]{"abc"}, ","));
- }
-}
\ No newline at end of file
diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/AnotherFakeApiTest.java
index 05d765039a2..0e664bde73b 100644
--- a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/AnotherFakeApiTest.java
+++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/AnotherFakeApiTest.java
@@ -30,8 +30,8 @@ public class AnotherFakeApiTest {
*/
@Test
public void testSpecialTagsTest() {
- Client body = null;
- // Client response = api.testSpecialTags(body);
+ Client client = null;
+ // Client response = api.testSpecialTags(client);
// TODO: test validations
}
diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/FakeApiTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/FakeApiTest.java
index bc6cb13b3b2..9544ce55753 100644
--- a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/FakeApiTest.java
+++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/FakeApiTest.java
@@ -3,9 +3,11 @@ package io.swagger.client.api;
import io.swagger.client.ApiClient;
import java.math.BigDecimal;
import io.swagger.client.model.Client;
+import java.io.File;
import org.threeten.bp.LocalDate;
import org.threeten.bp.OffsetDateTime;
import io.swagger.client.model.OuterComposite;
+import io.swagger.client.model.User;
import org.junit.Before;
import org.junit.Test;
@@ -34,8 +36,8 @@ public class FakeApiTest {
*/
@Test
public void fakeOuterBooleanSerializeTest() {
- Boolean body = null;
- // Boolean response = api.fakeOuterBooleanSerialize(body);
+ Boolean booleanPostBody = null;
+ // Boolean response = api.fakeOuterBooleanSerialize(booleanPostBody);
// TODO: test validations
}
@@ -48,8 +50,8 @@ public class FakeApiTest {
*/
@Test
public void fakeOuterCompositeSerializeTest() {
- OuterComposite body = null;
- // OuterComposite response = api.fakeOuterCompositeSerialize(body);
+ OuterComposite outerComposite = null;
+ // OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite);
// TODO: test validations
}
@@ -83,6 +85,38 @@ public class FakeApiTest {
}
+ /**
+ *
+ *
+ *
+ */
+ @Test
+ public void testBodyWithQueryParamsTest() {
+ String query = null;
+ User user = null;
+ // api.testBodyWithQueryParams(query, user);
+
+ // TODO: test validations
+ }
+
+ /**
+ *
+ *
+ *
+ *
+ * This tests the overload of the method that uses a Map for query parameters instead of
+ * listing them out individually.
+ */
+ @Test
+ public void testBodyWithQueryParamsTestQueryMap() {
+ User user = null;
+ FakeApi.TestBodyWithQueryParamsQueryParams queryParams = new FakeApi.TestBodyWithQueryParamsQueryParams()
+ .query(null);
+ // api.testBodyWithQueryParams(user, queryParams);
+
+ // TODO: test validations
+ }
+
/**
* To test \"client\" model
*
@@ -90,8 +124,8 @@ public class FakeApiTest {
*/
@Test
public void testClientModelTest() {
- Client body = null;
- // Client response = api.testClientModel(body);
+ Client client = null;
+ // Client response = api.testClientModel(client);
// TODO: test validations
}
@@ -113,7 +147,7 @@ public class FakeApiTest {
Long int64 = null;
Float _float = null;
String string = null;
- byte[] binary = null;
+ File binary = null;
LocalDate date = null;
OffsetDateTime dateTime = null;
String password = null;
@@ -131,15 +165,15 @@ public class FakeApiTest {
*/
@Test
public void testEnumParametersTest() {
- List enumFormStringArray = null;
- String enumFormString = null;
List enumHeaderStringArray = null;
String enumHeaderString = null;
List enumQueryStringArray = null;
String enumQueryString = null;
Integer enumQueryInteger = null;
Double enumQueryDouble = null;
- // api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
+ List enumFormStringArray = null;
+ String enumFormString = null;
+ // api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
// TODO: test validations
}
@@ -154,18 +188,47 @@ public class FakeApiTest {
*/
@Test
public void testEnumParametersTestQueryMap() {
- List enumFormStringArray = null;
- String enumFormString = null;
List enumHeaderStringArray = null;
String enumHeaderString = null;
- Double enumQueryDouble = null;
+ List enumFormStringArray = null;
+ String enumFormString = null;
FakeApi.TestEnumParametersQueryParams queryParams = new FakeApi.TestEnumParametersQueryParams()
.enumQueryStringArray(null)
.enumQueryString(null)
- .enumQueryInteger(null);
- // api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryDouble, queryParams);
+ .enumQueryInteger(null)
+ .enumQueryDouble(null);
+ // api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumFormStringArray, enumFormString, queryParams);
// TODO: test validations
}
+ /**
+ * test inline additionalProperties
+ *
+ *
+ */
+ @Test
+ public void testInlineAdditionalPropertiesTest() {
+ String requestBody = null;
+ // api.testInlineAdditionalProperties(requestBody);
+
+ // TODO: test validations
+ }
+
+
+ /**
+ * test json serialization of form data
+ *
+ *
+ */
+ @Test
+ public void testJsonFormDataTest() {
+ String param = null;
+ String param2 = null;
+ // api.testJsonFormData(param, param2);
+
+ // TODO: test validations
+ }
+
+
}
diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java
index 77930522c3c..5cf35ba5e6b 100644
--- a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java
+++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java
@@ -26,14 +26,15 @@ public class FakeClassnameTags123ApiTest {
/**
* To test class name in snake case
*
- *
+ * To test class name in snake case
*/
@Test
public void testClassnameTest() {
- Client body = null;
- // Client response = api.testClassname(body);
+ Client client = null;
+ // Client response = api.testClassname(client);
// TODO: test validations
}
+
}
diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/PetApiTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/PetApiTest.java
index c27524de1f6..cdbfd3f32eb 100644
--- a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/PetApiTest.java
+++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/PetApiTest.java
@@ -1,251 +1,177 @@
package io.swagger.client.api;
-import io.swagger.TestUtils;
-
import io.swagger.client.ApiClient;
-import io.swagger.client.model.*;
-
-import java.io.BufferedWriter;
import java.io.File;
-import java.io.FileWriter;
+import io.swagger.client.model.ModelApiResponse;
+import io.swagger.client.model.Pet;
+import org.junit.Before;
+import org.junit.Test;
+
import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
-import okhttp3.mockwebserver.MockResponse;
-import okhttp3.mockwebserver.MockWebServer;
-import okhttp3.mockwebserver.RecordedRequest;
-import org.junit.*;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.*;
-
+/**
+ * API tests for PetApi
+ */
public class PetApiTest {
- ApiClient apiClient;
- PetApi api;
- MockWebServer localServer;
- ApiClient localClient;
+
+ private PetApi api;
@Before
public void setup() {
- apiClient = new ApiClient();
- api = apiClient.buildClient(PetApi.class);
- localServer = new MockWebServer();
- localClient = new ApiClient();
+ api = new ApiClient().buildClient(PetApi.class);
}
+
+ /**
+ * Add a new pet to the store
+ *
+ *
+ */
@Test
- public void testApiClient() {
- // the default api client is used
- assertEquals("http://petstore.swagger.io:80/v2", apiClient.getBasePath());
+ public void addPetTest() {
+ Pet pet = null;
+ // api.addPet(pet);
- ApiClient newClient = new ApiClient();
- newClient.setBasePath("http://example.com");
-
- assertEquals("http://example.com", newClient.getBasePath());
+ // TODO: test validations
}
+
+ /**
+ * Deletes a pet
+ *
+ *
+ */
@Test
- public void testCreateAndGetPet() throws Exception {
- Pet pet = createRandomPet();
- api.addPet(pet);
+ public void deletePetTest() {
+ Long petId = null;
+ String apiKey = null;
+ // api.deletePet(petId, apiKey);
- Pet fetched = api.getPetById(pet.getId());
- assertNotNull(fetched);
- assertEquals(pet.getId(), fetched.getId());
- assertNotNull(fetched.getCategory());
- assertEquals(fetched.getCategory().getName(), pet.getCategory().getName());
+ // TODO: test validations
}
+
+ /**
+ * Finds Pets by status
+ *
+ * Multiple status values can be provided with comma separated strings
+ */
@Test
- public void testUpdatePet() throws Exception {
- Pet pet = createRandomPet();
- pet.setName("programmer");
+ public void findPetsByStatusTest() {
+ List status = null;
+ // List response = api.findPetsByStatus(status);
- api.updatePet(pet);
-
- Pet fetched = api.getPetById(pet.getId());
- assertNotNull(fetched);
- assertEquals(pet.getId(), fetched.getId());
- assertNotNull(fetched.getCategory());
- assertEquals(fetched.getCategory().getName(), pet.getCategory().getName());
+ // TODO: test validations
}
+ /**
+ * Finds Pets by status
+ *
+ * Multiple status values can be provided with comma separated strings
+ *
+ * This tests the overload of the method that uses a Map for query parameters instead of
+ * listing them out individually.
+ */
@Test
- public void testFindPetsByStatus() throws Exception {
- Pet pet = createRandomPet();
- pet.setName("programmer");
- pet.setStatus(Pet.StatusEnum.AVAILABLE);
-
- api.updatePet(pet);
-
- List pets = api.findPetsByStatus(Collections.singletonList("available"));
- assertNotNull(pets);
-
- boolean found = false;
- for (Pet fetched : pets) {
- if (fetched.getId().equals(pet.getId())) {
- found = true;
- break;
- }
- }
-
- assertTrue(found);
-
+ public void findPetsByStatusTestQueryMap() {
PetApi.FindPetsByStatusQueryParams queryParams = new PetApi.FindPetsByStatusQueryParams()
- .status(Arrays.asList(new String[]{"available"}));
- pets = api.findPetsByStatus(queryParams);
- assertNotNull(pets);
+ .status(null);
+ // List response = api.findPetsByStatus(queryParams);
- found = false;
- for (Pet fetched : pets) {
- if (fetched.getId().equals(pet.getId())) {
- found = true;
- break;
- }
- }
+ // TODO: test validations
+ }
+
+ /**
+ * Finds Pets by tags
+ *
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ */
+ @Test
+ public void findPetsByTagsTest() {
+ List tags = null;
+ // List response = api.findPetsByTags(tags);
- assertTrue(found);
+ // TODO: test validations
}
+ /**
+ * Finds Pets by tags
+ *
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ *
+ * This tests the overload of the method that uses a Map for query parameters instead of
+ * listing them out individually.
+ */
@Test
- public void testFindPetsByTags() throws Exception {
- Pet pet = createRandomPet();
- pet.setName("monster");
- pet.setStatus(Pet.StatusEnum.AVAILABLE);
-
- List tags = new ArrayList<>();
- Tag tag1 = new Tag();
- tag1.setName("friendly");
- tags.add(tag1);
- pet.setTags(tags);
-
- api.updatePet(pet);
-
- List pets = api.findPetsByTags(Collections.singletonList("friendly"));
- assertNotNull(pets);
-
- boolean found = false;
- for (Pet fetched : pets) {
- if (fetched.getId().equals(pet.getId())) {
- found = true;
- break;
- }
- }
- assertTrue(found);
-
+ public void findPetsByTagsTestQueryMap() {
PetApi.FindPetsByTagsQueryParams queryParams = new PetApi.FindPetsByTagsQueryParams()
- .tags(Arrays.asList(new String[]{"friendly"}));
- pets = api.findPetsByTags(queryParams);
- assertNotNull(pets);
+ .tags(null);
+ // List response = api.findPetsByTags(queryParams);
- found = false;
- for (Pet fetched : pets) {
- if (fetched.getId().equals(pet.getId())) {
- found = true;
- break;
- }
- }
- assertTrue(found);
+ // TODO: test validations
}
-
+
+ /**
+ * Find pet by ID
+ *
+ * Returns a single pet
+ */
@Test
- public void testUpdatePetWithForm() throws Exception {
- Pet pet = createRandomPet();
- pet.setName("frank");
- api.addPet(pet);
+ public void getPetByIdTest() {
+ Long petId = null;
+ // Pet response = api.getPetById(petId);
- Pet fetched = api.getPetById(pet.getId());
-
- api.updatePetWithForm(fetched.getId(), "furt", null);
- Pet updated = api.getPetById(fetched.getId());
-
- assertEquals(updated.getName(), "furt");
+ // TODO: test validations
}
+
+ /**
+ * Update an existing pet
+ *
+ *
+ */
@Test
- public void testDeletePet() throws Exception {
- Pet pet = createRandomPet();
- api.addPet(pet);
+ public void updatePetTest() {
+ Pet pet = null;
+ // api.updatePet(pet);
- Pet fetched = api.getPetById(pet.getId());
- api.deletePet(fetched.getId(), null);
-
- try {
- api.getPetById(fetched.getId());
- fail("expected an error");
- } catch (Exception e) {
-// assertEquals(404, e.getCode());
- }
+ // TODO: test validations
}
+
+ /**
+ * Updates a pet in the store with form data
+ *
+ *
+ */
@Test
- public void testUploadFile() throws Exception {
- Pet pet = createRandomPet();
- api.addPet(pet);
+ public void updatePetWithFormTest() {
+ Long petId = null;
+ String name = null;
+ String status = null;
+ // api.updatePetWithForm(petId, name, status);
- File file = new File("hello.txt");
- BufferedWriter writer = new BufferedWriter(new FileWriter(file));
- writer.write("Hello world!");
- writer.close();
-
- api.uploadFile(pet.getId(), "a test file", new File(file.getAbsolutePath()));
+ // TODO: test validations
}
+
+ /**
+ * uploads an image
+ *
+ *
+ */
@Test
- public void testEqualsAndHashCode() {
- Pet pet1 = new Pet();
- Pet pet2 = new Pet();
- assertTrue(pet1.equals(pet2));
- assertTrue(pet2.equals(pet1));
- assertTrue(pet1.hashCode() == pet2.hashCode());
- assertTrue(pet1.equals(pet1));
- assertTrue(pet1.hashCode() == pet1.hashCode());
+ public void uploadFileTest() {
+ Long petId = null;
+ String additionalMetadata = null;
+ File file = null;
+ // ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
- pet2.setName("really-happy");
- pet2.setPhotoUrls(Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2"));
- assertFalse(pet1.equals(pet2));
- assertFalse(pet2.equals(pet1));
- assertFalse(pet1.hashCode() == (pet2.hashCode()));
- assertTrue(pet2.equals(pet2));
- assertTrue(pet2.hashCode() == pet2.hashCode());
-
- pet1.setName("really-happy");
- pet1.setPhotoUrls(Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2"));
- assertTrue(pet1.equals(pet2));
- assertTrue(pet2.equals(pet1));
- assertTrue(pet1.hashCode() == pet2.hashCode());
- assertTrue(pet1.equals(pet1));
- assertTrue(pet1.hashCode() == pet1.hashCode());
+ // TODO: test validations
}
- @Test
- public void testCSVDelimitedArray() throws Exception {
- localServer.enqueue(new MockResponse().setBody("[{\"id\":5,\"name\":\"rocky\"}]"));
- localServer.start();
- PetApi api = localClient.setBasePath(localServer.url("/").toString()).buildClient(PetApi.class);
- PetApi.FindPetsByTagsQueryParams queryParams = new PetApi.FindPetsByTagsQueryParams()
- .tags(Arrays.asList("friendly","energetic"));
- List pets = api.findPetsByTags(queryParams);
- assertNotNull(pets);
- RecordedRequest request = localServer.takeRequest();
- assertThat(request.getPath()).contains("tags=friendly,energetic");
- localServer.shutdown();
- }
-
- private Pet createRandomPet() {
- Pet pet = new Pet();
- pet.setId(TestUtils.nextId());
- pet.setName("gorilla");
-
- Category category = new Category();
- category.setName("really-happy");
-
- pet.setCategory(category);
- pet.setStatus(Pet.StatusEnum.AVAILABLE);
- List photos = Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2");
- pet.setPhotoUrls(photos);
-
- return pet;
- }
+
}
diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/StoreApiTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/StoreApiTest.java
index 5492695f8aa..a0376818af8 100644
--- a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/StoreApiTest.java
+++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/StoreApiTest.java
@@ -1,82 +1,81 @@
package io.swagger.client.api;
-import feign.FeignException;
-
-import io.swagger.TestUtils;
-
import io.swagger.client.ApiClient;
-import io.swagger.client.model.*;
+import io.swagger.client.model.Order;
+import org.junit.Before;
+import org.junit.Test;
-import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
import java.util.Map;
-import org.junit.*;
-import org.threeten.bp.OffsetDateTime;
-
-import static org.junit.Assert.*;
-
+/**
+ * API tests for StoreApi
+ */
public class StoreApiTest {
+
private StoreApi api;
@Before
public void setup() {
- ApiClient apiClient = new ApiClient();
- api = apiClient.buildClient(StoreApi.class);
+ api = new ApiClient().buildClient(StoreApi.class);
}
+
+ /**
+ * Delete purchase order by ID
+ *
+ * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ */
@Test
- public void testGetInventory() throws Exception {
- Map inventory = api.getInventory();
- assertTrue(inventory.keySet().size() > 0);
+ 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
+ */
@Test
- public void testPlaceOrder() throws Exception {
- Order order = createOrder();
- api.placeOrder(order);
+ public void getInventoryTest() {
+ // Map response = api.getInventory();
- Order fetched = api.getOrderById(order.getId());
- assertEquals(order.getId(), fetched.getId());
- assertEquals(order.getPetId(), fetched.getPetId());
- assertEquals(order.getQuantity(), fetched.getQuantity());
- assertTrue(order.getShipDate().isEqual(fetched.getShipDate()));
+ // TODO: test validations
}
+
+ /**
+ * Find purchase order by ID
+ *
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ */
@Test
- public void testDeleteOrder() throws Exception {
- Order order = createOrder();
- api.placeOrder(order);
+ public void getOrderByIdTest() {
+ Long orderId = null;
+ // Order response = api.getOrderById(orderId);
- Order fetched = api.getOrderById(order.getId());
- assertEquals(fetched.getId(), order.getId());
-
- api.deleteOrder(order.getId().toString());
-
- try {
- api.getOrderById(order.getId());
- fail("expected an error");
- } catch (FeignException e) {
- assertTrue(e.getMessage().startsWith("status 404 "));
- }
+ // TODO: test validations
}
- private Order createOrder() {
- Order order = new Order();
- order.setPetId(200L);
- order.setQuantity(13);
- //Ensure 3 fractional digits because of a bug in the petstore server
- order.setShipDate(OffsetDateTime.now().withNano(123000000));
- order.setStatus(Order.StatusEnum.PLACED);
- order.setComplete(true);
+
+ /**
+ * Place an order for a pet
+ *
+ *
+ */
+ @Test
+ public void placeOrderTest() {
+ Order order = null;
+ // Order response = api.placeOrder(order);
- try {
- Field idField = Order.class.getDeclaredField("id");
- idField.setAccessible(true);
- idField.set(order, TestUtils.nextId());
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
-
- return order;
+ // TODO: test validations
}
+
+
}
diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/UserApiTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/UserApiTest.java
index d1c9b67f722..953bb19fa1e 100644
--- a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/UserApiTest.java
+++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/UserApiTest.java
@@ -1,93 +1,156 @@
package io.swagger.client.api;
-import io.swagger.TestUtils;
-
import io.swagger.client.ApiClient;
-import io.swagger.client.model.*;
+import io.swagger.client.model.User;
+import org.junit.Before;
+import org.junit.Test;
-import java.util.Arrays;
-
-import org.junit.*;
-import static org.junit.Assert.*;
+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() {
- ApiClient apiClient = new ApiClient();
- api = apiClient.buildClient(UserApi.class);
+ api = new ApiClient().buildClient(UserApi.class);
}
+
+ /**
+ * Create user
+ *
+ * This can only be done by the logged in user.
+ */
@Test
- public void testCreateUser() throws Exception {
- User user = createUser();
+ public void createUserTest() {
+ User user = null;
+ // api.createUser(user);
- api.createUser(user);
-
- User fetched = api.getUserByName(user.getUsername());
- assertEquals(user.getId(), fetched.getId());
+ // TODO: test validations
}
+
+ /**
+ * Creates list of users with given input array
+ *
+ *
+ */
@Test
- public void testCreateUsersWithArray() throws Exception {
- User user1 = createUser();
- user1.setUsername("user" + user1.getId());
- User user2 = createUser();
- user2.setUsername("user" + user2.getId());
+ public void createUsersWithArrayInputTest() {
+ List user = null;
+ // api.createUsersWithArrayInput(user);
- api.createUsersWithArrayInput(Arrays.asList(user1, user2));
-
- User fetched = api.getUserByName(user1.getUsername());
- assertEquals(user1.getId(), fetched.getId());
+ // TODO: test validations
}
+
+ /**
+ * Creates list of users with given input array
+ *
+ *
+ */
@Test
- public void testCreateUsersWithList() throws Exception {
- User user1 = createUser();
- user1.setUsername("user" + user1.getId());
- User user2 = createUser();
- user2.setUsername("user" + user2.getId());
+ public void createUsersWithListInputTest() {
+ List user = null;
+ // api.createUsersWithListInput(user);
- api.createUsersWithListInput(Arrays.asList(user1, user2));
-
- User fetched = api.getUserByName(user1.getUsername());
- assertEquals(user1.getId(), fetched.getId());
+ // TODO: test validations
}
- // ignore for the time being, please refer to the following for more info:
- // https://github.com/swagger-api/swagger-codegen/issues/1660
- @Ignore @Test
- public void testLoginUser() throws Exception {
- User user = createUser();
- api.createUser(user);
+
+ /**
+ * Delete user
+ *
+ * This can only be done by the logged in user.
+ */
+ @Test
+ public void deleteUserTest() {
+ String username = null;
+ // api.deleteUser(username);
- String token = api.loginUser(user.getUsername(), user.getPassword());
- assertTrue(token.startsWith("logged in user session:"));
+ // TODO: test validations
+ }
+
+ /**
+ * Get user by user name
+ *
+ *
+ */
+ @Test
+ public void getUserByNameTest() {
+ String username = null;
+ // User response = api.getUserByName(username);
+
+ // TODO: test validations
+ }
+
+
+ /**
+ * Logs user into the system
+ *
+ *
+ */
+ @Test
+ public void loginUserTest() {
+ String username = null;
+ String password = null;
+ // String response = api.loginUser(username, password);
+
+ // TODO: test validations
+ }
+
+ /**
+ * Logs user into the system
+ *
+ *
+ *
+ * This tests the overload of the method that uses a Map for query parameters instead of
+ * listing them out individually.
+ */
+ @Test
+ public void loginUserTestQueryMap() {
UserApi.LoginUserQueryParams queryParams = new UserApi.LoginUserQueryParams()
- .username(user.getUsername())
- .password(user.getPassword());
- token = api.loginUser(queryParams);
- assertTrue(token.startsWith("logged in user session:"));
- }
+ .username(null)
+ .password(null);
+ // String response = api.loginUser(queryParams);
+ // TODO: test validations
+ }
+
+ /**
+ * Logs out current logged in user session
+ *
+ *
+ */
@Test
- public void logoutUser() throws Exception {
- api.logoutUser();
+ public void logoutUserTest() {
+ // api.logoutUser();
+
+ // TODO: test validations
}
- private User createUser() {
- User user = new User();
- user.setId(TestUtils.nextId());
- user.setUsername("fred" + user.getId());
- user.setFirstName("Fred");
- user.setLastName("Meyer");
- user.setEmail("fred@fredmeyer.com");
- user.setPassword("xxXXxx");
- user.setPhone("408-867-5309");
- user.setUserStatus(123);
+
+ /**
+ * Updated user
+ *
+ * This can only be done by the logged in user.
+ */
+ @Test
+ public void updateUserTest() {
+ String username = null;
+ User user = null;
+ // api.updateUser(username, user);
- return user;
+ // TODO: test validations
}
+
+
}
diff --git a/samples/client/petstore/java/google-api-client/.openapi-generator-ignore b/samples/client/petstore/java/google-api-client/.openapi-generator-ignore
index c5fa491b4c5..7484ee590a3 100644
--- a/samples/client/petstore/java/google-api-client/.openapi-generator-ignore
+++ b/samples/client/petstore/java/google-api-client/.openapi-generator-ignore
@@ -1,11 +1,11 @@
-# Swagger Codegen Ignore
-# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# 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:
+# You can make changes and tell OpenAPI Generator 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 (*):
diff --git a/samples/client/petstore/java/google-api-client/README.md b/samples/client/petstore/java/google-api-client/README.md
index 336f86aa4f9..98ae25b2972 100644
--- a/samples/client/petstore/java/google-api-client/README.md
+++ b/samples/client/petstore/java/google-api-client/README.md
@@ -1,24 +1,35 @@
-# swagger-petstore-google-api-client
+# petstore-google-api-client
+
+Swagger Petstore
+- API version: 1.0.0
+
+This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
+
+*Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen)*
+
## Requirements
-Building the API client library requires [Maven](https://maven.apache.org/) to be installed.
+Building the API client library requires:
+1. Java 1.7+
+2. Maven/Gradle
## Installation
To install the API client library to your local Maven repository, simply execute:
```shell
-mvn install
+mvn clean install
```
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
```shell
-mvn deploy
+mvn clean deploy
```
-Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information.
+Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.
### Maven users
@@ -26,10 +37,10 @@ Add this dependency to your project's POM:
```xml
- io.swagger
- swagger-petstore-google-api-client
- 1.0.0
- compile
+ org.openapitools
+ petstore-google-api-client
+ 1.0.0
+ compile
```
@@ -38,19 +49,21 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:
```groovy
-compile "io.swagger:swagger-petstore-google-api-client:1.0.0"
+compile "org.openapitools:petstore-google-api-client:1.0.0"
```
### Others
At first generate the JAR by executing:
- mvn package
+```shell
+mvn clean package
+```
Then manually install the following JARs:
-* target/swagger-petstore-google-api-client-1.0.0.jar
-* target/lib/*.jar
+* `target/petstore-google-api-client-1.0.0.jar`
+* `target/lib/*.jar`
## Getting Started
@@ -71,9 +84,9 @@ public class AnotherFakeApiExample {
public static void main(String[] args) {
AnotherFakeApi apiInstance = new AnotherFakeApi();
- Client body = new Client(); // Client | client model
+ Client client = new Client(); // Client | client model
try {
- Client result = apiInstance.testSpecialTags(body);
+ Client result = apiInstance.testSpecialTags(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnotherFakeApi#testSpecialTags");
@@ -95,6 +108,7 @@ Class | Method | HTTP request | Description
*FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
+*FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
*FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
@@ -132,9 +146,11 @@ Class | Method | HTTP request | Description
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
- [ArrayTest](docs/ArrayTest.md)
- [Capitalization](docs/Capitalization.md)
+ - [Cat](docs/Cat.md)
- [Category](docs/Category.md)
- [ClassModel](docs/ClassModel.md)
- [Client](docs/Client.md)
+ - [Dog](docs/Dog.md)
- [EnumArrays](docs/EnumArrays.md)
- [EnumClass](docs/EnumClass.md)
- [EnumTest](docs/EnumTest.md)
@@ -148,15 +164,16 @@ Class | Method | HTTP request | Description
- [Name](docs/Name.md)
- [NumberOnly](docs/NumberOnly.md)
- [Order](docs/Order.md)
+ - [OuterBoolean](docs/OuterBoolean.md)
- [OuterComposite](docs/OuterComposite.md)
- [OuterEnum](docs/OuterEnum.md)
+ - [OuterNumber](docs/OuterNumber.md)
+ - [OuterString](docs/OuterString.md)
- [Pet](docs/Pet.md)
- [ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [SpecialModelName](docs/SpecialModelName.md)
- [Tag](docs/Tag.md)
- [User](docs/User.md)
- - [Cat](docs/Cat.md)
- - [Dog](docs/Dog.md)
## Documentation for Authorization
diff --git a/samples/client/petstore/java/google-api-client/build.gradle b/samples/client/petstore/java/google-api-client/build.gradle
index 5bd193c6ed2..d66603375ad 100644
--- a/samples/client/petstore/java/google-api-client/build.gradle
+++ b/samples/client/petstore/java/google-api-client/build.gradle
@@ -1,7 +1,7 @@
apply plugin: 'idea'
apply plugin: 'eclipse'
-group = 'io.swagger'
+group = 'org.openapitools'
version = '1.0.0'
buildscript {
@@ -83,7 +83,7 @@ if(hasProperty('target') && target == 'android') {
install {
repositories.mavenInstaller {
- pom.artifactId = 'swagger-petstore-google-api-client'
+ pom.artifactId = 'petstore-google-api-client'
}
}
diff --git a/samples/client/petstore/java/google-api-client/build.sbt b/samples/client/petstore/java/google-api-client/build.sbt
index 44619712462..92a0aabedde 100644
--- a/samples/client/petstore/java/google-api-client/build.sbt
+++ b/samples/client/petstore/java/google-api-client/build.sbt
@@ -1,7 +1,7 @@
lazy val root = (project in file(".")).
settings(
- organization := "io.swagger",
- name := "swagger-petstore-google-api-client",
+ organization := "org.openapitools",
+ name := "petstore-google-api-client",
version := "1.0.0",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
diff --git a/samples/client/petstore/java/google-api-client/docs/AnotherFakeApi.md b/samples/client/petstore/java/google-api-client/docs/AnotherFakeApi.md
index 7a04619aaba..a4e6f902bf9 100644
--- a/samples/client/petstore/java/google-api-client/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/java/google-api-client/docs/AnotherFakeApi.md
@@ -9,7 +9,7 @@ Method | HTTP request | Description
# **testSpecialTags**
-> Client testSpecialTags(body)
+> Client testSpecialTags(client)
To test special tags
@@ -23,9 +23,9 @@ To test special tags
AnotherFakeApi apiInstance = new AnotherFakeApi();
-Client body = new Client(); // Client | client model
+Client client = new Client(); // Client | client model
try {
- Client result = apiInstance.testSpecialTags(body);
+ Client result = apiInstance.testSpecialTags(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnotherFakeApi#testSpecialTags");
@@ -37,7 +37,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Client**](Client.md)| client model |
+ **client** | [**Client**](Client.md)| client model |
### Return type
diff --git a/samples/client/petstore/java/google-api-client/docs/EnumTest.md b/samples/client/petstore/java/google-api-client/docs/EnumTest.md
index 08fee344882..ca048bcc515 100644
--- a/samples/client/petstore/java/google-api-client/docs/EnumTest.md
+++ b/samples/client/petstore/java/google-api-client/docs/EnumTest.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional]
+**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | |
**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional]
**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional]
**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]
@@ -19,6 +20,15 @@ LOWER | "lower"
EMPTY | ""
+
+## Enum: EnumStringRequiredEnum
+Name | Value
+---- | -----
+UPPER | "UPPER"
+LOWER | "lower"
+EMPTY | ""
+
+
## Enum: EnumIntegerEnum
Name | Value
diff --git a/samples/client/petstore/java/google-api-client/docs/FakeApi.md b/samples/client/petstore/java/google-api-client/docs/FakeApi.md
index 737ccc28293..cf5414fa9e1 100644
--- a/samples/client/petstore/java/google-api-client/docs/FakeApi.md
+++ b/samples/client/petstore/java/google-api-client/docs/FakeApi.md
@@ -8,6 +8,7 @@ Method | HTTP request | Description
[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
+[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
@@ -17,7 +18,7 @@ Method | HTTP request | Description
# **fakeOuterBooleanSerialize**
-> Boolean fakeOuterBooleanSerialize(body)
+> Boolean fakeOuterBooleanSerialize(booleanPostBody)
@@ -31,9 +32,9 @@ Test serialization of outer boolean types
FakeApi apiInstance = new FakeApi();
-Boolean body = true; // Boolean | Input boolean as post body
+Boolean booleanPostBody = true; // Boolean | Input boolean as post body
try {
- Boolean result = apiInstance.fakeOuterBooleanSerialize(body);
+ Boolean result = apiInstance.fakeOuterBooleanSerialize(booleanPostBody);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize");
@@ -45,7 +46,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Boolean**](Boolean.md)| Input boolean as post body | [optional]
+ **booleanPostBody** | **Boolean**| Input boolean as post body | [optional]
### Return type
@@ -58,11 +59,11 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: Not defined
+ - **Accept**: */*
# **fakeOuterCompositeSerialize**
-> OuterComposite fakeOuterCompositeSerialize(body)
+> OuterComposite fakeOuterCompositeSerialize(outerComposite)
@@ -76,9 +77,9 @@ Test serialization of object with outer number type
FakeApi apiInstance = new FakeApi();
-OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body
+OuterComposite outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body
try {
- OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body);
+ OuterComposite result = apiInstance.fakeOuterCompositeSerialize(outerComposite);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize");
@@ -90,7 +91,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
+ **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
### Return type
@@ -103,7 +104,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: Not defined
+ - **Accept**: */*
# **fakeOuterNumberSerialize**
@@ -135,7 +136,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**BigDecimal**](BigDecimal.md)| Input number as post body | [optional]
+ **body** | **BigDecimal**| Input number as post body | [optional]
### Return type
@@ -148,7 +149,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: Not defined
+ - **Accept**: */*
# **fakeOuterStringSerialize**
@@ -180,7 +181,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**String**](String.md)| Input string as post body | [optional]
+ **body** | **String**| Input string as post body | [optional]
### Return type
@@ -193,11 +194,55 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
+ - **Accept**: */*
+
+
+# **testBodyWithQueryParams**
+> testBodyWithQueryParams(query, user)
+
+
+
+### Example
+```java
+// Import classes:
+//import io.swagger.client.ApiException;
+//import io.swagger.client.api.FakeApi;
+
+
+FakeApi apiInstance = new FakeApi();
+String query = "query_example"; // String |
+User user = new User(); // User |
+try {
+ apiInstance.testBodyWithQueryParams(query, user);
+} catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testBodyWithQueryParams");
+ e.printStackTrace();
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **query** | **String**| |
+ **user** | [**User**](User.md)| |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
- **Accept**: Not defined
# **testClientModel**
-> Client testClientModel(body)
+> Client testClientModel(client)
To test \"client\" model
@@ -211,9 +256,9 @@ To test \"client\" model
FakeApi apiInstance = new FakeApi();
-Client body = new Client(); // Client | client model
+Client client = new Client(); // Client | client model
try {
- Client result = apiInstance.testClientModel(body);
+ Client result = apiInstance.testClientModel(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testClientModel");
@@ -225,7 +270,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Client**](Client.md)| client model |
+ **client** | [**Client**](Client.md)| client model |
### Return type
@@ -268,13 +313,13 @@ FakeApi apiInstance = new FakeApi();
BigDecimal number = new BigDecimal(); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
-byte[] _byte = B; // byte[] | None
+byte[] _byte = null; // byte[] | None
Integer integer = 56; // Integer | None
Integer int32 = 56; // Integer | None
-Long int64 = 789L; // Long | None
+Long int64 = 56L; // Long | None
Float _float = 3.4F; // Float | None
String string = "string_example"; // String | None
-byte[] binary = B; // byte[] | None
+File binary = new File("/path/to/file"); // File | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
String password = "password_example"; // String | None
@@ -295,12 +340,12 @@ Name | Type | Description | Notes
**_double** | **Double**| None |
**patternWithoutDelimiter** | **String**| None |
**_byte** | **byte[]**| None |
- **integer** | **Integer**| None | [optional]
- **int32** | **Integer**| None | [optional]
+ **integer** | **Integer**| None | [optional] [enum: ]
+ **int32** | **Integer**| None | [optional] [enum: ]
**int64** | **Long**| None | [optional]
**_float** | **Float**| None | [optional]
**string** | **String**| None | [optional]
- **binary** | **byte[]**| None | [optional]
+ **binary** | **File**| None | [optional]
**date** | **LocalDate**| None | [optional]
**dateTime** | **OffsetDateTime**| None | [optional]
**password** | **String**| None | [optional]
@@ -316,12 +361,12 @@ null (empty response body)
### HTTP request headers
- - **Content-Type**: application/xml; charset=utf-8, application/json; charset=utf-8
- - **Accept**: application/xml; charset=utf-8, application/json; charset=utf-8
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **Accept**: Not defined
# **testEnumParameters**
-> testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble)
+> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString)
To test enum parameters
@@ -335,16 +380,16 @@ To test enum parameters
FakeApi apiInstance = new FakeApi();
-List enumFormStringArray = Arrays.asList("enumFormStringArray_example"); // List | Form parameter enum test (string array)
-String enumFormString = "-efg"; // String | Form parameter enum test (string)
List enumHeaderStringArray = Arrays.asList("enumHeaderStringArray_example"); // List | Header parameter enum test (string array)
String enumHeaderString = "-efg"; // String | Header parameter enum test (string)
List enumQueryStringArray = Arrays.asList("enumQueryStringArray_example"); // List | Query parameter enum test (string array)
String enumQueryString = "-efg"; // String | Query parameter enum test (string)
Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double)
Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double)
+List enumFormStringArray = new List(); // List | Form parameter enum test (string array)
+String enumFormString = "enumFormString_example"; // String | Form parameter enum test (string)
try {
- apiInstance.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
+ apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testEnumParameters");
e.printStackTrace();
@@ -355,14 +400,14 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $]
- **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
**enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $]
**enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
**enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $]
**enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
**enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2]
**enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2]
+ **enumFormStringArray** | [**List<String>**](List.md)| Form parameter enum test (string array) | [optional] [enum: >, $]
+ **enumFormString** | **String**| Form parameter enum test (string) | [optional] [enum: _abc, -efg, (xyz)]
### Return type
@@ -374,17 +419,15 @@ No authorization required
### HTTP request headers
- - **Content-Type**: */*
- - **Accept**: */*
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **Accept**: Not defined
# **testInlineAdditionalProperties**
-> testInlineAdditionalProperties(param)
+> testInlineAdditionalProperties(requestBody)
test inline additionalProperties
-
-
### Example
```java
// Import classes:
@@ -393,9 +436,9 @@ test inline additionalProperties
FakeApi apiInstance = new FakeApi();
-Object param = null; // Object | request body
+String requestBody = new HashMap(); // String | request body
try {
- apiInstance.testInlineAdditionalProperties(param);
+ apiInstance.testInlineAdditionalProperties(requestBody);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
e.printStackTrace();
@@ -406,7 +449,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **param** | **Object**| request body |
+ **requestBody** | [**String**](String.md)| request body |
### Return type
@@ -427,8 +470,6 @@ No authorization required
test json serialization of form data
-
-
### Example
```java
// Import classes:
@@ -464,6 +505,6 @@ No authorization required
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined
diff --git a/samples/client/petstore/java/google-api-client/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/google-api-client/docs/FakeClassnameTags123Api.md
index eb030817b50..01f56c717d8 100644
--- a/samples/client/petstore/java/google-api-client/docs/FakeClassnameTags123Api.md
+++ b/samples/client/petstore/java/google-api-client/docs/FakeClassnameTags123Api.md
@@ -9,7 +9,7 @@ Method | HTTP request | Description
# **testClassname**
-> Client testClassname(body)
+> Client testClassname(client)
To test class name in snake case
@@ -33,9 +33,9 @@ api_key_query.setApiKey("YOUR API KEY");
//api_key_query.setApiKeyPrefix("Token");
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api();
-Client body = new Client(); // Client | client model
+Client client = new Client(); // Client | client model
try {
- Client result = apiInstance.testClassname(body);
+ Client result = apiInstance.testClassname(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeClassnameTags123Api#testClassname");
@@ -47,7 +47,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Client**](Client.md)| client model |
+ **client** | [**Client**](Client.md)| client model |
### Return type
diff --git a/samples/client/petstore/java/google-api-client/docs/FormatTest.md b/samples/client/petstore/java/google-api-client/docs/FormatTest.md
index c7a3acb3cb7..986f70236e1 100644
--- a/samples/client/petstore/java/google-api-client/docs/FormatTest.md
+++ b/samples/client/petstore/java/google-api-client/docs/FormatTest.md
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
**_double** | **Double** | | [optional]
**string** | **String** | | [optional]
**_byte** | **byte[]** | |
-**binary** | **byte[]** | | [optional]
+**binary** | [**File**](File.md) | | [optional]
**date** | [**LocalDate**](LocalDate.md) | |
**dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional]
diff --git a/samples/client/petstore/java/google-api-client/docs/Name.md b/samples/client/petstore/java/google-api-client/docs/Name.md
index ce2fb4dee50..64060f82de4 100644
--- a/samples/client/petstore/java/google-api-client/docs/Name.md
+++ b/samples/client/petstore/java/google-api-client/docs/Name.md
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
**name** | **Integer** | |
**snakeCase** | **Integer** | | [optional]
**property** | **String** | | [optional]
-**_123Number** | **Integer** | | [optional]
+**_123number** | **Integer** | | [optional]
diff --git a/samples/client/petstore/java/feign/docs/ModelReturn.md b/samples/client/petstore/java/google-api-client/docs/OuterBoolean.md
similarity index 66%
rename from samples/client/petstore/java/feign/docs/ModelReturn.md
rename to samples/client/petstore/java/google-api-client/docs/OuterBoolean.md
index a679b04953e..0c792032f84 100644
--- a/samples/client/petstore/java/feign/docs/ModelReturn.md
+++ b/samples/client/petstore/java/google-api-client/docs/OuterBoolean.md
@@ -1,10 +1,9 @@
-# ModelReturn
+# OuterBoolean
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**_return** | **Integer** | | [optional]
diff --git a/samples/client/petstore/java/feign/docs/AnimalFarm.md b/samples/client/petstore/java/google-api-client/docs/OuterNumber.md
similarity index 89%
rename from samples/client/petstore/java/feign/docs/AnimalFarm.md
rename to samples/client/petstore/java/google-api-client/docs/OuterNumber.md
index c7c7f1ddcce..ab7613b1810 100644
--- a/samples/client/petstore/java/feign/docs/AnimalFarm.md
+++ b/samples/client/petstore/java/google-api-client/docs/OuterNumber.md
@@ -1,5 +1,5 @@
-# AnimalFarm
+# OuterNumber
## Properties
Name | Type | Description | Notes
diff --git a/samples/client/petstore/java/retrofit/docs/AnimalFarm.md b/samples/client/petstore/java/google-api-client/docs/OuterString.md
similarity index 89%
rename from samples/client/petstore/java/retrofit/docs/AnimalFarm.md
rename to samples/client/petstore/java/google-api-client/docs/OuterString.md
index c7c7f1ddcce..3079fce4a0d 100644
--- a/samples/client/petstore/java/retrofit/docs/AnimalFarm.md
+++ b/samples/client/petstore/java/google-api-client/docs/OuterString.md
@@ -1,5 +1,5 @@
-# AnimalFarm
+# OuterString
## Properties
Name | Type | Description | Notes
diff --git a/samples/client/petstore/java/google-api-client/docs/PetApi.md b/samples/client/petstore/java/google-api-client/docs/PetApi.md
index b5fa395947d..d790ff3cd4d 100644
--- a/samples/client/petstore/java/google-api-client/docs/PetApi.md
+++ b/samples/client/petstore/java/google-api-client/docs/PetApi.md
@@ -16,12 +16,10 @@ Method | HTTP request | Description
# **addPet**
-> addPet(body)
+> addPet(pet)
Add a new pet to the store
-
-
### Example
```java
// Import classes:
@@ -38,9 +36,9 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi();
-Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
+Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
try {
- apiInstance.addPet(body);
+ apiInstance.addPet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#addPet");
e.printStackTrace();
@@ -51,7 +49,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+ **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -64,7 +62,7 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
# **deletePet**
@@ -72,8 +70,6 @@ null (empty response body)
Deletes a pet
-
-
### Example
```java
// Import classes:
@@ -90,7 +86,7 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi();
-Long petId = 789L; // Long | Pet id to delete
+Long petId = 56L; // Long | Pet id to delete
String apiKey = "apiKey_example"; // String |
try {
apiInstance.deletePet(petId, apiKey);
@@ -118,7 +114,7 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
# **findPetsByStatus**
@@ -252,7 +248,7 @@ api_key.setApiKey("YOUR API KEY");
//api_key.setApiKeyPrefix("Token");
PetApi apiInstance = new PetApi();
-Long petId = 789L; // Long | ID of pet to return
+Long petId = 56L; // Long | ID of pet to return
try {
Pet result = apiInstance.getPetById(petId);
System.out.println(result);
@@ -283,12 +279,10 @@ Name | Type | Description | Notes
# **updatePet**
-> updatePet(body)
+> updatePet(pet)
Update an existing pet
-
-
### Example
```java
// Import classes:
@@ -305,9 +299,9 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi();
-Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
+Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
try {
- apiInstance.updatePet(body);
+ apiInstance.updatePet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#updatePet");
e.printStackTrace();
@@ -318,7 +312,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+ **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -331,7 +325,7 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
# **updatePetWithForm**
@@ -339,8 +333,6 @@ null (empty response body)
Updates a pet in the store with form data
-
-
### Example
```java
// Import classes:
@@ -357,7 +349,7 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi();
-Long petId = 789L; // Long | ID of pet that needs to be updated
+Long petId = 56L; // Long | ID of pet that needs to be updated
String name = "name_example"; // String | Updated name of the pet
String status = "status_example"; // String | Updated status of the pet
try {
@@ -387,7 +379,7 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
# **uploadFile**
@@ -395,8 +387,6 @@ null (empty response body)
uploads an image
-
-
### Example
```java
// Import classes:
@@ -413,9 +403,9 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi();
-Long petId = 789L; // Long | ID of pet to update
+Long petId = 56L; // Long | ID of pet to update
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
-File file = new File("/path/to/file.txt"); // File | file to upload
+File file = new File("/path/to/file"); // File | file to upload
try {
ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
System.out.println(result);
diff --git a/samples/client/petstore/java/google-api-client/docs/SpecialModelName.md b/samples/client/petstore/java/google-api-client/docs/SpecialModelName.md
index c2c6117c552..6cf53410ace 100644
--- a/samples/client/petstore/java/google-api-client/docs/SpecialModelName.md
+++ b/samples/client/petstore/java/google-api-client/docs/SpecialModelName.md
@@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**specialPropertyName** | **Long** | | [optional]
+**$specialPropertyName** | **Long** | | [optional]
diff --git a/samples/client/petstore/java/google-api-client/docs/StoreApi.md b/samples/client/petstore/java/google-api-client/docs/StoreApi.md
index 7aed6450e6a..339e3181b09 100644
--- a/samples/client/petstore/java/google-api-client/docs/StoreApi.md
+++ b/samples/client/petstore/java/google-api-client/docs/StoreApi.md
@@ -52,7 +52,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
# **getInventory**
@@ -121,7 +121,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other val
StoreApi apiInstance = new StoreApi();
-Long orderId = 789L; // Long | ID of pet that needs to be fetched
+Long orderId = 56L; // Long | ID of pet that needs to be fetched
try {
Order result = apiInstance.getOrderById(orderId);
System.out.println(result);
@@ -135,7 +135,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **orderId** | **Long**| ID of pet that needs to be fetched |
+ **orderId** | **Long**| ID of pet that needs to be fetched | [enum: ]
### Return type
@@ -152,12 +152,10 @@ No authorization required
# **placeOrder**
-> Order placeOrder(body)
+> Order placeOrder(order)
Place an order for a pet
-
-
### Example
```java
// Import classes:
@@ -166,9 +164,9 @@ Place an order for a pet
StoreApi apiInstance = new StoreApi();
-Order body = new Order(); // Order | order placed for purchasing the pet
+Order order = new Order(); // Order | order placed for purchasing the pet
try {
- Order result = apiInstance.placeOrder(body);
+ Order result = apiInstance.placeOrder(order);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StoreApi#placeOrder");
@@ -180,7 +178,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Order**](Order.md)| order placed for purchasing the pet |
+ **order** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type
diff --git a/samples/client/petstore/java/google-api-client/docs/UserApi.md b/samples/client/petstore/java/google-api-client/docs/UserApi.md
index 1c5218ac128..f982ddbf57b 100644
--- a/samples/client/petstore/java/google-api-client/docs/UserApi.md
+++ b/samples/client/petstore/java/google-api-client/docs/UserApi.md
@@ -16,7 +16,7 @@ Method | HTTP request | Description
# **createUser**
-> createUser(body)
+> createUser(user)
Create user
@@ -30,9 +30,9 @@ This can only be done by the logged in user.
UserApi apiInstance = new UserApi();
-User body = new User(); // User | Created user object
+User user = new User(); // User | Created user object
try {
- apiInstance.createUser(body);
+ apiInstance.createUser(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUser");
e.printStackTrace();
@@ -43,7 +43,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**User**](User.md)| Created user object |
+ **user** | [**User**](User.md)| Created user object |
### Return type
@@ -56,16 +56,14 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
# **createUsersWithArrayInput**
-> createUsersWithArrayInput(body)
+> createUsersWithArrayInput(user)
Creates list of users with given input array
-
-
### Example
```java
// Import classes:
@@ -74,9 +72,9 @@ Creates list of users with given input array
UserApi apiInstance = new UserApi();
-List body = Arrays.asList(new User()); // List | List of user object
+List user = Arrays.asList(new List()); // List | List of user object
try {
- apiInstance.createUsersWithArrayInput(body);
+ apiInstance.createUsersWithArrayInput(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
e.printStackTrace();
@@ -87,7 +85,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**List<User>**](User.md)| List of user object |
+ **user** | [**List<User>**](List.md)| List of user object |
### Return type
@@ -100,16 +98,14 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
# **createUsersWithListInput**
-> createUsersWithListInput(body)
+> createUsersWithListInput(user)
Creates list of users with given input array
-
-
### Example
```java
// Import classes:
@@ -118,9 +114,9 @@ Creates list of users with given input array
UserApi apiInstance = new UserApi();
-List body = Arrays.asList(new User()); // List | List of user object
+List user = Arrays.asList(new List()); // List | List of user object
try {
- apiInstance.createUsersWithListInput(body);
+ apiInstance.createUsersWithListInput(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithListInput");
e.printStackTrace();
@@ -131,7 +127,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**List<User>**](User.md)| List of user object |
+ **user** | [**List<User>**](List.md)| List of user object |
### Return type
@@ -144,7 +140,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
# **deleteUser**
@@ -188,7 +184,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
# **getUserByName**
@@ -196,8 +192,6 @@ No authorization required
Get user by user name
-
-
### Example
```java
// Import classes:
@@ -241,8 +235,6 @@ No authorization required
Logs user into the system
-
-
### Example
```java
// Import classes:
@@ -288,8 +280,6 @@ No authorization required
Logs out current logged in user session
-
-
### Example
```java
// Import classes:
@@ -320,11 +310,11 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
# **updateUser**
-> updateUser(username, body)
+> updateUser(username, user)
Updated user
@@ -339,9 +329,9 @@ This can only be done by the logged in user.
UserApi apiInstance = new UserApi();
String username = "username_example"; // String | name that need to be deleted
-User body = new User(); // User | Updated user object
+User user = new User(); // User | Updated user object
try {
- apiInstance.updateUser(username, body);
+ apiInstance.updateUser(username, user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#updateUser");
e.printStackTrace();
@@ -353,7 +343,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| name that need to be deleted |
- **body** | [**User**](User.md)| Updated user object |
+ **user** | [**User**](User.md)| Updated user object |
### Return type
@@ -366,5 +356,5 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
diff --git a/samples/client/petstore/java/google-api-client/pom.xml b/samples/client/petstore/java/google-api-client/pom.xml
index cbdb05f2ef1..02d40660155 100644
--- a/samples/client/petstore/java/google-api-client/pom.xml
+++ b/samples/client/petstore/java/google-api-client/pom.xml
@@ -1,17 +1,17 @@
4.0.0
- io.swagger
- swagger-petstore-google-api-client
+ org.openapitools
+ petstore-google-api-clientjar
- swagger-petstore-google-api-client
+ petstore-google-api-client1.0.0
- https://github.com/swagger-api/swagger-codegen
- Swagger Java
+ https://github.com/openapitools/openapi-generator
+ OpenAPI Java
- scm:git:git@github.com:swagger-api/swagger-codegen.git
- scm:git:git@github.com:swagger-api/swagger-codegen.git
- https://github.com/swagger-api/swagger-codegen
+ scm:git:git@github.com:openapitools/openapi-generator.git
+ scm:git:git@github.com:openapitools/openapi-generator.git
+ https://github.com/openapitools/openapi-generator
@@ -24,10 +24,10 @@
- Swagger
- apiteam@swagger.io
- Swagger
- http://swagger.io
+ OpenAPI
+ team@openapitools.org
+ OpenAPI
+ http://openapitools.org
@@ -139,8 +139,7 @@
maven-compiler-plugin3.6.1
-
- 1.7
+ 1.71.7
diff --git a/samples/client/petstore/java/google-api-client/settings.gradle b/samples/client/petstore/java/google-api-client/settings.gradle
index 35a7b0d0442..196a3235093 100644
--- a/samples/client/petstore/java/google-api-client/settings.gradle
+++ b/samples/client/petstore/java/google-api-client/settings.gradle
@@ -1 +1 @@
-rootProject.name = "swagger-petstore-google-api-client"
\ No newline at end of file
+rootProject.name = "petstore-google-api-client"
\ No newline at end of file
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/AnotherFakeApi.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/AnotherFakeApi.java
index ac669657974..dccc835d72f 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/AnotherFakeApi.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/AnotherFakeApi.java
@@ -44,12 +44,12 @@ public class AnotherFakeApi {
* To test special tags
* To test special tags
*
200 - successful operation
- * @param body client model
+ * @param client client model
* @return Client
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public Client testSpecialTags(Client body) throws IOException {
- HttpResponse response = testSpecialTagsForHttpResponse(body);
+ public Client testSpecialTags(Client client) throws IOException {
+ HttpResponse response = testSpecialTagsForHttpResponse(client);
TypeReference typeRef = new TypeReference() {};
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
}
@@ -58,51 +58,51 @@ public class AnotherFakeApi {
* To test special tags
* To test special tags
*
200 - successful operation
- * @param body client model
+ * @param client client model
* @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
* @return Client
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public Client testSpecialTags(Client body, Map params) throws IOException {
- HttpResponse response = testSpecialTagsForHttpResponse(body, params);
+ public Client testSpecialTags(Client client, Map params) throws IOException {
+ HttpResponse response = testSpecialTagsForHttpResponse(client, params);
TypeReference typeRef = new TypeReference() {};
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
}
- public HttpResponse testSpecialTagsForHttpResponse(Client body) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling testSpecialTags");
+ public HttpResponse testSpecialTagsForHttpResponse(Client client) throws IOException {
+ // verify the required parameter 'client' is set
+ if (client == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'client' when calling testSpecialTags");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/another-fake/dummy");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(client);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PATCH, genericUrl, content).execute();
}
- public HttpResponse testSpecialTagsForHttpResponse(java.io.InputStream body, String mediaType) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling testSpecialTags");
+ public HttpResponse testSpecialTagsForHttpResponse(java.io.InputStream client, String mediaType) throws IOException {
+ // verify the required parameter 'client' is set
+ if (client == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'client' when calling testSpecialTags");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/another-fake/dummy");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = body == null ?
+ HttpContent content = client == null ?
apiClient.new JacksonJsonHttpContent(null) :
- new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, body);
+ new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, client);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PATCH, genericUrl, content).execute();
}
- public HttpResponse testSpecialTagsForHttpResponse(Client body, Map params) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling testSpecialTags");
+ public HttpResponse testSpecialTagsForHttpResponse(Client client, Map params) throws IOException {
+ // verify the required parameter 'client' is set
+ if (client == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'client' when calling testSpecialTags");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/another-fake/dummy");
@@ -127,7 +127,7 @@ public class AnotherFakeApi {
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(client);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PATCH, genericUrl, content).execute();
}
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/FakeApi.java
index 013833c1181..f967d24645a 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/FakeApi.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/FakeApi.java
@@ -4,9 +4,11 @@ import io.swagger.client.ApiClient;
import java.math.BigDecimal;
import io.swagger.client.model.Client;
+import java.io.File;
import org.threeten.bp.LocalDate;
import org.threeten.bp.OffsetDateTime;
import io.swagger.client.model.OuterComposite;
+import io.swagger.client.model.User;
import com.fasterxml.jackson.core.type.TypeReference;
import com.google.api.client.http.GenericUrl;
@@ -47,12 +49,12 @@ public class FakeApi {
/**
* Test serialization of outer boolean types
*
200 - Output boolean
- * @param body Input boolean as post body
+ * @param booleanPostBody Input boolean as post body
* @return Boolean
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public Boolean fakeOuterBooleanSerialize(Boolean body) throws IOException {
- HttpResponse response = fakeOuterBooleanSerializeForHttpResponse(body);
+ public Boolean fakeOuterBooleanSerialize(Boolean booleanPostBody) throws IOException {
+ HttpResponse response = fakeOuterBooleanSerializeForHttpResponse(booleanPostBody);
TypeReference typeRef = new TypeReference() {};
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
}
@@ -64,37 +66,37 @@ public class FakeApi {
* @return Boolean
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public Boolean fakeOuterBooleanSerialize(Boolean body, Map params) throws IOException {
- HttpResponse response = fakeOuterBooleanSerializeForHttpResponse(body, params);
+ public Boolean fakeOuterBooleanSerialize(Boolean booleanPostBody, Map params) throws IOException {
+ HttpResponse response = fakeOuterBooleanSerializeForHttpResponse(booleanPostBody, params);
TypeReference typeRef = new TypeReference() {};
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
}
- public HttpResponse fakeOuterBooleanSerializeForHttpResponse(Boolean body) throws IOException {
+ public HttpResponse fakeOuterBooleanSerializeForHttpResponse(Boolean booleanPostBody) throws IOException {
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/outer/boolean");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(booleanPostBody);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
- public HttpResponse fakeOuterBooleanSerializeForHttpResponse(java.io.InputStream body, String mediaType) throws IOException {
+ public HttpResponse fakeOuterBooleanSerializeForHttpResponse(java.io.InputStream booleanPostBody, String mediaType) throws IOException {
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/outer/boolean");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = body == null ?
+ HttpContent content = booleanPostBody == null ?
apiClient.new JacksonJsonHttpContent(null) :
- new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, body);
+ new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, booleanPostBody);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
- public HttpResponse fakeOuterBooleanSerializeForHttpResponse(Boolean body, Map params) throws IOException {
+ public HttpResponse fakeOuterBooleanSerializeForHttpResponse(Boolean booleanPostBody, Map params) throws IOException {
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/outer/boolean");
@@ -119,7 +121,7 @@ public class FakeApi {
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(booleanPostBody);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
@@ -127,12 +129,12 @@ public class FakeApi {
/**
* Test serialization of object with outer number type
*
200 - Output composite
- * @param body Input composite as post body
+ * @param outerComposite Input composite as post body
* @return OuterComposite
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws IOException {
- HttpResponse response = fakeOuterCompositeSerializeForHttpResponse(body);
+ public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws IOException {
+ HttpResponse response = fakeOuterCompositeSerializeForHttpResponse(outerComposite);
TypeReference typeRef = new TypeReference() {};
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
}
@@ -144,37 +146,37 @@ public class FakeApi {
* @return OuterComposite
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public OuterComposite fakeOuterCompositeSerialize(OuterComposite body, Map params) throws IOException {
- HttpResponse response = fakeOuterCompositeSerializeForHttpResponse(body, params);
+ public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite, Map params) throws IOException {
+ HttpResponse response = fakeOuterCompositeSerializeForHttpResponse(outerComposite, params);
TypeReference typeRef = new TypeReference() {};
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
}
- public HttpResponse fakeOuterCompositeSerializeForHttpResponse(OuterComposite body) throws IOException {
+ public HttpResponse fakeOuterCompositeSerializeForHttpResponse(OuterComposite outerComposite) throws IOException {
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/outer/composite");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(outerComposite);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
- public HttpResponse fakeOuterCompositeSerializeForHttpResponse(java.io.InputStream body, String mediaType) throws IOException {
+ public HttpResponse fakeOuterCompositeSerializeForHttpResponse(java.io.InputStream outerComposite, String mediaType) throws IOException {
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/outer/composite");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = body == null ?
+ HttpContent content = outerComposite == null ?
apiClient.new JacksonJsonHttpContent(null) :
- new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, body);
+ new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, outerComposite);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
- public HttpResponse fakeOuterCompositeSerializeForHttpResponse(OuterComposite body, Map params) throws IOException {
+ public HttpResponse fakeOuterCompositeSerializeForHttpResponse(OuterComposite outerComposite, Map params) throws IOException {
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/outer/composite");
@@ -199,7 +201,7 @@ public class FakeApi {
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(outerComposite);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
@@ -364,16 +366,133 @@ public class FakeApi {
}
+ /**
+ *
200 - Success
+ * @param query The query parameter
+ * @param user The user parameter
+ * @throws IOException if an error occurs while attempting to invoke the API
+ **/
+ public void testBodyWithQueryParams(String query, User user) throws IOException {
+ testBodyWithQueryParamsForHttpResponse(query, user);
+ }
+
+ /**
+ *
200 - Success
+ * @param query The query parameter
+ * @param user The user parameter
+ * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
+ * @throws IOException if an error occurs while attempting to invoke the API
+ **/
+ public void testBodyWithQueryParams(String query, User user, Map params) throws IOException {
+ testBodyWithQueryParamsForHttpResponse(query, user, params);
+ }
+
+ public HttpResponse testBodyWithQueryParamsForHttpResponse(String query, User user) throws IOException {
+ // verify the required parameter 'query' is set
+ if (query == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'query' when calling testBodyWithQueryParams");
+ }// verify the required parameter 'user' is set
+ if (user == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'user' when calling testBodyWithQueryParams");
+ }
+ UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/body-with-query-params");
+ if (query != null) {
+ String key = "query";
+ Object value = query;
+ if (value instanceof Collection) {
+ uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray());
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+
+ String url = uriBuilder.build().toString();
+ GenericUrl genericUrl = new GenericUrl(url);
+
+ HttpContent content = apiClient.new JacksonJsonHttpContent(user);
+ return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PUT, genericUrl, content).execute();
+ }
+
+ public HttpResponse testBodyWithQueryParamsForHttpResponse(String query, java.io.InputStream user, String mediaType) throws IOException {
+ // verify the required parameter 'query' is set
+ if (query == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'query' when calling testBodyWithQueryParams");
+ }// verify the required parameter 'user' is set
+ if (user == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'user' when calling testBodyWithQueryParams");
+ }
+ UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/body-with-query-params");
+ if (query != null) {
+ String key = "query";
+ Object value = query;
+ if (value instanceof Collection) {
+ uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray());
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+
+ String url = uriBuilder.build().toString();
+ GenericUrl genericUrl = new GenericUrl(url);
+
+ HttpContent content = user == null ?
+ apiClient.new JacksonJsonHttpContent(null) :
+ new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, user);
+ return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PUT, genericUrl, content).execute();
+ }
+
+ public HttpResponse testBodyWithQueryParamsForHttpResponse(String query, User user, Map params) throws IOException {
+ // verify the required parameter 'query' is set
+ if (query == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'query' when calling testBodyWithQueryParams");
+ }// verify the required parameter 'user' is set
+ if (user == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'user' when calling testBodyWithQueryParams");
+ }
+ UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/body-with-query-params");
+
+ // Copy the params argument if present, to allow passing in immutable maps
+ Map allParams = params == null ? new HashMap() : new HashMap(params);
+ // Add the required query param 'query' to the map of query params
+ allParams.put("query", query);
+
+ for (Map.Entry entry: allParams.entrySet()) {
+ String key = entry.getKey();
+ Object value = entry.getValue();
+
+ if (key != null && value != null) {
+ if (value instanceof Collection) {
+ uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray());
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ }
+
+ String url = uriBuilder.build().toString();
+ GenericUrl genericUrl = new GenericUrl(url);
+
+ HttpContent content = apiClient.new JacksonJsonHttpContent(user);
+ return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PUT, genericUrl, content).execute();
+ }
+
+
/**
* To test \"client\" model
* To test \"client\" model
*
200 - successful operation
- * @param body client model
+ * @param client client model
* @return Client
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public Client testClientModel(Client body) throws IOException {
- HttpResponse response = testClientModelForHttpResponse(body);
+ public Client testClientModel(Client client) throws IOException {
+ HttpResponse response = testClientModelForHttpResponse(client);
TypeReference typeRef = new TypeReference() {};
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
}
@@ -382,51 +501,51 @@ public class FakeApi {
* To test \"client\" model
* To test \"client\" model
*
200 - successful operation
- * @param body client model
+ * @param client client model
* @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
* @return Client
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public Client testClientModel(Client body, Map params) throws IOException {
- HttpResponse response = testClientModelForHttpResponse(body, params);
+ public Client testClientModel(Client client, Map params) throws IOException {
+ HttpResponse response = testClientModelForHttpResponse(client, params);
TypeReference typeRef = new TypeReference() {};
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
}
- public HttpResponse testClientModelForHttpResponse(Client body) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling testClientModel");
+ public HttpResponse testClientModelForHttpResponse(Client client) throws IOException {
+ // verify the required parameter 'client' is set
+ if (client == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'client' when calling testClientModel");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(client);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PATCH, genericUrl, content).execute();
}
- public HttpResponse testClientModelForHttpResponse(java.io.InputStream body, String mediaType) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling testClientModel");
+ public HttpResponse testClientModelForHttpResponse(java.io.InputStream client, String mediaType) throws IOException {
+ // verify the required parameter 'client' is set
+ if (client == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'client' when calling testClientModel");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = body == null ?
+ HttpContent content = client == null ?
apiClient.new JacksonJsonHttpContent(null) :
- new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, body);
+ new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, client);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PATCH, genericUrl, content).execute();
}
- public HttpResponse testClientModelForHttpResponse(Client body, Map params) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling testClientModel");
+ public HttpResponse testClientModelForHttpResponse(Client client, Map params) throws IOException {
+ // verify the required parameter 'client' is set
+ if (client == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'client' when calling testClientModel");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake");
@@ -451,7 +570,7 @@ public class FakeApi {
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(client);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PATCH, genericUrl, content).execute();
}
@@ -477,7 +596,7 @@ public class FakeApi {
* @param paramCallback None
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws IOException {
+ public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws IOException {
testEndpointParametersForHttpResponse(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
}
@@ -497,7 +616,7 @@ public class FakeApi {
testEndpointParametersForHttpResponse(number, _double, patternWithoutDelimiter, _byte, params);
}
- public HttpResponse testEndpointParametersForHttpResponse(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws IOException {
+ public HttpResponse testEndpointParametersForHttpResponse(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws IOException {
// verify the required parameter 'number' is set
if (number == null) {
throw new IllegalArgumentException("Missing the required parameter 'number' when calling testEndpointParameters");
@@ -567,18 +686,18 @@ public class FakeApi {
* To test enum parameters
*
400 - Invalid request
*
404 - Not found
- * @param enumFormStringArray Form parameter enum test (string array)
- * @param enumFormString Form parameter enum test (string)
* @param enumHeaderStringArray Header parameter enum test (string array)
* @param enumHeaderString Header parameter enum test (string)
* @param enumQueryStringArray Query parameter enum test (string array)
* @param enumQueryString Query parameter enum test (string)
* @param enumQueryInteger Query parameter enum test (double)
* @param enumQueryDouble Query parameter enum test (double)
+ * @param enumFormStringArray Form parameter enum test (string array)
+ * @param enumFormString Form parameter enum test (string)
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public void testEnumParameters(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble) throws IOException {
- testEnumParametersForHttpResponse(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
+ public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws IOException {
+ testEnumParametersForHttpResponse(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
}
/**
@@ -593,7 +712,7 @@ public class FakeApi {
testEnumParametersForHttpResponse(params);
}
- public HttpResponse testEnumParametersForHttpResponse(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble) throws IOException {
+ public HttpResponse testEnumParametersForHttpResponse(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws IOException {
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake");
if (enumQueryStringArray != null) {
@@ -626,6 +745,16 @@ public class FakeApi {
} else {
uriBuilder = uriBuilder.queryParam(key, value);
}
+ } if (enumQueryDouble != null) {
+ String key = "enum_query_double";
+ Object value = enumQueryDouble;
+ if (value instanceof Collection) {
+ uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray());
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
}
String url = uriBuilder.build().toString();
@@ -667,61 +796,59 @@ public class FakeApi {
/**
* test inline additionalProperties
- *
*
200 - successful operation
- * @param param request body
+ * @param requestBody request body
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public void testInlineAdditionalProperties(Object param) throws IOException {
- testInlineAdditionalPropertiesForHttpResponse(param);
+ public void testInlineAdditionalProperties(String requestBody) throws IOException {
+ testInlineAdditionalPropertiesForHttpResponse(requestBody);
}
/**
* test inline additionalProperties
- *
*
200 - successful operation
- * @param param request body
+ * @param requestBody request body
* @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public void testInlineAdditionalProperties(Object param, Map params) throws IOException {
- testInlineAdditionalPropertiesForHttpResponse(param, params);
+ public void testInlineAdditionalProperties(String requestBody, Map params) throws IOException {
+ testInlineAdditionalPropertiesForHttpResponse(requestBody, params);
}
- public HttpResponse testInlineAdditionalPropertiesForHttpResponse(Object param) throws IOException {
- // verify the required parameter 'param' is set
- if (param == null) {
- throw new IllegalArgumentException("Missing the required parameter 'param' when calling testInlineAdditionalProperties");
+ public HttpResponse testInlineAdditionalPropertiesForHttpResponse(String requestBody) throws IOException {
+ // verify the required parameter 'requestBody' is set
+ if (requestBody == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/inline-additionalProperties");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(param);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(requestBody);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
- public HttpResponse testInlineAdditionalPropertiesForHttpResponse(java.io.InputStream param, String mediaType) throws IOException {
- // verify the required parameter 'param' is set
- if (param == null) {
- throw new IllegalArgumentException("Missing the required parameter 'param' when calling testInlineAdditionalProperties");
+ public HttpResponse testInlineAdditionalPropertiesForHttpResponse(java.io.InputStream requestBody, String mediaType) throws IOException {
+ // verify the required parameter 'requestBody' is set
+ if (requestBody == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/inline-additionalProperties");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = param == null ?
+ HttpContent content = requestBody == null ?
apiClient.new JacksonJsonHttpContent(null) :
- new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, param);
+ new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, requestBody);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
- public HttpResponse testInlineAdditionalPropertiesForHttpResponse(Object param, Map params) throws IOException {
- // verify the required parameter 'param' is set
- if (param == null) {
- throw new IllegalArgumentException("Missing the required parameter 'param' when calling testInlineAdditionalProperties");
+ public HttpResponse testInlineAdditionalPropertiesForHttpResponse(String requestBody, Map params) throws IOException {
+ // verify the required parameter 'requestBody' is set
+ if (requestBody == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/inline-additionalProperties");
@@ -746,14 +873,13 @@ public class FakeApi {
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(param);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(requestBody);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
/**
* test json serialization of form data
- *
*
200 - successful operation
* @param param field1
* @param param2 field2
@@ -765,7 +891,6 @@ public class FakeApi {
/**
* test json serialization of form data
- *
*
200 - successful operation
* @param param field1
* @param param2 field2
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java
index a0fa9bdbb35..fb186b6e564 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java
@@ -44,12 +44,12 @@ public class FakeClassnameTags123Api {
* To test class name in snake case
* To test class name in snake case
*
200 - successful operation
- * @param body client model
+ * @param client client model
* @return Client
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public Client testClassname(Client body) throws IOException {
- HttpResponse response = testClassnameForHttpResponse(body);
+ public Client testClassname(Client client) throws IOException {
+ HttpResponse response = testClassnameForHttpResponse(client);
TypeReference typeRef = new TypeReference() {};
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
}
@@ -58,51 +58,51 @@ public class FakeClassnameTags123Api {
* To test class name in snake case
* To test class name in snake case
*
200 - successful operation
- * @param body client model
+ * @param client client model
* @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
* @return Client
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public Client testClassname(Client body, Map params) throws IOException {
- HttpResponse response = testClassnameForHttpResponse(body, params);
+ public Client testClassname(Client client, Map params) throws IOException {
+ HttpResponse response = testClassnameForHttpResponse(client, params);
TypeReference typeRef = new TypeReference() {};
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
}
- public HttpResponse testClassnameForHttpResponse(Client body) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling testClassname");
+ public HttpResponse testClassnameForHttpResponse(Client client) throws IOException {
+ // verify the required parameter 'client' is set
+ if (client == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'client' when calling testClassname");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake_classname_test");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(client);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PATCH, genericUrl, content).execute();
}
- public HttpResponse testClassnameForHttpResponse(java.io.InputStream body, String mediaType) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling testClassname");
+ public HttpResponse testClassnameForHttpResponse(java.io.InputStream client, String mediaType) throws IOException {
+ // verify the required parameter 'client' is set
+ if (client == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'client' when calling testClassname");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake_classname_test");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = body == null ?
+ HttpContent content = client == null ?
apiClient.new JacksonJsonHttpContent(null) :
- new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, body);
+ new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, client);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PATCH, genericUrl, content).execute();
}
- public HttpResponse testClassnameForHttpResponse(Client body, Map params) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling testClassname");
+ public HttpResponse testClassnameForHttpResponse(Client client, Map params) throws IOException {
+ // verify the required parameter 'client' is set
+ if (client == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'client' when calling testClassname");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake_classname_test");
@@ -127,7 +127,7 @@ public class FakeClassnameTags123Api {
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(client);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PATCH, genericUrl, content).execute();
}
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/PetApi.java
index bf870700694..086f3fb6fec 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/PetApi.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/PetApi.java
@@ -44,61 +44,59 @@ public class PetApi {
/**
* Add a new pet to the store
- *
*
405 - Invalid input
- * @param body Pet object that needs to be added to the store
+ * @param pet Pet object that needs to be added to the store
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public void addPet(Pet body) throws IOException {
- addPetForHttpResponse(body);
+ public void addPet(Pet pet) throws IOException {
+ addPetForHttpResponse(pet);
}
/**
* Add a new pet to the store
- *
*
405 - Invalid input
- * @param body Pet object that needs to be added to the store
+ * @param pet Pet object that needs to be added to the store
* @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public void addPet(Pet body, Map params) throws IOException {
- addPetForHttpResponse(body, params);
+ public void addPet(Pet pet, Map params) throws IOException {
+ addPetForHttpResponse(pet, params);
}
- public HttpResponse addPetForHttpResponse(Pet body) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling addPet");
+ public HttpResponse addPetForHttpResponse(Pet pet) throws IOException {
+ // verify the required parameter 'pet' is set
+ if (pet == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'pet' when calling addPet");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(pet);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
- public HttpResponse addPetForHttpResponse(java.io.InputStream body, String mediaType) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling addPet");
+ public HttpResponse addPetForHttpResponse(java.io.InputStream pet, String mediaType) throws IOException {
+ // verify the required parameter 'pet' is set
+ if (pet == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'pet' when calling addPet");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = body == null ?
+ HttpContent content = pet == null ?
apiClient.new JacksonJsonHttpContent(null) :
- new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, body);
+ new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, pet);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
- public HttpResponse addPetForHttpResponse(Pet body, Map params) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling addPet");
+ public HttpResponse addPetForHttpResponse(Pet pet, Map params) throws IOException {
+ // verify the required parameter 'pet' is set
+ if (pet == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'pet' when calling addPet");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet");
@@ -123,14 +121,13 @@ public class PetApi {
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(pet);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
/**
* Deletes a pet
- *
*
400 - Invalid pet value
* @param petId Pet id to delete
* @param apiKey The apiKey parameter
@@ -142,7 +139,6 @@ public class PetApi {
/**
* Deletes a pet
- *
*
400 - Invalid pet value
* @param petId Pet id to delete
* @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
@@ -475,65 +471,63 @@ public class PetApi {
/**
* Update an existing pet
- *
*
400 - Invalid ID supplied
*
404 - Pet not found
*
405 - Validation exception
- * @param body Pet object that needs to be added to the store
+ * @param pet Pet object that needs to be added to the store
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public void updatePet(Pet body) throws IOException {
- updatePetForHttpResponse(body);
+ public void updatePet(Pet pet) throws IOException {
+ updatePetForHttpResponse(pet);
}
/**
* Update an existing pet
- *
*
400 - Invalid ID supplied
*
404 - Pet not found
*
405 - Validation exception
- * @param body Pet object that needs to be added to the store
+ * @param pet Pet object that needs to be added to the store
* @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public void updatePet(Pet body, Map params) throws IOException {
- updatePetForHttpResponse(body, params);
+ public void updatePet(Pet pet, Map params) throws IOException {
+ updatePetForHttpResponse(pet, params);
}
- public HttpResponse updatePetForHttpResponse(Pet body) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling updatePet");
+ public HttpResponse updatePetForHttpResponse(Pet pet) throws IOException {
+ // verify the required parameter 'pet' is set
+ if (pet == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'pet' when calling updatePet");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(pet);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PUT, genericUrl, content).execute();
}
- public HttpResponse updatePetForHttpResponse(java.io.InputStream body, String mediaType) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling updatePet");
+ public HttpResponse updatePetForHttpResponse(java.io.InputStream pet, String mediaType) throws IOException {
+ // verify the required parameter 'pet' is set
+ if (pet == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'pet' when calling updatePet");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = body == null ?
+ HttpContent content = pet == null ?
apiClient.new JacksonJsonHttpContent(null) :
- new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, body);
+ new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, pet);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PUT, genericUrl, content).execute();
}
- public HttpResponse updatePetForHttpResponse(Pet body, Map params) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling updatePet");
+ public HttpResponse updatePetForHttpResponse(Pet pet, Map params) throws IOException {
+ // verify the required parameter 'pet' is set
+ if (pet == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'pet' when calling updatePet");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet");
@@ -558,14 +552,13 @@ public class PetApi {
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(pet);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PUT, genericUrl, content).execute();
}
/**
* Updates a pet in the store with form data
- *
*
405 - Invalid input
* @param petId ID of pet that needs to be updated
* @param name Updated name of the pet
@@ -578,7 +571,6 @@ public class PetApi {
/**
* Updates a pet in the store with form data
- *
*
405 - Invalid input
* @param petId ID of pet that needs to be updated
* @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
@@ -643,7 +635,6 @@ public class PetApi {
/**
* uploads an image
- *
*
200 - successful operation
* @param petId ID of pet to update
* @param additionalMetadata Additional data to pass to server
@@ -659,7 +650,6 @@ public class PetApi {
/**
* uploads an image
- *
*
200 - successful operation
* @param petId ID of pet to update
* @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/StoreApi.java
index dc407a874f1..3294d9295d3 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/StoreApi.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/StoreApi.java
@@ -274,69 +274,67 @@ public class StoreApi {
/**
* Place an order for a pet
- *
*
200 - successful operation
*
400 - Invalid Order
- * @param body order placed for purchasing the pet
+ * @param order order placed for purchasing the pet
* @return Order
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public Order placeOrder(Order body) throws IOException {
- HttpResponse response = placeOrderForHttpResponse(body);
+ public Order placeOrder(Order order) throws IOException {
+ HttpResponse response = placeOrderForHttpResponse(order);
TypeReference typeRef = new TypeReference() {};
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
}
/**
* Place an order for a pet
- *
*
200 - successful operation
*
400 - Invalid Order
- * @param body order placed for purchasing the pet
+ * @param order order placed for purchasing the pet
* @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
* @return Order
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public Order placeOrder(Order body, Map params) throws IOException {
- HttpResponse response = placeOrderForHttpResponse(body, params);
+ public Order placeOrder(Order order, Map params) throws IOException {
+ HttpResponse response = placeOrderForHttpResponse(order, params);
TypeReference typeRef = new TypeReference() {};
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
}
- public HttpResponse placeOrderForHttpResponse(Order body) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling placeOrder");
+ public HttpResponse placeOrderForHttpResponse(Order order) throws IOException {
+ // verify the required parameter 'order' is set
+ if (order == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'order' when calling placeOrder");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/store/order");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(order);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
- public HttpResponse placeOrderForHttpResponse(java.io.InputStream body, String mediaType) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling placeOrder");
+ public HttpResponse placeOrderForHttpResponse(java.io.InputStream order, String mediaType) throws IOException {
+ // verify the required parameter 'order' is set
+ if (order == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'order' when calling placeOrder");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/store/order");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = body == null ?
+ HttpContent content = order == null ?
apiClient.new JacksonJsonHttpContent(null) :
- new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, body);
+ new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, order);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
- public HttpResponse placeOrderForHttpResponse(Order body, Map params) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling placeOrder");
+ public HttpResponse placeOrderForHttpResponse(Order order, Map params) throws IOException {
+ // verify the required parameter 'order' is set
+ if (order == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'order' when calling placeOrder");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/store/order");
@@ -361,7 +359,7 @@ public class StoreApi {
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(order);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/UserApi.java
index c45c1374514..56cce7ba571 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/UserApi.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/UserApi.java
@@ -44,59 +44,59 @@ public class UserApi {
* Create user
* This can only be done by the logged in user.
*
0 - successful operation
- * @param body Created user object
+ * @param user Created user object
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public void createUser(User body) throws IOException {
- createUserForHttpResponse(body);
+ public void createUser(User user) throws IOException {
+ createUserForHttpResponse(user);
}
/**
* Create user
* This can only be done by the logged in user.
*
0 - successful operation
- * @param body Created user object
+ * @param user Created user object
* @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public void createUser(User body, Map params) throws IOException {
- createUserForHttpResponse(body, params);
+ public void createUser(User user, Map params) throws IOException {
+ createUserForHttpResponse(user, params);
}
- public HttpResponse createUserForHttpResponse(User body) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling createUser");
+ public HttpResponse createUserForHttpResponse(User user) throws IOException {
+ // verify the required parameter 'user' is set
+ if (user == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'user' when calling createUser");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(user);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
- public HttpResponse createUserForHttpResponse(java.io.InputStream body, String mediaType) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling createUser");
+ public HttpResponse createUserForHttpResponse(java.io.InputStream user, String mediaType) throws IOException {
+ // verify the required parameter 'user' is set
+ if (user == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'user' when calling createUser");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = body == null ?
+ HttpContent content = user == null ?
apiClient.new JacksonJsonHttpContent(null) :
- new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, body);
+ new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, user);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
- public HttpResponse createUserForHttpResponse(User body, Map params) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling createUser");
+ public HttpResponse createUserForHttpResponse(User user, Map params) throws IOException {
+ // verify the required parameter 'user' is set
+ if (user == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'user' when calling createUser");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user");
@@ -121,68 +121,66 @@ public class UserApi {
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(user);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
/**
* Creates list of users with given input array
- *
*
0 - successful operation
- * @param body List of user object
+ * @param user List of user object
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public void createUsersWithArrayInput(List body) throws IOException {
- createUsersWithArrayInputForHttpResponse(body);
+ public void createUsersWithArrayInput(List user) throws IOException {
+ createUsersWithArrayInputForHttpResponse(user);
}
/**
* Creates list of users with given input array
- *
*
0 - successful operation
- * @param body List of user object
+ * @param user List of user object
* @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public void createUsersWithArrayInput(List body, Map params) throws IOException {
- createUsersWithArrayInputForHttpResponse(body, params);
+ public void createUsersWithArrayInput(List user, Map params) throws IOException {
+ createUsersWithArrayInputForHttpResponse(user, params);
}
- public HttpResponse createUsersWithArrayInputForHttpResponse(List body) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling createUsersWithArrayInput");
+ public HttpResponse createUsersWithArrayInputForHttpResponse(List user) throws IOException {
+ // verify the required parameter 'user' is set
+ if (user == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'user' when calling createUsersWithArrayInput");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user/createWithArray");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(user);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
- public HttpResponse createUsersWithArrayInputForHttpResponse(java.io.InputStream body, String mediaType) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling createUsersWithArrayInput");
+ public HttpResponse createUsersWithArrayInputForHttpResponse(java.io.InputStream user, String mediaType) throws IOException {
+ // verify the required parameter 'user' is set
+ if (user == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'user' when calling createUsersWithArrayInput");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user/createWithArray");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = body == null ?
+ HttpContent content = user == null ?
apiClient.new JacksonJsonHttpContent(null) :
- new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, body);
+ new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, user);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
- public HttpResponse createUsersWithArrayInputForHttpResponse(List body, Map params) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling createUsersWithArrayInput");
+ public HttpResponse createUsersWithArrayInputForHttpResponse(List user, Map params) throws IOException {
+ // verify the required parameter 'user' is set
+ if (user == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'user' when calling createUsersWithArrayInput");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user/createWithArray");
@@ -207,68 +205,66 @@ public class UserApi {
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(user);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
/**
* Creates list of users with given input array
- *
*
0 - successful operation
- * @param body List of user object
+ * @param user List of user object
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public void createUsersWithListInput(List body) throws IOException {
- createUsersWithListInputForHttpResponse(body);
+ public void createUsersWithListInput(List user) throws IOException {
+ createUsersWithListInputForHttpResponse(user);
}
/**
* Creates list of users with given input array
- *
*
0 - successful operation
- * @param body List of user object
+ * @param user List of user object
* @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public void createUsersWithListInput(List body, Map params) throws IOException {
- createUsersWithListInputForHttpResponse(body, params);
+ public void createUsersWithListInput(List user, Map params) throws IOException {
+ createUsersWithListInputForHttpResponse(user, params);
}
- public HttpResponse createUsersWithListInputForHttpResponse(List body) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling createUsersWithListInput");
+ public HttpResponse createUsersWithListInputForHttpResponse(List user) throws IOException {
+ // verify the required parameter 'user' is set
+ if (user == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'user' when calling createUsersWithListInput");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user/createWithList");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(user);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
- public HttpResponse createUsersWithListInputForHttpResponse(java.io.InputStream body, String mediaType) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling createUsersWithListInput");
+ public HttpResponse createUsersWithListInputForHttpResponse(java.io.InputStream user, String mediaType) throws IOException {
+ // verify the required parameter 'user' is set
+ if (user == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'user' when calling createUsersWithListInput");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user/createWithList");
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = body == null ?
+ HttpContent content = user == null ?
apiClient.new JacksonJsonHttpContent(null) :
- new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, body);
+ new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, user);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
- public HttpResponse createUsersWithListInputForHttpResponse(List body, Map params) throws IOException {
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling createUsersWithListInput");
+ public HttpResponse createUsersWithListInputForHttpResponse(List user, Map params) throws IOException {
+ // verify the required parameter 'user' is set
+ if (user == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'user' when calling createUsersWithListInput");
}
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user/createWithList");
@@ -293,7 +289,7 @@ public class UserApi {
String url = uriBuilder.build().toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(user);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
}
@@ -378,7 +374,6 @@ public class UserApi {
/**
* Get user by user name
- *
*
200 - successful operation
*
400 - Invalid username supplied
*
404 - User not found
@@ -394,7 +389,6 @@ public class UserApi {
/**
* Get user by user name
- *
*
200 - successful operation
*
400 - Invalid username supplied
*
404 - User not found
@@ -464,7 +458,6 @@ public class UserApi {
/**
* Logs user into the system
- *
*
200 - successful operation
*
400 - Invalid username/password supplied
* @param username The user name for login
@@ -480,7 +473,6 @@ public class UserApi {
/**
* Logs user into the system
- *
*
200 - successful operation
*
400 - Invalid username/password supplied
* @param username The user name for login
@@ -575,7 +567,6 @@ public class UserApi {
/**
* Logs out current logged in user session
- *
*
0 - successful operation
* @throws IOException if an error occurs while attempting to invoke the API
**/
@@ -585,7 +576,6 @@ public class UserApi {
/**
* Logs out current logged in user session
- *
*
0 - successful operation
* @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
* @throws IOException if an error occurs while attempting to invoke the API
@@ -641,11 +631,11 @@ public class UserApi {
*
400 - Invalid user supplied
*
404 - User not found
* @param username name that need to be deleted
- * @param body Updated user object
+ * @param user Updated user object
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public void updateUser(String username, User body) throws IOException {
- updateUserForHttpResponse(username, body);
+ public void updateUser(String username, User user) throws IOException {
+ updateUserForHttpResponse(username, user);
}
/**
@@ -654,21 +644,21 @@ public class UserApi {
*
400 - Invalid user supplied
*
404 - User not found
* @param username name that need to be deleted
- * @param body Updated user object
+ * @param user Updated user object
* @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
* @throws IOException if an error occurs while attempting to invoke the API
**/
- public void updateUser(String username, User body, Map params) throws IOException {
- updateUserForHttpResponse(username, body, params);
+ public void updateUser(String username, User user, Map params) throws IOException {
+ updateUserForHttpResponse(username, user, params);
}
- public HttpResponse updateUserForHttpResponse(String username, User body) throws IOException {
+ public HttpResponse updateUserForHttpResponse(String username, User user) throws IOException {
// verify the required parameter 'username' is set
if (username == null) {
throw new IllegalArgumentException("Missing the required parameter 'username' when calling updateUser");
- }// verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling updateUser");
+ }// verify the required parameter 'user' is set
+ if (user == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'user' when calling updateUser");
}
// create a map of path variables
final Map uriVariables = new HashMap();
@@ -678,17 +668,17 @@ public class UserApi {
String url = uriBuilder.buildFromMap(uriVariables).toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(user);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PUT, genericUrl, content).execute();
}
- public HttpResponse updateUserForHttpResponse(String username, java.io.InputStream body, String mediaType) throws IOException {
+ public HttpResponse updateUserForHttpResponse(String username, java.io.InputStream user, String mediaType) throws IOException {
// verify the required parameter 'username' is set
if (username == null) {
throw new IllegalArgumentException("Missing the required parameter 'username' when calling updateUser");
- }// verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling updateUser");
+ }// verify the required parameter 'user' is set
+ if (user == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'user' when calling updateUser");
}
// create a map of path variables
final Map uriVariables = new HashMap();
@@ -698,19 +688,19 @@ public class UserApi {
String url = uriBuilder.buildFromMap(uriVariables).toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = body == null ?
+ HttpContent content = user == null ?
apiClient.new JacksonJsonHttpContent(null) :
- new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, body);
+ new InputStreamContent(mediaType == null ? Json.MEDIA_TYPE : mediaType, user);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PUT, genericUrl, content).execute();
}
- public HttpResponse updateUserForHttpResponse(String username, User body, Map params) throws IOException {
+ public HttpResponse updateUserForHttpResponse(String username, User user, Map params) throws IOException {
// verify the required parameter 'username' is set
if (username == null) {
throw new IllegalArgumentException("Missing the required parameter 'username' when calling updateUser");
- }// verify the required parameter 'body' is set
- if (body == null) {
- throw new IllegalArgumentException("Missing the required parameter 'body' when calling updateUser");
+ }// verify the required parameter 'user' is set
+ if (user == null) {
+ throw new IllegalArgumentException("Missing the required parameter 'user' when calling updateUser");
}
// create a map of path variables
final Map uriVariables = new HashMap();
@@ -738,7 +728,7 @@ public class UserApi {
String url = uriBuilder.buildFromMap(uriVariables).toString();
GenericUrl genericUrl = new GenericUrl(url);
- HttpContent content = apiClient.new JacksonJsonHttpContent(body);
+ HttpContent content = apiClient.new JacksonJsonHttpContent(user);
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PUT, genericUrl, content).execute();
}
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/EnumTest.java
index 193d7f101db..2bb7dd17d43 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/EnumTest.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/EnumTest.java
@@ -67,6 +67,46 @@ public class EnumTest {
@JsonProperty("enum_string")
private EnumStringEnum enumString = null;
+ /**
+ * Gets or Sets enumStringRequired
+ */
+ public enum EnumStringRequiredEnum {
+ UPPER("UPPER"),
+
+ LOWER("lower"),
+
+ EMPTY("");
+
+ private String value;
+
+ EnumStringRequiredEnum(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static EnumStringRequiredEnum fromValue(String text) {
+ for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) {
+ if (String.valueOf(b.value).equals(text)) {
+ return b;
+ }
+ }
+ return null;
+ }
+ }
+
+ @JsonProperty("enum_string_required")
+ private EnumStringRequiredEnum enumStringRequired = null;
+
/**
* Gets or Sets enumInteger
*/
@@ -164,6 +204,24 @@ public class EnumTest {
this.enumString = enumString;
}
+ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) {
+ this.enumStringRequired = enumStringRequired;
+ return this;
+ }
+
+ /**
+ * Get enumStringRequired
+ * @return enumStringRequired
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public EnumStringRequiredEnum getEnumStringRequired() {
+ return enumStringRequired;
+ }
+
+ public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) {
+ this.enumStringRequired = enumStringRequired;
+ }
+
public EnumTest enumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger;
return this;
@@ -229,6 +287,7 @@ public class EnumTest {
}
EnumTest enumTest = (EnumTest) o;
return Objects.equals(this.enumString, enumTest.enumString) &&
+ Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) &&
Objects.equals(this.enumInteger, enumTest.enumInteger) &&
Objects.equals(this.enumNumber, enumTest.enumNumber) &&
Objects.equals(this.outerEnum, enumTest.outerEnum);
@@ -236,7 +295,7 @@ public class EnumTest {
@Override
public int hashCode() {
- return Objects.hash(enumString, enumInteger, enumNumber, outerEnum);
+ return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum);
}
@@ -246,6 +305,7 @@ public class EnumTest {
sb.append("class EnumTest {\n");
sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n");
+ sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n");
sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n");
sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n");
sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n");
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/FormatTest.java
index 67879022f96..5f601300b95 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/FormatTest.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/FormatTest.java
@@ -20,6 +20,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
+import java.io.File;
import java.math.BigDecimal;
import java.util.UUID;
import org.threeten.bp.LocalDate;
@@ -55,7 +56,7 @@ public class FormatTest {
private byte[] _byte = null;
@JsonProperty("binary")
- private byte[] binary = null;
+ private File binary = null;
@JsonProperty("date")
private LocalDate date = null;
@@ -223,7 +224,7 @@ public class FormatTest {
this._byte = _byte;
}
- public FormatTest binary(byte[] binary) {
+ public FormatTest binary(File binary) {
this.binary = binary;
return this;
}
@@ -233,11 +234,11 @@ public class FormatTest {
* @return binary
**/
@ApiModelProperty(value = "")
- public byte[] getBinary() {
+ public File getBinary() {
return binary;
}
- public void setBinary(byte[] binary) {
+ public void setBinary(File binary) {
this.binary = binary;
}
@@ -331,7 +332,7 @@ public class FormatTest {
Objects.equals(this._double, formatTest._double) &&
Objects.equals(this.string, formatTest.string) &&
Arrays.equals(this._byte, formatTest._byte) &&
- Arrays.equals(this.binary, formatTest.binary) &&
+ Objects.equals(this.binary, formatTest.binary) &&
Objects.equals(this.date, formatTest.date) &&
Objects.equals(this.dateTime, formatTest.dateTime) &&
Objects.equals(this.uuid, formatTest.uuid) &&
@@ -340,7 +341,7 @@ public class FormatTest {
@Override
public int hashCode() {
- return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), Arrays.hashCode(binary), date, dateTime, uuid, password);
+ return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password);
}
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Model200Response.java
index 38fb1481a3d..46fb5650ff0 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Model200Response.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Model200Response.java
@@ -78,9 +78,9 @@ public class Model200Response {
if (o == null || getClass() != o.getClass()) {
return false;
}
- Model200Response _200Response = (Model200Response) o;
- return Objects.equals(this.name, _200Response.name) &&
- Objects.equals(this.propertyClass, _200Response.propertyClass);
+ Model200Response _200response = (Model200Response) o;
+ return Objects.equals(this.name, _200response.name) &&
+ Objects.equals(this.propertyClass, _200response.propertyClass);
}
@Override
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Name.java
index a62db5e76e6..e12c1072478 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Name.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Name.java
@@ -37,7 +37,7 @@ public class Name {
private String property = null;
@JsonProperty("123Number")
- private Integer _123Number = null;
+ private Integer _123number = null;
public Name name(Integer name) {
this.name = name;
@@ -85,12 +85,12 @@ public class Name {
}
/**
- * Get _123Number
- * @return _123Number
+ * Get _123number
+ * @return _123number
**/
@ApiModelProperty(value = "")
- public Integer get123Number() {
- return _123Number;
+ public Integer get123number() {
+ return _123number;
}
@@ -106,12 +106,12 @@ public class Name {
return Objects.equals(this.name, name.name) &&
Objects.equals(this.snakeCase, name.snakeCase) &&
Objects.equals(this.property, name.property) &&
- Objects.equals(this._123Number, name._123Number);
+ Objects.equals(this._123number, name._123number);
}
@Override
public int hashCode() {
- return Objects.hash(name, snakeCase, property, _123Number);
+ return Objects.hash(name, snakeCase, property, _123number);
}
@@ -123,7 +123,7 @@ public class Name {
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n");
sb.append(" property: ").append(toIndentedString(property)).append("\n");
- sb.append(" _123Number: ").append(toIndentedString(_123Number)).append("\n");
+ sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n");
sb.append("}");
return sb.toString();
}
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/OuterBoolean.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/OuterBoolean.java
new file mode 100644
index 00000000000..78bfcb1442a
--- /dev/null
+++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/OuterBoolean.java
@@ -0,0 +1,63 @@
+/*
+ * Swagger Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * 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.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+
+/**
+ * OuterBoolean
+ */
+
+public class OuterBoolean {
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash();
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OuterBoolean {\n");
+
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/OuterNumber.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/OuterNumber.java
new file mode 100644
index 00000000000..d775aa68499
--- /dev/null
+++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/OuterNumber.java
@@ -0,0 +1,63 @@
+/*
+ * Swagger Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * 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.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+
+/**
+ * OuterNumber
+ */
+
+public class OuterNumber {
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash();
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OuterNumber {\n");
+
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/OuterString.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/OuterString.java
new file mode 100644
index 00000000000..fa2539d33de
--- /dev/null
+++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/OuterString.java
@@ -0,0 +1,63 @@
+/*
+ * Swagger Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * 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.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+
+/**
+ * OuterString
+ */
+
+public class OuterString {
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash();
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OuterString {\n");
+
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/SpecialModelName.java
index 209b4263f7e..3676b70365a 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/SpecialModelName.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/SpecialModelName.java
@@ -27,24 +27,24 @@ import io.swagger.annotations.ApiModelProperty;
public class SpecialModelName {
@JsonProperty("$special[property.name]")
- private Long specialPropertyName = null;
+ private Long $specialPropertyName = null;
- public SpecialModelName specialPropertyName(Long specialPropertyName) {
- this.specialPropertyName = specialPropertyName;
+ public SpecialModelName $specialPropertyName(Long $specialPropertyName) {
+ this.$specialPropertyName = $specialPropertyName;
return this;
}
/**
- * Get specialPropertyName
- * @return specialPropertyName
+ * Get $specialPropertyName
+ * @return $specialPropertyName
**/
@ApiModelProperty(value = "")
- public Long getSpecialPropertyName() {
- return specialPropertyName;
+ public Long get$SpecialPropertyName() {
+ return $specialPropertyName;
}
- public void setSpecialPropertyName(Long specialPropertyName) {
- this.specialPropertyName = specialPropertyName;
+ public void set$SpecialPropertyName(Long $specialPropertyName) {
+ this.$specialPropertyName = $specialPropertyName;
}
@@ -56,13 +56,13 @@ public class SpecialModelName {
if (o == null || getClass() != o.getClass()) {
return false;
}
- SpecialModelName specialModelName = (SpecialModelName) o;
- return Objects.equals(this.specialPropertyName, specialModelName.specialPropertyName);
+ SpecialModelName $specialModelName = (SpecialModelName) o;
+ return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName);
}
@Override
public int hashCode() {
- return Objects.hash(specialPropertyName);
+ return Objects.hash($specialPropertyName);
}
@@ -71,7 +71,7 @@ public class SpecialModelName {
StringBuilder sb = new StringBuilder();
sb.append("class SpecialModelName {\n");
- sb.append(" specialPropertyName: ").append(toIndentedString(specialPropertyName)).append("\n");
+ sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n");
sb.append("}");
return sb.toString();
}
diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/AnotherFakeApiTest.java
index 109ff063df5..5c506a31879 100644
--- a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/AnotherFakeApiTest.java
+++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/AnotherFakeApiTest.java
@@ -42,8 +42,8 @@ public class AnotherFakeApiTest {
*/
@Test
public void testSpecialTagsTest() throws IOException {
- Client body = null;
- Client response = api.testSpecialTags(body);
+ Client client = null;
+ Client response = api.testSpecialTags(client);
// TODO: test validations
}
diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/FakeApiTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/FakeApiTest.java
index 55ae5bb2a13..d068c43fe0c 100644
--- a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/FakeApiTest.java
+++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/FakeApiTest.java
@@ -15,9 +15,11 @@ package io.swagger.client.api;
import java.math.BigDecimal;
import io.swagger.client.model.Client;
+import java.io.File;
import org.threeten.bp.LocalDate;
import org.threeten.bp.OffsetDateTime;
import io.swagger.client.model.OuterComposite;
+import io.swagger.client.model.User;
import org.junit.Test;
import org.junit.Ignore;
@@ -46,8 +48,8 @@ public class FakeApiTest {
*/
@Test
public void fakeOuterBooleanSerializeTest() throws IOException {
- Boolean body = null;
- Boolean response = api.fakeOuterBooleanSerialize(body);
+ Boolean booleanPostBody = null;
+ Boolean response = api.fakeOuterBooleanSerialize(booleanPostBody);
// TODO: test validations
}
@@ -62,8 +64,8 @@ public class FakeApiTest {
*/
@Test
public void fakeOuterCompositeSerializeTest() throws IOException {
- OuterComposite body = null;
- OuterComposite response = api.fakeOuterCompositeSerialize(body);
+ OuterComposite outerComposite = null;
+ OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite);
// TODO: test validations
}
@@ -100,6 +102,23 @@ public class FakeApiTest {
// TODO: test validations
}
+ /**
+ *
+ *
+ *
+ *
+ * @throws IOException
+ * if the Api call fails
+ */
+ @Test
+ public void testBodyWithQueryParamsTest() throws IOException {
+ String query = null;
+ User user = null;
+ api.testBodyWithQueryParams(query, user);
+
+ // TODO: test validations
+ }
+
/**
* To test \"client\" model
*
@@ -110,8 +129,8 @@ public class FakeApiTest {
*/
@Test
public void testClientModelTest() throws IOException {
- Client body = null;
- Client response = api.testClientModel(body);
+ Client client = null;
+ Client response = api.testClientModel(client);
// TODO: test validations
}
@@ -135,7 +154,7 @@ public class FakeApiTest {
Long int64 = null;
Float _float = null;
String string = null;
- byte[] binary = null;
+ File binary = null;
LocalDate date = null;
OffsetDateTime dateTime = null;
String password = null;
@@ -155,15 +174,15 @@ public class FakeApiTest {
*/
@Test
public void testEnumParametersTest() throws IOException {
- List enumFormStringArray = null;
- String enumFormString = null;
List enumHeaderStringArray = null;
String enumHeaderString = null;
List enumQueryStringArray = null;
String enumQueryString = null;
Integer enumQueryInteger = null;
Double enumQueryDouble = null;
- api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
+ List enumFormStringArray = null;
+ String enumFormString = null;
+ api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
// TODO: test validations
}
@@ -178,8 +197,8 @@ public class FakeApiTest {
*/
@Test
public void testInlineAdditionalPropertiesTest() throws IOException {
- Object param = null;
- api.testInlineAdditionalProperties(param);
+ String requestBody = null;
+ api.testInlineAdditionalProperties(requestBody);
// TODO: test validations
}
diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java
index 9564580b31b..11af1751598 100644
--- a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java
+++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java
@@ -35,15 +35,15 @@ public class FakeClassnameTags123ApiTest {
/**
* To test class name in snake case
*
- *
+ * To test class name in snake case
*
* @throws IOException
* if the Api call fails
*/
@Test
public void testClassnameTest() throws IOException {
- Client body = null;
- Client response = api.testClassname(body);
+ Client client = null;
+ Client response = api.testClassname(client);
// TODO: test validations
}
diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/PetApiTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/PetApiTest.java
index 4547bcb8576..fa5e91d042a 100644
--- a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/PetApiTest.java
+++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/PetApiTest.java
@@ -44,8 +44,8 @@ public class PetApiTest {
*/
@Test
public void addPetTest() throws IOException {
- Pet body = null;
- api.addPet(body);
+ Pet pet = null;
+ api.addPet(pet);
// TODO: test validations
}
@@ -125,8 +125,8 @@ public class PetApiTest {
*/
@Test
public void updatePetTest() throws IOException {
- Pet body = null;
- api.updatePet(body);
+ Pet pet = null;
+ api.updatePet(pet);
// TODO: test validations
}
diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/StoreApiTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/StoreApiTest.java
index 927e3693a09..edf04387009 100644
--- a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/StoreApiTest.java
+++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/StoreApiTest.java
@@ -89,8 +89,8 @@ public class StoreApiTest {
*/
@Test
public void placeOrderTest() throws IOException {
- Order body = null;
- Order response = api.placeOrder(body);
+ Order order = null;
+ Order response = api.placeOrder(order);
// TODO: test validations
}
diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/UserApiTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/UserApiTest.java
index 6d89cc2a831..d2325171563 100644
--- a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/UserApiTest.java
+++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/api/UserApiTest.java
@@ -42,8 +42,8 @@ public class UserApiTest {
*/
@Test
public void createUserTest() throws IOException {
- User body = null;
- api.createUser(body);
+ User user = null;
+ api.createUser(user);
// TODO: test validations
}
@@ -58,8 +58,8 @@ public class UserApiTest {
*/
@Test
public void createUsersWithArrayInputTest() throws IOException {
- List body = null;
- api.createUsersWithArrayInput(body);
+ List user = null;
+ api.createUsersWithArrayInput(user);
// TODO: test validations
}
@@ -74,8 +74,8 @@ public class UserApiTest {
*/
@Test
public void createUsersWithListInputTest() throws IOException {
- List body = null;
- api.createUsersWithListInput(body);
+ List user = null;
+ api.createUsersWithListInput(user);
// TODO: test validations
}
@@ -155,8 +155,8 @@ public class UserApiTest {
@Test
public void updateUserTest() throws IOException {
String username = null;
- User body = null;
- api.updateUser(username, body);
+ User user = null;
+ api.updateUser(username, user);
// TODO: test validations
}
diff --git a/samples/client/petstore/java/jersey1/.openapi-generator-ignore b/samples/client/petstore/java/jersey1/.openapi-generator-ignore
index c5fa491b4c5..7484ee590a3 100644
--- a/samples/client/petstore/java/jersey1/.openapi-generator-ignore
+++ b/samples/client/petstore/java/jersey1/.openapi-generator-ignore
@@ -1,11 +1,11 @@
-# Swagger Codegen Ignore
-# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# 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:
+# You can make changes and tell OpenAPI Generator 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 (*):
diff --git a/samples/client/petstore/java/jersey1/README.md b/samples/client/petstore/java/jersey1/README.md
index 264fe34c81a..395cdb929ba 100644
--- a/samples/client/petstore/java/jersey1/README.md
+++ b/samples/client/petstore/java/jersey1/README.md
@@ -1,24 +1,35 @@
-# swagger-java-client
+# petstore-java-client-jersey1
+
+Swagger Petstore
+- API version: 1.0.0
+
+This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
+
+*Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen)*
+
## Requirements
-Building the API client library requires [Maven](https://maven.apache.org/) to be installed.
+Building the API client library requires:
+1. Java 1.7+
+2. Maven/Gradle
## Installation
To install the API client library to your local Maven repository, simply execute:
```shell
-mvn install
+mvn clean install
```
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
```shell
-mvn deploy
+mvn clean deploy
```
-Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information.
+Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.
### Maven users
@@ -26,10 +37,10 @@ Add this dependency to your project's POM:
```xml
- io.swagger
- swagger-java-client
- 1.0.0
- compile
+ org.openapitools
+ petstore-java-client-jersey1
+ 1.0.0
+ compile
```
@@ -38,19 +49,21 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:
```groovy
-compile "io.swagger:swagger-java-client:1.0.0"
+compile "org.openapitools:petstore-java-client-jersey1:1.0.0"
```
### Others
At first generate the JAR by executing:
- mvn package
+```shell
+mvn clean package
+```
Then manually install the following JARs:
-* target/swagger-java-client-1.0.0.jar
-* target/lib/*.jar
+* `target/petstore-java-client-jersey1-1.0.0.jar`
+* `target/lib/*.jar`
## Getting Started
@@ -61,32 +74,22 @@ Please follow the [installation](#installation) instruction and execute the foll
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
-import io.swagger.client.api.FakeApi;
+import io.swagger.client.api.AnotherFakeApi;
import java.io.File;
import java.util.*;
-public class FakeApiExample {
+public class AnotherFakeApiExample {
public static void main(String[] args) {
- FakeApi apiInstance = new FakeApi();
- BigDecimal number = new BigDecimal(); // BigDecimal | None
- Double _double = 3.4D; // Double | None
- String string = "string_example"; // String | None
- byte[] _byte = B; // byte[] | None
- Integer integer = 56; // Integer | None
- Integer int32 = 56; // Integer | None
- Long int64 = 789L; // Long | None
- Float _float = 3.4F; // Float | None
- byte[] binary = B; // byte[] | None
- LocalDate date = new LocalDate(); // LocalDate | None
- DateTime dateTime = new DateTime(); // DateTime | None
- String password = "password_example"; // String | None
+ AnotherFakeApi apiInstance = new AnotherFakeApi();
+ Client client = new Client(); // Client | client model
try {
- apiInstance.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
+ Client result = apiInstance.testSpecialTags(client);
+ System.out.println(result);
} catch (ApiException e) {
- System.err.println("Exception when calling FakeApi#testEndpointParameters");
+ System.err.println("Exception when calling AnotherFakeApi#testSpecialTags");
e.printStackTrace();
}
}
@@ -96,12 +99,22 @@ public class FakeApiExample {
## Documentation for API Endpoints
-All URIs are relative to *http://petstore.swagger.io/v2*
+All URIs are relative to *http://petstore.swagger.io:80/v2*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
+*AnotherFakeApi* | [**testSpecialTags**](docs/AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
+*FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
+*FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
+*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
+*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
+*FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
+*FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
-*FakeApi* | [**testEnumQueryParameters**](docs/FakeApi.md#testEnumQueryParameters) | **GET** /fake | To test enum query parameters
+*FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
+*FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
+*FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
+*FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
*PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
*PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
@@ -110,9 +123,9 @@ Class | Method | HTTP request | Description
*PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
*PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
-*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
+*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
*StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
-*StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
+*StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
*UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user
*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
@@ -132,9 +145,13 @@ Class | Method | HTTP request | Description
- [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
- [ArrayTest](docs/ArrayTest.md)
+ - [Capitalization](docs/Capitalization.md)
- [Cat](docs/Cat.md)
- [Category](docs/Category.md)
+ - [ClassModel](docs/ClassModel.md)
+ - [Client](docs/Client.md)
- [Dog](docs/Dog.md)
+ - [EnumArrays](docs/EnumArrays.md)
- [EnumClass](docs/EnumClass.md)
- [EnumTest](docs/EnumTest.md)
- [FormatTest](docs/FormatTest.md)
@@ -147,6 +164,11 @@ Class | Method | HTTP request | Description
- [Name](docs/Name.md)
- [NumberOnly](docs/NumberOnly.md)
- [Order](docs/Order.md)
+ - [OuterBoolean](docs/OuterBoolean.md)
+ - [OuterComposite](docs/OuterComposite.md)
+ - [OuterEnum](docs/OuterEnum.md)
+ - [OuterNumber](docs/OuterNumber.md)
+ - [OuterString](docs/OuterString.md)
- [Pet](docs/Pet.md)
- [ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [SpecialModelName](docs/SpecialModelName.md)
@@ -163,6 +185,16 @@ Authentication schemes defined for the API:
- **API key parameter name**: api_key
- **Location**: HTTP header
+### api_key_query
+
+- **Type**: API key
+- **API key parameter name**: api_key_query
+- **Location**: URL query string
+
+### http_basic_test
+
+- **Type**: HTTP basic authentication
+
### petstore_auth
- **Type**: OAuth
@@ -175,7 +207,7 @@ Authentication schemes defined for the API:
## Recommendation
-It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issue.
+It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.
## Author
diff --git a/samples/client/petstore/java/jersey1/build.gradle b/samples/client/petstore/java/jersey1/build.gradle
index e9643f8935c..92175ba04f8 100644
--- a/samples/client/petstore/java/jersey1/build.gradle
+++ b/samples/client/petstore/java/jersey1/build.gradle
@@ -1,7 +1,7 @@
apply plugin: 'idea'
apply plugin: 'eclipse'
-group = 'io.swagger'
+group = 'org.openapitools'
version = '1.0.0'
buildscript {
@@ -83,7 +83,7 @@ if(hasProperty('target') && target == 'android') {
install {
repositories.mavenInstaller {
- pom.artifactId = 'swagger-java-client'
+ pom.artifactId = 'petstore-java-client-jersey1'
}
}
@@ -109,7 +109,7 @@ dependencies {
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
- compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_version",
+ compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_version"
compile "com.brsanthu:migbase64:2.2"
testCompile "junit:junit:$junit_version"
}
diff --git a/samples/client/petstore/java/jersey1/docs/AnotherFakeApi.md b/samples/client/petstore/java/jersey1/docs/AnotherFakeApi.md
index 7a04619aaba..a4e6f902bf9 100644
--- a/samples/client/petstore/java/jersey1/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/java/jersey1/docs/AnotherFakeApi.md
@@ -9,7 +9,7 @@ Method | HTTP request | Description
# **testSpecialTags**
-> Client testSpecialTags(body)
+> Client testSpecialTags(client)
To test special tags
@@ -23,9 +23,9 @@ To test special tags
AnotherFakeApi apiInstance = new AnotherFakeApi();
-Client body = new Client(); // Client | client model
+Client client = new Client(); // Client | client model
try {
- Client result = apiInstance.testSpecialTags(body);
+ Client result = apiInstance.testSpecialTags(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnotherFakeApi#testSpecialTags");
@@ -37,7 +37,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Client**](Client.md)| client model |
+ **client** | [**Client**](Client.md)| client model |
### Return type
diff --git a/samples/client/petstore/java/jersey1/docs/EnumTest.md b/samples/client/petstore/java/jersey1/docs/EnumTest.md
index 08fee344882..ca048bcc515 100644
--- a/samples/client/petstore/java/jersey1/docs/EnumTest.md
+++ b/samples/client/petstore/java/jersey1/docs/EnumTest.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional]
+**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | |
**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional]
**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional]
**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]
@@ -19,6 +20,15 @@ LOWER | "lower"
EMPTY | ""
+
+## Enum: EnumStringRequiredEnum
+Name | Value
+---- | -----
+UPPER | "UPPER"
+LOWER | "lower"
+EMPTY | ""
+
+
## Enum: EnumIntegerEnum
Name | Value
diff --git a/samples/client/petstore/java/jersey1/docs/FakeApi.md b/samples/client/petstore/java/jersey1/docs/FakeApi.md
index 737ccc28293..cf5414fa9e1 100644
--- a/samples/client/petstore/java/jersey1/docs/FakeApi.md
+++ b/samples/client/petstore/java/jersey1/docs/FakeApi.md
@@ -8,6 +8,7 @@ Method | HTTP request | Description
[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
+[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
@@ -17,7 +18,7 @@ Method | HTTP request | Description
# **fakeOuterBooleanSerialize**
-> Boolean fakeOuterBooleanSerialize(body)
+> Boolean fakeOuterBooleanSerialize(booleanPostBody)
@@ -31,9 +32,9 @@ Test serialization of outer boolean types
FakeApi apiInstance = new FakeApi();
-Boolean body = true; // Boolean | Input boolean as post body
+Boolean booleanPostBody = true; // Boolean | Input boolean as post body
try {
- Boolean result = apiInstance.fakeOuterBooleanSerialize(body);
+ Boolean result = apiInstance.fakeOuterBooleanSerialize(booleanPostBody);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize");
@@ -45,7 +46,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Boolean**](Boolean.md)| Input boolean as post body | [optional]
+ **booleanPostBody** | **Boolean**| Input boolean as post body | [optional]
### Return type
@@ -58,11 +59,11 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: Not defined
+ - **Accept**: */*
# **fakeOuterCompositeSerialize**
-> OuterComposite fakeOuterCompositeSerialize(body)
+> OuterComposite fakeOuterCompositeSerialize(outerComposite)
@@ -76,9 +77,9 @@ Test serialization of object with outer number type
FakeApi apiInstance = new FakeApi();
-OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body
+OuterComposite outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body
try {
- OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body);
+ OuterComposite result = apiInstance.fakeOuterCompositeSerialize(outerComposite);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize");
@@ -90,7 +91,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
+ **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
### Return type
@@ -103,7 +104,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: Not defined
+ - **Accept**: */*
# **fakeOuterNumberSerialize**
@@ -135,7 +136,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**BigDecimal**](BigDecimal.md)| Input number as post body | [optional]
+ **body** | **BigDecimal**| Input number as post body | [optional]
### Return type
@@ -148,7 +149,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: Not defined
+ - **Accept**: */*
# **fakeOuterStringSerialize**
@@ -180,7 +181,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**String**](String.md)| Input string as post body | [optional]
+ **body** | **String**| Input string as post body | [optional]
### Return type
@@ -193,11 +194,55 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
+ - **Accept**: */*
+
+
+# **testBodyWithQueryParams**
+> testBodyWithQueryParams(query, user)
+
+
+
+### Example
+```java
+// Import classes:
+//import io.swagger.client.ApiException;
+//import io.swagger.client.api.FakeApi;
+
+
+FakeApi apiInstance = new FakeApi();
+String query = "query_example"; // String |
+User user = new User(); // User |
+try {
+ apiInstance.testBodyWithQueryParams(query, user);
+} catch (ApiException e) {
+ System.err.println("Exception when calling FakeApi#testBodyWithQueryParams");
+ e.printStackTrace();
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **query** | **String**| |
+ **user** | [**User**](User.md)| |
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
- **Accept**: Not defined
# **testClientModel**
-> Client testClientModel(body)
+> Client testClientModel(client)
To test \"client\" model
@@ -211,9 +256,9 @@ To test \"client\" model
FakeApi apiInstance = new FakeApi();
-Client body = new Client(); // Client | client model
+Client client = new Client(); // Client | client model
try {
- Client result = apiInstance.testClientModel(body);
+ Client result = apiInstance.testClientModel(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testClientModel");
@@ -225,7 +270,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Client**](Client.md)| client model |
+ **client** | [**Client**](Client.md)| client model |
### Return type
@@ -268,13 +313,13 @@ FakeApi apiInstance = new FakeApi();
BigDecimal number = new BigDecimal(); // BigDecimal | None
Double _double = 3.4D; // Double | None
String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None
-byte[] _byte = B; // byte[] | None
+byte[] _byte = null; // byte[] | None
Integer integer = 56; // Integer | None
Integer int32 = 56; // Integer | None
-Long int64 = 789L; // Long | None
+Long int64 = 56L; // Long | None
Float _float = 3.4F; // Float | None
String string = "string_example"; // String | None
-byte[] binary = B; // byte[] | None
+File binary = new File("/path/to/file"); // File | None
LocalDate date = new LocalDate(); // LocalDate | None
OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None
String password = "password_example"; // String | None
@@ -295,12 +340,12 @@ Name | Type | Description | Notes
**_double** | **Double**| None |
**patternWithoutDelimiter** | **String**| None |
**_byte** | **byte[]**| None |
- **integer** | **Integer**| None | [optional]
- **int32** | **Integer**| None | [optional]
+ **integer** | **Integer**| None | [optional] [enum: ]
+ **int32** | **Integer**| None | [optional] [enum: ]
**int64** | **Long**| None | [optional]
**_float** | **Float**| None | [optional]
**string** | **String**| None | [optional]
- **binary** | **byte[]**| None | [optional]
+ **binary** | **File**| None | [optional]
**date** | **LocalDate**| None | [optional]
**dateTime** | **OffsetDateTime**| None | [optional]
**password** | **String**| None | [optional]
@@ -316,12 +361,12 @@ null (empty response body)
### HTTP request headers
- - **Content-Type**: application/xml; charset=utf-8, application/json; charset=utf-8
- - **Accept**: application/xml; charset=utf-8, application/json; charset=utf-8
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **Accept**: Not defined
# **testEnumParameters**
-> testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble)
+> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString)
To test enum parameters
@@ -335,16 +380,16 @@ To test enum parameters
FakeApi apiInstance = new FakeApi();
-List enumFormStringArray = Arrays.asList("enumFormStringArray_example"); // List | Form parameter enum test (string array)
-String enumFormString = "-efg"; // String | Form parameter enum test (string)
List enumHeaderStringArray = Arrays.asList("enumHeaderStringArray_example"); // List | Header parameter enum test (string array)
String enumHeaderString = "-efg"; // String | Header parameter enum test (string)
List enumQueryStringArray = Arrays.asList("enumQueryStringArray_example"); // List | Query parameter enum test (string array)
String enumQueryString = "-efg"; // String | Query parameter enum test (string)
Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double)
Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double)
+List enumFormStringArray = new List(); // List | Form parameter enum test (string array)
+String enumFormString = "enumFormString_example"; // String | Form parameter enum test (string)
try {
- apiInstance.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
+ apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testEnumParameters");
e.printStackTrace();
@@ -355,14 +400,14 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $]
- **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
**enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $]
**enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
**enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $]
**enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
**enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2]
**enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2]
+ **enumFormStringArray** | [**List<String>**](List.md)| Form parameter enum test (string array) | [optional] [enum: >, $]
+ **enumFormString** | **String**| Form parameter enum test (string) | [optional] [enum: _abc, -efg, (xyz)]
### Return type
@@ -374,17 +419,15 @@ No authorization required
### HTTP request headers
- - **Content-Type**: */*
- - **Accept**: */*
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **Accept**: Not defined
# **testInlineAdditionalProperties**
-> testInlineAdditionalProperties(param)
+> testInlineAdditionalProperties(requestBody)
test inline additionalProperties
-
-
### Example
```java
// Import classes:
@@ -393,9 +436,9 @@ test inline additionalProperties
FakeApi apiInstance = new FakeApi();
-Object param = null; // Object | request body
+String requestBody = new HashMap(); // String | request body
try {
- apiInstance.testInlineAdditionalProperties(param);
+ apiInstance.testInlineAdditionalProperties(requestBody);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
e.printStackTrace();
@@ -406,7 +449,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **param** | **Object**| request body |
+ **requestBody** | [**String**](String.md)| request body |
### Return type
@@ -427,8 +470,6 @@ No authorization required
test json serialization of form data
-
-
### Example
```java
// Import classes:
@@ -464,6 +505,6 @@ No authorization required
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined
diff --git a/samples/client/petstore/java/jersey1/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey1/docs/FakeClassnameTags123Api.md
index eb030817b50..01f56c717d8 100644
--- a/samples/client/petstore/java/jersey1/docs/FakeClassnameTags123Api.md
+++ b/samples/client/petstore/java/jersey1/docs/FakeClassnameTags123Api.md
@@ -9,7 +9,7 @@ Method | HTTP request | Description
# **testClassname**
-> Client testClassname(body)
+> Client testClassname(client)
To test class name in snake case
@@ -33,9 +33,9 @@ api_key_query.setApiKey("YOUR API KEY");
//api_key_query.setApiKeyPrefix("Token");
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api();
-Client body = new Client(); // Client | client model
+Client client = new Client(); // Client | client model
try {
- Client result = apiInstance.testClassname(body);
+ Client result = apiInstance.testClassname(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeClassnameTags123Api#testClassname");
@@ -47,7 +47,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Client**](Client.md)| client model |
+ **client** | [**Client**](Client.md)| client model |
### Return type
diff --git a/samples/client/petstore/java/jersey1/docs/Fake_classname_tags123Api.md b/samples/client/petstore/java/jersey1/docs/Fake_classname_tags123Api.md
deleted file mode 100644
index 56f7c9ea1ff..00000000000
--- a/samples/client/petstore/java/jersey1/docs/Fake_classname_tags123Api.md
+++ /dev/null
@@ -1,52 +0,0 @@
-# Fake_classname_tags123Api
-
-All URIs are relative to *http://petstore.swagger.io/v2*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**testClassname**](Fake_classname_tags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
-
-
-
-# **testClassname**
-> Client testClassname(body)
-
-To test class name in snake case
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiException;
-//import io.swagger.client.api.Fake_classname_tags123Api;
-
-
-Fake_classname_tags123Api apiInstance = new Fake_classname_tags123Api();
-Client body = new Client(); // Client | client model
-try {
- Client result = apiInstance.testClassname(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling Fake_classname_tags123Api#testClassname");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **body** | [**Client**](Client.md)| client model |
-
-### Return type
-
-[**Client**](Client.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: application/json
- - **Accept**: application/json
-
diff --git a/samples/client/petstore/java/jersey1/docs/FakeclassnametagsApi.md b/samples/client/petstore/java/jersey1/docs/FakeclassnametagsApi.md
deleted file mode 100644
index f8ec0768e1f..00000000000
--- a/samples/client/petstore/java/jersey1/docs/FakeclassnametagsApi.md
+++ /dev/null
@@ -1,52 +0,0 @@
-# FakeclassnametagsApi
-
-All URIs are relative to *http://petstore.swagger.io/v2*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**testClassname**](FakeclassnametagsApi.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
-
-
-
-# **testClassname**
-> Client testClassname(body)
-
-To test class name in snake case
-
-### Example
-```java
-// Import classes:
-//import io.swagger.client.ApiException;
-//import io.swagger.client.api.FakeclassnametagsApi;
-
-
-FakeclassnametagsApi apiInstance = new FakeclassnametagsApi();
-Client body = new Client(); // Client | client model
-try {
- Client result = apiInstance.testClassname(body);
- System.out.println(result);
-} catch (ApiException e) {
- System.err.println("Exception when calling FakeclassnametagsApi#testClassname");
- e.printStackTrace();
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **body** | [**Client**](Client.md)| client model |
-
-### Return type
-
-[**Client**](Client.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: application/json
- - **Accept**: application/json
-
diff --git a/samples/client/petstore/java/jersey1/docs/FormatTest.md b/samples/client/petstore/java/jersey1/docs/FormatTest.md
index c7a3acb3cb7..986f70236e1 100644
--- a/samples/client/petstore/java/jersey1/docs/FormatTest.md
+++ b/samples/client/petstore/java/jersey1/docs/FormatTest.md
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
**_double** | **Double** | | [optional]
**string** | **String** | | [optional]
**_byte** | **byte[]** | |
-**binary** | **byte[]** | | [optional]
+**binary** | [**File**](File.md) | | [optional]
**date** | [**LocalDate**](LocalDate.md) | |
**dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional]
diff --git a/samples/client/petstore/java/jersey1/docs/Name.md b/samples/client/petstore/java/jersey1/docs/Name.md
index ce2fb4dee50..64060f82de4 100644
--- a/samples/client/petstore/java/jersey1/docs/Name.md
+++ b/samples/client/petstore/java/jersey1/docs/Name.md
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
**name** | **Integer** | |
**snakeCase** | **Integer** | | [optional]
**property** | **String** | | [optional]
-**_123Number** | **Integer** | | [optional]
+**_123number** | **Integer** | | [optional]
diff --git a/samples/client/petstore/java/retrofit/docs/ModelReturn.md b/samples/client/petstore/java/jersey1/docs/OuterBoolean.md
similarity index 66%
rename from samples/client/petstore/java/retrofit/docs/ModelReturn.md
rename to samples/client/petstore/java/jersey1/docs/OuterBoolean.md
index a679b04953e..0c792032f84 100644
--- a/samples/client/petstore/java/retrofit/docs/ModelReturn.md
+++ b/samples/client/petstore/java/jersey1/docs/OuterBoolean.md
@@ -1,10 +1,9 @@
-# ModelReturn
+# OuterBoolean
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**_return** | **Integer** | | [optional]
diff --git a/samples/client/petstore/java/jersey1/docs/OuterNumber.md b/samples/client/petstore/java/jersey1/docs/OuterNumber.md
new file mode 100644
index 00000000000..ab7613b1810
--- /dev/null
+++ b/samples/client/petstore/java/jersey1/docs/OuterNumber.md
@@ -0,0 +1,9 @@
+
+# OuterNumber
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+
+
diff --git a/samples/client/petstore/java/jersey1/docs/OuterString.md b/samples/client/petstore/java/jersey1/docs/OuterString.md
new file mode 100644
index 00000000000..3079fce4a0d
--- /dev/null
+++ b/samples/client/petstore/java/jersey1/docs/OuterString.md
@@ -0,0 +1,9 @@
+
+# OuterString
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+
+
diff --git a/samples/client/petstore/java/jersey1/docs/PetApi.md b/samples/client/petstore/java/jersey1/docs/PetApi.md
index b5fa395947d..d790ff3cd4d 100644
--- a/samples/client/petstore/java/jersey1/docs/PetApi.md
+++ b/samples/client/petstore/java/jersey1/docs/PetApi.md
@@ -16,12 +16,10 @@ Method | HTTP request | Description
# **addPet**
-> addPet(body)
+> addPet(pet)
Add a new pet to the store
-
-
### Example
```java
// Import classes:
@@ -38,9 +36,9 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi();
-Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
+Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
try {
- apiInstance.addPet(body);
+ apiInstance.addPet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#addPet");
e.printStackTrace();
@@ -51,7 +49,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+ **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -64,7 +62,7 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
# **deletePet**
@@ -72,8 +70,6 @@ null (empty response body)
Deletes a pet
-
-
### Example
```java
// Import classes:
@@ -90,7 +86,7 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi();
-Long petId = 789L; // Long | Pet id to delete
+Long petId = 56L; // Long | Pet id to delete
String apiKey = "apiKey_example"; // String |
try {
apiInstance.deletePet(petId, apiKey);
@@ -118,7 +114,7 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
# **findPetsByStatus**
@@ -252,7 +248,7 @@ api_key.setApiKey("YOUR API KEY");
//api_key.setApiKeyPrefix("Token");
PetApi apiInstance = new PetApi();
-Long petId = 789L; // Long | ID of pet to return
+Long petId = 56L; // Long | ID of pet to return
try {
Pet result = apiInstance.getPetById(petId);
System.out.println(result);
@@ -283,12 +279,10 @@ Name | Type | Description | Notes
# **updatePet**
-> updatePet(body)
+> updatePet(pet)
Update an existing pet
-
-
### Example
```java
// Import classes:
@@ -305,9 +299,9 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi();
-Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
+Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
try {
- apiInstance.updatePet(body);
+ apiInstance.updatePet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#updatePet");
e.printStackTrace();
@@ -318,7 +312,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+ **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -331,7 +325,7 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
# **updatePetWithForm**
@@ -339,8 +333,6 @@ null (empty response body)
Updates a pet in the store with form data
-
-
### Example
```java
// Import classes:
@@ -357,7 +349,7 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi();
-Long petId = 789L; // Long | ID of pet that needs to be updated
+Long petId = 56L; // Long | ID of pet that needs to be updated
String name = "name_example"; // String | Updated name of the pet
String status = "status_example"; // String | Updated status of the pet
try {
@@ -387,7 +379,7 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
# **uploadFile**
@@ -395,8 +387,6 @@ null (empty response body)
uploads an image
-
-
### Example
```java
// Import classes:
@@ -413,9 +403,9 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi();
-Long petId = 789L; // Long | ID of pet to update
+Long petId = 56L; // Long | ID of pet to update
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
-File file = new File("/path/to/file.txt"); // File | file to upload
+File file = new File("/path/to/file"); // File | file to upload
try {
ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
System.out.println(result);
diff --git a/samples/client/petstore/java/jersey1/docs/SpecialModelName.md b/samples/client/petstore/java/jersey1/docs/SpecialModelName.md
index c2c6117c552..6cf53410ace 100644
--- a/samples/client/petstore/java/jersey1/docs/SpecialModelName.md
+++ b/samples/client/petstore/java/jersey1/docs/SpecialModelName.md
@@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**specialPropertyName** | **Long** | | [optional]
+**$specialPropertyName** | **Long** | | [optional]
diff --git a/samples/client/petstore/java/jersey1/docs/StoreApi.md b/samples/client/petstore/java/jersey1/docs/StoreApi.md
index 7aed6450e6a..339e3181b09 100644
--- a/samples/client/petstore/java/jersey1/docs/StoreApi.md
+++ b/samples/client/petstore/java/jersey1/docs/StoreApi.md
@@ -52,7 +52,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
# **getInventory**
@@ -121,7 +121,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other val
StoreApi apiInstance = new StoreApi();
-Long orderId = 789L; // Long | ID of pet that needs to be fetched
+Long orderId = 56L; // Long | ID of pet that needs to be fetched
try {
Order result = apiInstance.getOrderById(orderId);
System.out.println(result);
@@ -135,7 +135,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **orderId** | **Long**| ID of pet that needs to be fetched |
+ **orderId** | **Long**| ID of pet that needs to be fetched | [enum: ]
### Return type
@@ -152,12 +152,10 @@ No authorization required
# **placeOrder**
-> Order placeOrder(body)
+> Order placeOrder(order)
Place an order for a pet
-
-
### Example
```java
// Import classes:
@@ -166,9 +164,9 @@ Place an order for a pet
StoreApi apiInstance = new StoreApi();
-Order body = new Order(); // Order | order placed for purchasing the pet
+Order order = new Order(); // Order | order placed for purchasing the pet
try {
- Order result = apiInstance.placeOrder(body);
+ Order result = apiInstance.placeOrder(order);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StoreApi#placeOrder");
@@ -180,7 +178,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Order**](Order.md)| order placed for purchasing the pet |
+ **order** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type
diff --git a/samples/client/petstore/java/jersey1/docs/UserApi.md b/samples/client/petstore/java/jersey1/docs/UserApi.md
index 1c5218ac128..f982ddbf57b 100644
--- a/samples/client/petstore/java/jersey1/docs/UserApi.md
+++ b/samples/client/petstore/java/jersey1/docs/UserApi.md
@@ -16,7 +16,7 @@ Method | HTTP request | Description
# **createUser**
-> createUser(body)
+> createUser(user)
Create user
@@ -30,9 +30,9 @@ This can only be done by the logged in user.
UserApi apiInstance = new UserApi();
-User body = new User(); // User | Created user object
+User user = new User(); // User | Created user object
try {
- apiInstance.createUser(body);
+ apiInstance.createUser(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUser");
e.printStackTrace();
@@ -43,7 +43,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**User**](User.md)| Created user object |
+ **user** | [**User**](User.md)| Created user object |
### Return type
@@ -56,16 +56,14 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
# **createUsersWithArrayInput**
-> createUsersWithArrayInput(body)
+> createUsersWithArrayInput(user)
Creates list of users with given input array
-
-
### Example
```java
// Import classes:
@@ -74,9 +72,9 @@ Creates list of users with given input array
UserApi apiInstance = new UserApi();
-List body = Arrays.asList(new User()); // List | List of user object
+List user = Arrays.asList(new List()); // List | List of user object
try {
- apiInstance.createUsersWithArrayInput(body);
+ apiInstance.createUsersWithArrayInput(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
e.printStackTrace();
@@ -87,7 +85,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**List<User>**](User.md)| List of user object |
+ **user** | [**List<User>**](List.md)| List of user object |
### Return type
@@ -100,16 +98,14 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
# **createUsersWithListInput**
-> createUsersWithListInput(body)
+> createUsersWithListInput(user)
Creates list of users with given input array
-
-
### Example
```java
// Import classes:
@@ -118,9 +114,9 @@ Creates list of users with given input array
UserApi apiInstance = new UserApi();
-List body = Arrays.asList(new User()); // List | List of user object
+List user = Arrays.asList(new List()); // List | List of user object
try {
- apiInstance.createUsersWithListInput(body);
+ apiInstance.createUsersWithListInput(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithListInput");
e.printStackTrace();
@@ -131,7 +127,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**List<User>**](User.md)| List of user object |
+ **user** | [**List<User>**](List.md)| List of user object |
### Return type
@@ -144,7 +140,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
# **deleteUser**
@@ -188,7 +184,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
# **getUserByName**
@@ -196,8 +192,6 @@ No authorization required
Get user by user name
-
-
### Example
```java
// Import classes:
@@ -241,8 +235,6 @@ No authorization required
Logs user into the system
-
-
### Example
```java
// Import classes:
@@ -288,8 +280,6 @@ No authorization required
Logs out current logged in user session
-
-
### Example
```java
// Import classes:
@@ -320,11 +310,11 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
# **updateUser**
-> updateUser(username, body)
+> updateUser(username, user)
Updated user
@@ -339,9 +329,9 @@ This can only be done by the logged in user.
UserApi apiInstance = new UserApi();
String username = "username_example"; // String | name that need to be deleted
-User body = new User(); // User | Updated user object
+User user = new User(); // User | Updated user object
try {
- apiInstance.updateUser(username, body);
+ apiInstance.updateUser(username, user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#updateUser");
e.printStackTrace();
@@ -353,7 +343,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| name that need to be deleted |
- **body** | [**User**](User.md)| Updated user object |
+ **user** | [**User**](User.md)| Updated user object |
### Return type
@@ -366,5 +356,5 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
+ - **Accept**: Not defined
diff --git a/samples/client/petstore/java/jersey1/pom.xml b/samples/client/petstore/java/jersey1/pom.xml
index 5b0aa55e110..397958485ba 100644
--- a/samples/client/petstore/java/jersey1/pom.xml
+++ b/samples/client/petstore/java/jersey1/pom.xml
@@ -1,17 +1,17 @@
4.0.0
- io.swagger
- swagger-java-client
+ org.openapitools
+ petstore-java-client-jersey1jar
- swagger-java-client
+ petstore-java-client-jersey11.0.0
- https://github.com/swagger-api/swagger-codegen
- Swagger Java
+ https://github.com/openapitools/openapi-generator
+ OpenAPI Java
- scm:git:git@github.com:swagger-api/swagger-codegen.git
- scm:git:git@github.com:swagger-api/swagger-codegen.git
- https://github.com/swagger-api/swagger-codegen
+ scm:git:git@github.com:openapitools/openapi-generator.git
+ scm:git:git@github.com:openapitools/openapi-generator.git
+ https://github.com/openapitools/openapi-generator
@@ -24,10 +24,10 @@
- Swagger
- apiteam@swagger.io
- Swagger
- http://swagger.io
+ OpenAPI
+ team@openapitools.org
+ OpenAPI
+ http://openapitools.org
@@ -139,8 +139,7 @@
maven-compiler-plugin3.6.1
-
- 1.7
+ 1.71.7
diff --git a/samples/client/petstore/java/jersey1/settings.gradle b/samples/client/petstore/java/jersey1/settings.gradle
index 55640f75122..ec7f7828bd6 100644
--- a/samples/client/petstore/java/jersey1/settings.gradle
+++ b/samples/client/petstore/java/jersey1/settings.gradle
@@ -1 +1 @@
-rootProject.name = "swagger-java-client"
\ No newline at end of file
+rootProject.name = "petstore-java-client-jersey1"
\ No newline at end of file
diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/AnotherFakeApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/AnotherFakeApi.java
index b271ac74462..66221f286ec 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/AnotherFakeApi.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/AnotherFakeApi.java
@@ -51,16 +51,16 @@ public class AnotherFakeApi {
/**
* To test special tags
* To test special tags
- * @param body client model (required)
+ * @param client client model (required)
* @return Client
* @throws ApiException if fails to make API call
*/
- public Client testSpecialTags(Client body) throws ApiException {
- Object localVarPostBody = body;
+ public Client testSpecialTags(Client client) throws ApiException {
+ Object localVarPostBody = client;
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new ApiException(400, "Missing the required parameter 'body' when calling testSpecialTags");
+ // verify the required parameter 'client' is set
+ if (client == null) {
+ throw new ApiException(400, "Missing the required parameter 'client' when calling testSpecialTags");
}
// create path and map variables
diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java
index 267fd5c8bda..db7546d4630 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java
@@ -22,9 +22,11 @@ import io.swagger.client.Pair;
import java.math.BigDecimal;
import io.swagger.client.model.Client;
+import java.io.File;
import org.threeten.bp.LocalDate;
import org.threeten.bp.OffsetDateTime;
import io.swagger.client.model.OuterComposite;
+import io.swagger.client.model.User;
import java.util.ArrayList;
@@ -55,12 +57,12 @@ public class FakeApi {
/**
*
* Test serialization of outer boolean types
- * @param body Input boolean as post body (optional)
+ * @param booleanPostBody Input boolean as post body (optional)
* @return Boolean
* @throws ApiException if fails to make API call
*/
- public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException {
- Object localVarPostBody = body;
+ public Boolean fakeOuterBooleanSerialize(Boolean booleanPostBody) throws ApiException {
+ Object localVarPostBody = booleanPostBody;
// create path and map variables
String localVarPath = "/fake/outer/boolean";
@@ -75,7 +77,7 @@ public class FakeApi {
final String[] localVarAccepts = {
-
+ "*/*"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -92,12 +94,12 @@ public class FakeApi {
/**
*
* Test serialization of object with outer number type
- * @param body Input composite as post body (optional)
+ * @param outerComposite Input composite as post body (optional)
* @return OuterComposite
* @throws ApiException if fails to make API call
*/
- public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws ApiException {
- Object localVarPostBody = body;
+ public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws ApiException {
+ Object localVarPostBody = outerComposite;
// create path and map variables
String localVarPath = "/fake/outer/composite";
@@ -112,7 +114,7 @@ public class FakeApi {
final String[] localVarAccepts = {
-
+ "*/*"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -149,7 +151,7 @@ public class FakeApi {
final String[] localVarAccepts = {
-
+ "*/*"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -186,7 +188,7 @@ public class FakeApi {
final String[] localVarAccepts = {
-
+ "*/*"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -200,19 +202,67 @@ public class FakeApi {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
+ /**
+ *
+ *
+ * @param query (required)
+ * @param user (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void testBodyWithQueryParams(String query, User user) throws ApiException {
+ Object localVarPostBody = user;
+
+ // verify the required parameter 'query' is set
+ if (query == null) {
+ throw new ApiException(400, "Missing the required parameter 'query' when calling testBodyWithQueryParams");
+ }
+
+ // verify the required parameter 'user' is set
+ if (user == null) {
+ throw new ApiException(400, "Missing the required parameter 'user' when calling testBodyWithQueryParams");
+ }
+
+ // create path and map variables
+ String localVarPath = "/fake/body-with-query-params";
+
+ // query params
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPair("query", query));
+
+
+
+ final String[] localVarAccepts = {
+
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+
+ apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
+ }
/**
* To test \"client\" model
* To test \"client\" model
- * @param body client model (required)
+ * @param client client model (required)
* @return Client
* @throws ApiException if fails to make API call
*/
- public Client testClientModel(Client body) throws ApiException {
- Object localVarPostBody = body;
+ public Client testClientModel(Client client) throws ApiException {
+ Object localVarPostBody = client;
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new ApiException(400, "Missing the required parameter 'body' when calling testClientModel");
+ // verify the required parameter 'client' is set
+ if (client == null) {
+ throw new ApiException(400, "Missing the required parameter 'client' when calling testClientModel");
}
// create path and map variables
@@ -261,7 +311,7 @@ public class FakeApi {
* @param paramCallback None (optional)
* @throws ApiException if fails to make API call
*/
- public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException {
+ public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'number' is set
@@ -325,12 +375,12 @@ if (paramCallback != null)
localVarFormParams.put("callback", paramCallback);
final String[] localVarAccepts = {
- "application/xml; charset=utf-8", "application/json; charset=utf-8"
+
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
- "application/xml; charset=utf-8", "application/json; charset=utf-8"
+ "application/x-www-form-urlencoded"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
@@ -342,17 +392,17 @@ if (paramCallback != null)
/**
* To test enum parameters
* To test enum parameters
- * @param enumFormStringArray Form parameter enum test (string array) (optional)
- * @param enumFormString Form parameter enum test (string) (optional, default to -efg)
* @param enumHeaderStringArray Header parameter enum test (string array) (optional)
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
* @param enumQueryStringArray Query parameter enum test (string array) (optional)
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
* @param enumQueryInteger Query parameter enum test (double) (optional)
* @param enumQueryDouble Query parameter enum test (double) (optional)
+ * @param enumFormStringArray Form parameter enum test (string array) (optional)
+ * @param enumFormString Form parameter enum test (string) (optional)
* @throws ApiException if fails to make API call
*/
- public void testEnumParameters(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble) throws ApiException {
+ public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
@@ -367,6 +417,7 @@ if (paramCallback != null)
localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray));
localVarQueryParams.addAll(apiClient.parameterToPair("enum_query_string", enumQueryString));
localVarQueryParams.addAll(apiClient.parameterToPair("enum_query_integer", enumQueryInteger));
+ localVarQueryParams.addAll(apiClient.parameterToPair("enum_query_double", enumQueryDouble));
if (enumHeaderStringArray != null)
localVarHeaderParams.put("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray));
@@ -377,16 +428,14 @@ if (enumHeaderString != null)
localVarFormParams.put("enum_form_string_array", enumFormStringArray);
if (enumFormString != null)
localVarFormParams.put("enum_form_string", enumFormString);
-if (enumQueryDouble != null)
- localVarFormParams.put("enum_query_double", enumQueryDouble);
final String[] localVarAccepts = {
- "*/*"
+
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
- "*/*"
+ "application/x-www-form-urlencoded"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
@@ -398,15 +447,15 @@ if (enumQueryDouble != null)
/**
* test inline additionalProperties
*
- * @param param request body (required)
+ * @param requestBody request body (required)
* @throws ApiException if fails to make API call
*/
- public void testInlineAdditionalProperties(Object param) throws ApiException {
- Object localVarPostBody = param;
+ public void testInlineAdditionalProperties(String requestBody) throws ApiException {
+ Object localVarPostBody = requestBody;
- // verify the required parameter 'param' is set
- if (param == null) {
- throw new ApiException(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties");
+ // verify the required parameter 'requestBody' is set
+ if (requestBody == null) {
+ throw new ApiException(400, "Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties");
}
// create path and map variables
@@ -478,7 +527,7 @@ if (param2 != null)
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
- "application/json"
+ "application/x-www-form-urlencoded"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java
index 16e52ea7a02..adad1c5323e 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java
@@ -51,16 +51,16 @@ public class FakeClassnameTags123Api {
/**
* To test class name in snake case
* To test class name in snake case
- * @param body client model (required)
+ * @param client client model (required)
* @return Client
* @throws ApiException if fails to make API call
*/
- public Client testClassname(Client body) throws ApiException {
- Object localVarPostBody = body;
+ public Client testClassname(Client client) throws ApiException {
+ Object localVarPostBody = client;
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new ApiException(400, "Missing the required parameter 'body' when calling testClassname");
+ // verify the required parameter 'client' is set
+ if (client == null) {
+ throw new ApiException(400, "Missing the required parameter 'client' when calling testClassname");
}
// create path and map variables
diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/PetApi.java
index edd3fb24885..94528e186d3 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/PetApi.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/PetApi.java
@@ -53,15 +53,15 @@ public class PetApi {
/**
* Add a new pet to the store
*
- * @param body Pet object that needs to be added to the store (required)
+ * @param pet Pet object that needs to be added to the store (required)
* @throws ApiException if fails to make API call
*/
- public void addPet(Pet body) throws ApiException {
- Object localVarPostBody = body;
+ public void addPet(Pet pet) throws ApiException {
+ Object localVarPostBody = pet;
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new ApiException(400, "Missing the required parameter 'body' when calling addPet");
+ // verify the required parameter 'pet' is set
+ if (pet == null) {
+ throw new ApiException(400, "Missing the required parameter 'pet' when calling addPet");
}
// create path and map variables
@@ -77,7 +77,7 @@ public class PetApi {
final String[] localVarAccepts = {
- "application/xml", "application/json"
+
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -122,7 +122,7 @@ public class PetApi {
final String[] localVarAccepts = {
- "application/xml", "application/json"
+
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -270,15 +270,15 @@ public class PetApi {
/**
* Update an existing pet
*
- * @param body Pet object that needs to be added to the store (required)
+ * @param pet Pet object that needs to be added to the store (required)
* @throws ApiException if fails to make API call
*/
- public void updatePet(Pet body) throws ApiException {
- Object localVarPostBody = body;
+ public void updatePet(Pet pet) throws ApiException {
+ Object localVarPostBody = pet;
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new ApiException(400, "Missing the required parameter 'body' when calling updatePet");
+ // verify the required parameter 'pet' is set
+ if (pet == null) {
+ throw new ApiException(400, "Missing the required parameter 'pet' when calling updatePet");
}
// create path and map variables
@@ -294,7 +294,7 @@ public class PetApi {
final String[] localVarAccepts = {
- "application/xml", "application/json"
+
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -342,7 +342,7 @@ if (status != null)
localVarFormParams.put("status", status);
final String[] localVarAccepts = {
- "application/xml", "application/json"
+
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/StoreApi.java
index 0c8a68f5d21..4271802d18d 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/StoreApi.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/StoreApi.java
@@ -76,7 +76,7 @@ public class StoreApi {
final String[] localVarAccepts = {
- "application/xml", "application/json"
+
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -172,16 +172,16 @@ public class StoreApi {
/**
* Place an order for a pet
*
- * @param body order placed for purchasing the pet (required)
+ * @param order order placed for purchasing the pet (required)
* @return Order
* @throws ApiException if fails to make API call
*/
- public Order placeOrder(Order body) throws ApiException {
- Object localVarPostBody = body;
+ public Order placeOrder(Order order) throws ApiException {
+ Object localVarPostBody = order;
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new ApiException(400, "Missing the required parameter 'body' when calling placeOrder");
+ // verify the required parameter 'order' is set
+ if (order == null) {
+ throw new ApiException(400, "Missing the required parameter 'order' when calling placeOrder");
}
// create path and map variables
diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/UserApi.java
index 5d44eb9cd82..7f21395e283 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/UserApi.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/UserApi.java
@@ -51,15 +51,15 @@ public class UserApi {
/**
* Create user
* This can only be done by the logged in user.
- * @param body Created user object (required)
+ * @param user Created user object (required)
* @throws ApiException if fails to make API call
*/
- public void createUser(User body) throws ApiException {
- Object localVarPostBody = body;
+ public void createUser(User user) throws ApiException {
+ Object localVarPostBody = user;
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new ApiException(400, "Missing the required parameter 'body' when calling createUser");
+ // verify the required parameter 'user' is set
+ if (user == null) {
+ throw new ApiException(400, "Missing the required parameter 'user' when calling createUser");
}
// create path and map variables
@@ -75,7 +75,7 @@ public class UserApi {
final String[] localVarAccepts = {
- "application/xml", "application/json"
+
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -92,15 +92,15 @@ public class UserApi {
/**
* Creates list of users with given input array
*
- * @param body List of user object (required)
+ * @param user List of user object (required)
* @throws ApiException if fails to make API call
*/
- public void createUsersWithArrayInput(List body) throws ApiException {
- Object localVarPostBody = body;
+ public void createUsersWithArrayInput(List user) throws ApiException {
+ Object localVarPostBody = user;
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput");
+ // verify the required parameter 'user' is set
+ if (user == null) {
+ throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithArrayInput");
}
// create path and map variables
@@ -116,7 +116,7 @@ public class UserApi {
final String[] localVarAccepts = {
- "application/xml", "application/json"
+
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -133,15 +133,15 @@ public class UserApi {
/**
* Creates list of users with given input array
*
- * @param body List of user object (required)
+ * @param user List of user object (required)
* @throws ApiException if fails to make API call
*/
- public void createUsersWithListInput(List body) throws ApiException {
- Object localVarPostBody = body;
+ public void createUsersWithListInput(List user) throws ApiException {
+ Object localVarPostBody = user;
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput");
+ // verify the required parameter 'user' is set
+ if (user == null) {
+ throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithListInput");
}
// create path and map variables
@@ -157,7 +157,7 @@ public class UserApi {
final String[] localVarAccepts = {
- "application/xml", "application/json"
+
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -199,7 +199,7 @@ public class UserApi {
final String[] localVarAccepts = {
- "application/xml", "application/json"
+
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -327,7 +327,7 @@ public class UserApi {
final String[] localVarAccepts = {
- "application/xml", "application/json"
+
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -345,20 +345,20 @@ public class UserApi {
* Updated user
* This can only be done by the logged in user.
* @param username name that need to be deleted (required)
- * @param body Updated user object (required)
+ * @param user Updated user object (required)
* @throws ApiException if fails to make API call
*/
- public void updateUser(String username, User body) throws ApiException {
- Object localVarPostBody = body;
+ public void updateUser(String username, User user) throws ApiException {
+ Object localVarPostBody = user;
// verify the required parameter 'username' is set
if (username == null) {
throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser");
}
- // verify the required parameter 'body' is set
- if (body == null) {
- throw new ApiException(400, "Missing the required parameter 'body' when calling updateUser");
+ // verify the required parameter 'user' is set
+ if (user == null) {
+ throw new ApiException(400, "Missing the required parameter 'user' when calling updateUser");
}
// create path and map variables
@@ -375,7 +375,7 @@ public class UserApi {
final String[] localVarAccepts = {
- "application/xml", "application/json"
+
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/EnumTest.java
index 193d7f101db..2bb7dd17d43 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/EnumTest.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/EnumTest.java
@@ -67,6 +67,46 @@ public class EnumTest {
@JsonProperty("enum_string")
private EnumStringEnum enumString = null;
+ /**
+ * Gets or Sets enumStringRequired
+ */
+ public enum EnumStringRequiredEnum {
+ UPPER("UPPER"),
+
+ LOWER("lower"),
+
+ EMPTY("");
+
+ private String value;
+
+ EnumStringRequiredEnum(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static EnumStringRequiredEnum fromValue(String text) {
+ for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) {
+ if (String.valueOf(b.value).equals(text)) {
+ return b;
+ }
+ }
+ return null;
+ }
+ }
+
+ @JsonProperty("enum_string_required")
+ private EnumStringRequiredEnum enumStringRequired = null;
+
/**
* Gets or Sets enumInteger
*/
@@ -164,6 +204,24 @@ public class EnumTest {
this.enumString = enumString;
}
+ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) {
+ this.enumStringRequired = enumStringRequired;
+ return this;
+ }
+
+ /**
+ * Get enumStringRequired
+ * @return enumStringRequired
+ **/
+ @ApiModelProperty(required = true, value = "")
+ public EnumStringRequiredEnum getEnumStringRequired() {
+ return enumStringRequired;
+ }
+
+ public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) {
+ this.enumStringRequired = enumStringRequired;
+ }
+
public EnumTest enumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger;
return this;
@@ -229,6 +287,7 @@ public class EnumTest {
}
EnumTest enumTest = (EnumTest) o;
return Objects.equals(this.enumString, enumTest.enumString) &&
+ Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) &&
Objects.equals(this.enumInteger, enumTest.enumInteger) &&
Objects.equals(this.enumNumber, enumTest.enumNumber) &&
Objects.equals(this.outerEnum, enumTest.outerEnum);
@@ -236,7 +295,7 @@ public class EnumTest {
@Override
public int hashCode() {
- return Objects.hash(enumString, enumInteger, enumNumber, outerEnum);
+ return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum);
}
@@ -246,6 +305,7 @@ public class EnumTest {
sb.append("class EnumTest {\n");
sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n");
+ sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n");
sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n");
sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n");
sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n");
diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/FormatTest.java
index 67879022f96..5f601300b95 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/FormatTest.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/FormatTest.java
@@ -20,6 +20,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
+import java.io.File;
import java.math.BigDecimal;
import java.util.UUID;
import org.threeten.bp.LocalDate;
@@ -55,7 +56,7 @@ public class FormatTest {
private byte[] _byte = null;
@JsonProperty("binary")
- private byte[] binary = null;
+ private File binary = null;
@JsonProperty("date")
private LocalDate date = null;
@@ -223,7 +224,7 @@ public class FormatTest {
this._byte = _byte;
}
- public FormatTest binary(byte[] binary) {
+ public FormatTest binary(File binary) {
this.binary = binary;
return this;
}
@@ -233,11 +234,11 @@ public class FormatTest {
* @return binary
**/
@ApiModelProperty(value = "")
- public byte[] getBinary() {
+ public File getBinary() {
return binary;
}
- public void setBinary(byte[] binary) {
+ public void setBinary(File binary) {
this.binary = binary;
}
@@ -331,7 +332,7 @@ public class FormatTest {
Objects.equals(this._double, formatTest._double) &&
Objects.equals(this.string, formatTest.string) &&
Arrays.equals(this._byte, formatTest._byte) &&
- Arrays.equals(this.binary, formatTest.binary) &&
+ Objects.equals(this.binary, formatTest.binary) &&
Objects.equals(this.date, formatTest.date) &&
Objects.equals(this.dateTime, formatTest.dateTime) &&
Objects.equals(this.uuid, formatTest.uuid) &&
@@ -340,7 +341,7 @@ public class FormatTest {
@Override
public int hashCode() {
- return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), Arrays.hashCode(binary), date, dateTime, uuid, password);
+ return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password);
}
diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Model200Response.java
index 38fb1481a3d..46fb5650ff0 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Model200Response.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Model200Response.java
@@ -78,9 +78,9 @@ public class Model200Response {
if (o == null || getClass() != o.getClass()) {
return false;
}
- Model200Response _200Response = (Model200Response) o;
- return Objects.equals(this.name, _200Response.name) &&
- Objects.equals(this.propertyClass, _200Response.propertyClass);
+ Model200Response _200response = (Model200Response) o;
+ return Objects.equals(this.name, _200response.name) &&
+ Objects.equals(this.propertyClass, _200response.propertyClass);
}
@Override
diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Name.java
index a62db5e76e6..e12c1072478 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Name.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Name.java
@@ -37,7 +37,7 @@ public class Name {
private String property = null;
@JsonProperty("123Number")
- private Integer _123Number = null;
+ private Integer _123number = null;
public Name name(Integer name) {
this.name = name;
@@ -85,12 +85,12 @@ public class Name {
}
/**
- * Get _123Number
- * @return _123Number
+ * Get _123number
+ * @return _123number
**/
@ApiModelProperty(value = "")
- public Integer get123Number() {
- return _123Number;
+ public Integer get123number() {
+ return _123number;
}
@@ -106,12 +106,12 @@ public class Name {
return Objects.equals(this.name, name.name) &&
Objects.equals(this.snakeCase, name.snakeCase) &&
Objects.equals(this.property, name.property) &&
- Objects.equals(this._123Number, name._123Number);
+ Objects.equals(this._123number, name._123number);
}
@Override
public int hashCode() {
- return Objects.hash(name, snakeCase, property, _123Number);
+ return Objects.hash(name, snakeCase, property, _123number);
}
@@ -123,7 +123,7 @@ public class Name {
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n");
sb.append(" property: ").append(toIndentedString(property)).append("\n");
- sb.append(" _123Number: ").append(toIndentedString(_123Number)).append("\n");
+ sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n");
sb.append("}");
return sb.toString();
}
diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/OuterBoolean.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/OuterBoolean.java
new file mode 100644
index 00000000000..78bfcb1442a
--- /dev/null
+++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/OuterBoolean.java
@@ -0,0 +1,63 @@
+/*
+ * Swagger Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * 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.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+
+/**
+ * OuterBoolean
+ */
+
+public class OuterBoolean {
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash();
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OuterBoolean {\n");
+
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/OuterNumber.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/OuterNumber.java
new file mode 100644
index 00000000000..d775aa68499
--- /dev/null
+++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/OuterNumber.java
@@ -0,0 +1,63 @@
+/*
+ * Swagger Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * 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.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+
+/**
+ * OuterNumber
+ */
+
+public class OuterNumber {
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash();
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OuterNumber {\n");
+
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/OuterString.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/OuterString.java
new file mode 100644
index 00000000000..fa2539d33de
--- /dev/null
+++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/OuterString.java
@@ -0,0 +1,63 @@
+/*
+ * Swagger Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * 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.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+
+/**
+ * OuterString
+ */
+
+public class OuterString {
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash();
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class OuterString {\n");
+
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/SpecialModelName.java
index 209b4263f7e..3676b70365a 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/SpecialModelName.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/SpecialModelName.java
@@ -27,24 +27,24 @@ import io.swagger.annotations.ApiModelProperty;
public class SpecialModelName {
@JsonProperty("$special[property.name]")
- private Long specialPropertyName = null;
+ private Long $specialPropertyName = null;
- public SpecialModelName specialPropertyName(Long specialPropertyName) {
- this.specialPropertyName = specialPropertyName;
+ public SpecialModelName $specialPropertyName(Long $specialPropertyName) {
+ this.$specialPropertyName = $specialPropertyName;
return this;
}
/**
- * Get specialPropertyName
- * @return specialPropertyName
+ * Get $specialPropertyName
+ * @return $specialPropertyName
**/
@ApiModelProperty(value = "")
- public Long getSpecialPropertyName() {
- return specialPropertyName;
+ public Long get$SpecialPropertyName() {
+ return $specialPropertyName;
}
- public void setSpecialPropertyName(Long specialPropertyName) {
- this.specialPropertyName = specialPropertyName;
+ public void set$SpecialPropertyName(Long $specialPropertyName) {
+ this.$specialPropertyName = $specialPropertyName;
}
@@ -56,13 +56,13 @@ public class SpecialModelName {
if (o == null || getClass() != o.getClass()) {
return false;
}
- SpecialModelName specialModelName = (SpecialModelName) o;
- return Objects.equals(this.specialPropertyName, specialModelName.specialPropertyName);
+ SpecialModelName $specialModelName = (SpecialModelName) o;
+ return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName);
}
@Override
public int hashCode() {
- return Objects.hash(specialPropertyName);
+ return Objects.hash($specialPropertyName);
}
@@ -71,7 +71,7 @@ public class SpecialModelName {
StringBuilder sb = new StringBuilder();
sb.append("class SpecialModelName {\n");
- sb.append(" specialPropertyName: ").append(toIndentedString(specialPropertyName)).append("\n");
+ sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n");
sb.append("}");
return sb.toString();
}
diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/PetstoreProfiling.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/PetstoreProfiling.java
deleted file mode 100644
index d0be1523e45..00000000000
--- a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/PetstoreProfiling.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package io.swagger;
-
-import java.io.*;
-import java.util.*;
-
-import io.swagger.client.*;
-import io.swagger.client.api.*;
-import io.swagger.client.model.*;
-
-public class PetstoreProfiling {
- public int total = 5;
- public Long newPetId = 50003L;
- public String outputFile = "./petstore_profiling.output";
-
- public void callApis(int index, List