diff --git a/bin/java-inflector-petstore-server.sh b/bin/java-inflector-petstore-server.sh index 30111e49c01..91dfdda4fb9 100755 --- a/bin/java-inflector-petstore-server.sh +++ b/bin/java-inflector-petstore-server.sh @@ -30,6 +30,7 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/3_0_0/petstore-wi echo "Removing files and folders under samples/server/petstore/java-inflector/src/main" rm -rf samples/server/petstore/java-inflector/src/main +rm -rf samples/server/petstore/java-inflector/src/gen find samples/server/petstore/java-inflector -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-msf4j-petstore-server.sh b/bin/java-msf4j-petstore-server.sh index 15225e6a6e8..de4adcd9928 100755 --- a/bin/java-msf4j-petstore-server.sh +++ b/bin/java-msf4j-petstore-server.sh @@ -30,5 +30,6 @@ ags="$@ generate -t modules/swagger-codegen/src/main/resources/MSF4J -i modules/ echo "Removing files and folders under samples/server/petstore/java-msf4j/src/main" rm -rf samples/server/petstore/java-msf4j/src/main +rm -rf samples/server/petstore/java-msf4j/src/gen find samples/server/petstore/java-msf4j -maxdepth 1 -type f ! -name "README.md" ! -name "pom.xml" ! -name "mvn_test_jdk8_only.sh" ! -name ".swagger-codegen-ignore" -exec rm {} + # java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-all.sh b/bin/java-petstore-all.sh index 788d4e82981..70aa4c35e53 100755 --- a/bin/java-petstore-all.sh +++ b/bin/java-petstore-all.sh @@ -1,19 +1,53 @@ #!/bin/sh # update # java petstore for all supported http libraries +./bin/java8-petstore-jersey2.sh +./bin/java-inflector-petstore-server.sh +./bin/java-msf4j-petstore-server.sh +./bin/java-petstore-feign.sh +./bin/java-petstore-google-api-client.sh ./bin/java-petstore-jersey1.sh ./bin/java-petstore-jersey2.sh -./bin/java-petstore-feign.sh +./bin/java-petstore-jersey2-java6.sh ./bin/java-petstore-okhttp-gson.sh ./bin/java-petstore-okhttp-gson-parcelable.sh +./bin/java-petstore-resteasy.sh +./bin/java-petstore-resttemplate.sh +./bin/java-petstore-resttemplate-withxml.sh ./bin/java-petstore-retrofit.sh ./bin/java-petstore-retrofit2.sh +./bin/java-petstore-retrofit2-play24.sh +./bin/java-petstore-retrofit2-play25.sh ./bin/java-petstore-retrofit2rx.sh ./bin/java-petstore-retrofit2rx2.sh -./bin/java8-petstore-jersey2.sh -./bin/java-petstore-retrofit2-play24.sh -./bin/java-petstore-jersey2-java6.sh -./bin/java-petstore-resttemplate.sh -./bin/java-petstore-resttemplate-withxml.sh -./bin/java-petstore-resteasy.sh -./bin/java-petstore-google-api-client.sh +./bin/java-petstore-vertx.sh +./bin/jaxrs-cxf-cdi-petstore-server.sh +./bin/jaxrs-cxf-client-petstore.sh +./bin/jaxrs-cxf-petstore-server.sh +./bin/jaxrs-cxf-petstore-server-annotated-base-path.sh +./bin/jaxrs-cxf-petstore-server-non-spring-application.sh +./bin/jaxrs-jersey1-petstore-server.sh +./bin/jaxrs-jersey1-usetags-petstore-server.sh +./bin/jaxrs-petstore-server.sh +./bin/jaxrs-resteasy-eap-java8-petstore-server.sh +./bin/jaxrs-resteasy-eap-joda-petstore-server.sh +./bin/jaxrs-resteasy-eap-petstore-server.sh +./bin/jaxrs-resteasy-java8-petstore-server.sh +./bin/jaxrs-resteasy-joda-petstore-server.sh +./bin/jaxrs-resteasy-petstore-server.sh +./bin/jaxrs-spec-petstore-server.sh +./bin/jaxrs-spec-petstore-server-interface.sh +./bin/jaxrs-usetags-petstore-server.sh +./bin/spring-cloud-feign-petstore.sh +./bin/spring-cloud-feign-petstore-v2.sh +./bin/spring-delegate.sh +./bin/spring-delegate-j8.sh +./bin/spring-mvc-petstore-j8-async-server.sh +./bin/spring-mvc-petstore-server.sh +./bin/spring-stubs.sh +./bin/springboot-petstore-server.sh +./bin/springboot-petstore-server-beanvalidation.sh +./bin/springboot-petstore-server-implicitHeaders.sh +./bin/springboot-petstore-server-useOptional.sh +./bin/springboot-petstore-server-v2.sh +./bin/springboot-petstore-server-v2-no-default.sh diff --git a/bin/java-petstore-feign.sh b/bin/java-petstore-feign.sh index dcfe231d23c..40ccbd8200d 100755 --- a/bin/java-petstore-feign.sh +++ b/bin/java-petstore-feign.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/3_0_0/petstore-wi echo "Removing files and folders under samples/client/petstore/java/feign/src/main" rm -rf samples/client/petstore/java/feign/src/main +rm -rf samples/client/petstore/java/feign/src/gen find samples/client/petstore/java/feign -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-google-api-client.sh b/bin/java-petstore-google-api-client.sh index 0ef4d11d263..e34aab8b771 100755 --- a/bin/java-petstore-google-api-client.sh +++ b/bin/java-petstore-google-api-client.sh @@ -30,6 +30,7 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with echo "Removing files and folders under samples/client/petstore/java/google-api-client/src/main" rm -rf samples/client/petstore/java/google-api-client/src/main +rm -rf samples/client/petstore/java/google-api-client/src/gen find samples/client/petstore/java/google-api-client -maxdepth 1 -type f ! -name "README.md" -exec rm {} + # TODO: uncomment the java commmand when the issue with this script is fixed, see https://github.com/swagger-api/swagger-codegen-generators/issues/52 java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-jersey1.sh b/bin/java-petstore-jersey1.sh index dd591a23d37..a8e222a0053 100755 --- a/bin/java-petstore-jersey1.sh +++ b/bin/java-petstore-jersey1.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/3_0_0/petstore-wi echo "Removing files and folders under samples/client/petstore/java/jersey1/src/main" rm -rf samples/client/petstore/java/jersey1/src/main +rm -rf samples/client/petstore/java/jersey1/src/gen find samples/client/petstore/java/jersey1 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-jersey2-java6.sh b/bin/java-petstore-jersey2-java6.sh index f82c922668d..88e249a8d2c 100755 --- a/bin/java-petstore-jersey2-java6.sh +++ b/bin/java-petstore-jersey2-java6.sh @@ -30,5 +30,6 @@ ags="$@ generate --artifact-id swagger-petstore-jersey2-java6 -i modules/swagger echo "Removing files and folders under samples/client/petstore/java/jersey2/src/main" rm -rf samples/client/petstore/java/jersey2-java6/src/main +rm -rf samples/client/petstore/java/jersey2-java6/src/gen find samples/client/petstore/java/jersey2-java6 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-jersey2.sh b/bin/java-petstore-jersey2.sh index 73687d2c7b8..7e697d18d7b 100755 --- a/bin/java-petstore-jersey2.sh +++ b/bin/java-petstore-jersey2.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/3_0_0/petstore-wi echo "Removing files and folders under samples/client/petstore/java/jersey2/src/main" rm -rf samples/client/petstore/java/jersey2/src/main +rm -rf samples/client/petstore/java/jersey2/src/gen find samples/client/petstore/java/jersey2 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-okhttp-gson-parcelable.sh b/bin/java-petstore-okhttp-gson-parcelable.sh index d85c20f6f25..bc16b3eabb1 100755 --- a/bin/java-petstore-okhttp-gson-parcelable.sh +++ b/bin/java-petstore-okhttp-gson-parcelable.sh @@ -29,5 +29,6 @@ export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -Dlogback.configur ags="$@ generate -i modules/swagger-codegen/src/test/resources/3_0_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 +rm -rf samples/client/petstore/java/okhttp-gson-parcelableModel/src/gen find samples/client/petstore/java/okhttp-gson-parcelableModel -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-okhttp-gson.sh b/bin/java-petstore-okhttp-gson.sh index a3051f0a023..13c33c66bab 100755 --- a/bin/java-petstore-okhttp-gson.sh +++ b/bin/java-petstore-okhttp-gson.sh @@ -29,5 +29,6 @@ export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -Dlogback.configur ags="$@ generate -i modules/swagger-codegen/src/test/resources/3_0_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 -DhideGenerationTimestamp=true" rm -rf samples/client/petstore/java/okhttp-gson/src/main +rm -rf samples/client/petstore/java/okhttp-gson/src/gen find samples/client/petstore/java/okhttp-gson -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-resteasy.sh b/bin/java-petstore-resteasy.sh index ca105650647..0d8c3ad8e88 100755 --- a/bin/java-petstore-resteasy.sh +++ b/bin/java-petstore-resteasy.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/3_0_0/petstore-wi echo "Removing files and folders under samples/client/petstore/java/resteasy/src/main" rm -rf samples/client/petstore/java/resteasy/src/main +rm -rf samples/client/petstore/java/resteasy/src/gen find samples/client/petstore/java/resteasy -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-resttemplate-withxml.sh b/bin/java-petstore-resttemplate-withxml.sh index 3c220b9ebd5..642fdadd71a 100755 --- a/bin/java-petstore-resttemplate-withxml.sh +++ b/bin/java-petstore-resttemplate-withxml.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/3_0_0/petstore-wi echo "Removing files and folders under samples/client/petstore/java/resttemplate/src/main" rm -rf samples/client/petstore/java/resttemplate-withXml/src/main +rm -rf samples/client/petstore/java/resttemplate-withXml/src/gen find samples/client/petstore/java/resttemplate-withXml -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-resttemplate.sh b/bin/java-petstore-resttemplate.sh index 60823e97695..b141efe5d08 100755 --- a/bin/java-petstore-resttemplate.sh +++ b/bin/java-petstore-resttemplate.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/3_0_0/petstore-wi echo "Removing files and folders under samples/client/petstore/java/resttemplate/src/main" rm -rf samples/client/petstore/java/resttemplate/src/main +rm -rf samples/client/petstore/java/resttemplate/src/gen find samples/client/petstore/java/resttemplate -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-retrofit.sh b/bin/java-petstore-retrofit.sh index f5584bc08f6..a900b37f75b 100755 --- a/bin/java-petstore-retrofit.sh +++ b/bin/java-petstore-retrofit.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/3_0_0/petstore-wi echo "Removing files and folders under samples/client/petstore/java/retrofit/src/main" rm -rf samples/client/petstore/java/retrofit/src/main +rm -rf samples/client/petstore/java/retrofit/src/gen find samples/client/petstore/java/retrofit -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-retrofit2-play24.sh b/bin/java-petstore-retrofit2-play24.sh index f5c98833a94..b891935efe8 100755 --- a/bin/java-petstore-retrofit2-play24.sh +++ b/bin/java-petstore-retrofit2-play24.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/3_0_0/petstore-wi echo "Removing files and folders under samples/client/petstore/java/retrofit2-play24/src/main" rm -rf samples/client/petstore/java/retrofit2-play24/src/main +rm -rf samples/client/petstore/java/retrofit2-play24/src/gen find samples/client/petstore/java/retrofit2-play24 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-retrofit2-play25.sh b/bin/java-petstore-retrofit2-play25.sh index 08043a83675..3dda18ff908 100755 --- a/bin/java-petstore-retrofit2-play25.sh +++ b/bin/java-petstore-retrofit2-play25.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with echo "Removing files and folders under samples/client/petstore/java/retrofit2-play25/src/main" rm -rf samples/client/petstore/java/retrofit2-play25/src/main +rm -rf samples/client/petstore/java/retrofit2-play25/src/gen find samples/client/petstore/java/retrofit2-play25 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-retrofit2.sh b/bin/java-petstore-retrofit2.sh index 4fcfa67fb4f..722fac37c1e 100755 --- a/bin/java-petstore-retrofit2.sh +++ b/bin/java-petstore-retrofit2.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/3_0_0/petstore-wi echo "Removing files and folders under samples/client/petstore/java/retrofit2/src/main" rm -rf samples/client/petstore/java/retrofit2/src/main +rm -rf samples/client/petstore/java/retrofit2/src/gen find samples/client/petstore/java/retrofit2 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-retrofit2rx.sh b/bin/java-petstore-retrofit2rx.sh index 24d3d0a7182..a053e086e5a 100755 --- a/bin/java-petstore-retrofit2rx.sh +++ b/bin/java-petstore-retrofit2rx.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/3_0_0/petstore-wi echo "Removing files and folders under samples/client/petstore/java/retrofit2rx/src/main" rm -rf samples/client/petstore/java/retrofit2rx/src/main +rm -rf samples/client/petstore/java/retrofit2rx/src/gen find samples/client/petstore/java/retrofit2rx -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-retrofit2rx2.sh b/bin/java-petstore-retrofit2rx2.sh index 47818cec895..fc48dabff50 100755 --- a/bin/java-petstore-retrofit2rx2.sh +++ b/bin/java-petstore-retrofit2rx2.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/3_0_0/petstore-wi echo "Removing files and folders under samples/client/petstore/java/retrofit2rx2/src/main" rm -rf samples/client/petstore/java/retrofit2rx2/src/main +rm -rf samples/client/petstore/java/retrofit2rx2/src/gen find samples/client/petstore/java/retrofit2rx2 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-pkmst-petstore-server.sh b/bin/java-pkmst-petstore-server.sh index c8d822cb3e1..c66384b64bf 100755 --- a/bin/java-pkmst-petstore-server.sh +++ b/bin/java-pkmst-petstore-server.sh @@ -30,5 +30,6 @@ ags="$@ generate -t modules/swagger-codegen/src/main/resources/java-pkmst -i mod echo "Removing files and folders under samples/server/petstore/java-pkmst/src/main" rm -rf samples/server/petstore/java-pkmst/src/main +rm -rf samples/server/petstore/java-pkmst/src/gen find samples/server/petstore/java-pkmst/ -maxdepth 1 -type f ! -name "README.md" -exec rm {} + # java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java8-petstore-jersey2.sh b/bin/java8-petstore-jersey2.sh index 8998fa4523c..ec0c50b84e6 100755 --- a/bin/java8-petstore-jersey2.sh +++ b/bin/java8-petstore-jersey2.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/3_0_0/petstore-wi echo "Removing files and folders under samples/client/petstore/java/jersey2-java8/src/main" rm -rf samples/client/petstore/java/jersey2-java8/src/main +rm -rf samples/client/petstore/java/jersey2-java8/src/gen find samples/client/petstore/java/jersey2-java8 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-cxf-cdi-petstore-server.sh b/bin/jaxrs-cxf-cdi-petstore-server.sh index ae030a742f2..2fa42fc2d6e 100755 --- a/bin/jaxrs-cxf-cdi-petstore-server.sh +++ b/bin/jaxrs-cxf-cdi-petstore-server.sh @@ -27,5 +27,9 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -Dlogback.configurationFile=bin/logback.xml" ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l jaxrs-cxf-cdi -o samples/server/petstore/jaxrs-cxf-cdi -DhideGenerationTimestamp=true" +echo "Removing files and folders under samples/server/petstore/jaxrs-cxf-cdi/src/main" +rm -rf samples/server/petstore/jaxrs-cxf-cdi/src/main +rm -rf samples/server/petstore/jaxrs-cxf-cdi/src/gen +find samples/server/petstore/jaxrs-cxf-cdi -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-cxf-client-petstore.sh b/bin/jaxrs-cxf-client-petstore.sh index 6f0b27a8a53..fbf7451d891 100755 --- a/bin/jaxrs-cxf-client-petstore.sh +++ b/bin/jaxrs-cxf-client-petstore.sh @@ -30,6 +30,7 @@ ags="$@ generate --artifact-id "jaxrs-cxf-petstore-client" -i modules/swagger-co echo "Removing files and folders under samples/client/petstore/jaxrs-cxf-client/src/main" rm -rf samples/client/petstore/jaxrs-cxf-client/src/main +rm -rf samples/client/petstore/jaxrs-cxf-client/src/gen find samples/client/petstore/jaxrs-cxf-client -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-cxf-petstore-server-annotated-base-path.sh b/bin/jaxrs-cxf-petstore-server-annotated-base-path.sh index 62eab67e8d6..dcc8f69e16e 100755 --- a/bin/jaxrs-cxf-petstore-server-annotated-base-path.sh +++ b/bin/jaxrs-cxf-petstore-server-annotated-base-path.sh @@ -27,5 +27,9 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -Dlogback.configurationFile=bin/logback.xml" ags="$@ generate --artifact-id swagger-cxf-annotated-basepath -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l jaxrs-cxf -o samples/server/petstore/jaxrs-cxf-annotated-base-path -DhideGenerationTimestamp=true,useAnnotatedBasePath=true" +echo "Removing files and folders under samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main" +rm -rf samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main +rm -rf samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen +find samples/server/petstore/jaxrs-cxf-annotated-base-path -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-cxf-petstore-server-non-spring-application.sh b/bin/jaxrs-cxf-petstore-server-non-spring-application.sh index 5f2ef4baf75..bf316c94c07 100755 --- a/bin/jaxrs-cxf-petstore-server-non-spring-application.sh +++ b/bin/jaxrs-cxf-petstore-server-non-spring-application.sh @@ -27,5 +27,9 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -Dlogback.configurationFile=bin/logback.xml" ags="$@ generate --artifact-id swagger-cxf-server-non-spring -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l jaxrs-cxf -o samples/server/petstore/jaxrs-cxf-non-spring-app -DhideGenerationTimestamp=true,generateNonSpringApplication=true" +echo "Removing files and folders under samples/server/petstore/jaxrs-cxf-non-spring-app/src/main" +rm -rf samples/server/petstore/jaxrs-cxf-non-spring-app/src/main +rm -rf samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen +find samples/server/petstore/jaxrs-cxf-non-spring-app -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-cxf-petstore-server.sh b/bin/jaxrs-cxf-petstore-server.sh index 80b75605f52..b335f94a0aa 100755 --- a/bin/jaxrs-cxf-petstore-server.sh +++ b/bin/jaxrs-cxf-petstore-server.sh @@ -27,5 +27,9 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -Dlogback.configurationFile=bin/logback.xml" ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l jaxrs-cxf -o samples/server/petstore/jaxrs-cxf -DhideGenerationTimestamp=true" +echo "Removing files and folders under samples/server/petstore/jaxrs-cxf/src/main" +rm -rf samples/server/petstore/jaxrs-cxf/src/main +rm -rf samples/server/petstore/jaxrs-cxf/src/gen +find samples/server/petstore/jaxrs-cxf -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-jersey1-petstore-server.sh b/bin/jaxrs-jersey1-petstore-server.sh index 78f0a07b19e..d56e6b93ece 100755 --- a/bin/jaxrs-jersey1-petstore-server.sh +++ b/bin/jaxrs-jersey1-petstore-server.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with echo "Removing files and folders under samples/server/petstore/jaxrs/jersey1/src/main" rm -rf samples/server/petstore/jaxrs/jersey1/src/main +rm -rf samples/server/petstore/jaxrs/jersey1/src/gen find samples/server/petstore/jaxrs/jersey1 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-jersey1-usetags-petstore-server.sh b/bin/jaxrs-jersey1-usetags-petstore-server.sh index e0db71b32e9..7b9bfddc50c 100755 --- a/bin/jaxrs-jersey1-usetags-petstore-server.sh +++ b/bin/jaxrs-jersey1-usetags-petstore-server.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with echo "Removing files and folders under samples/server/petstore/jaxrs/jersey1-useTags/src/main" rm -rf samples/server/petstore/jaxrs/jersey1-useTags/src/main +rm -rf samples/server/petstore/jaxrs/jersey1-useTags/src/gen find samples/server/petstore/jaxrs/jersey1-useTags -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-petstore-server.sh b/bin/jaxrs-petstore-server.sh index df630fb4c19..73b441b3f1b 100755 --- a/bin/jaxrs-petstore-server.sh +++ b/bin/jaxrs-petstore-server.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with echo "Removing files and folders under samples/server/petstore/jaxrs/jersey2/src/main" rm -rf samples/server/petstore/jaxrs/jersey2/src/main +rm -rf samples/server/petstore/jaxrs/jersey2/src/gen find samples/server/petstore/jaxrs/jersey2 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-resteasy-eap-java8-petstore-server.sh b/bin/jaxrs-resteasy-eap-java8-petstore-server.sh index cad618bad77..e3e38f89e1f 100755 --- a/bin/jaxrs-resteasy-eap-java8-petstore-server.sh +++ b/bin/jaxrs-resteasy-eap-java8-petstore-server.sh @@ -30,6 +30,7 @@ ags="$@ generate --artifact-id swagger-jaxrs-resteasy-eap-java8-server -i module echo "Removing files and folders under samples/server/petstore/jaxrs-resteasy/eap-java8/src/main" rm -rf samples/server/petstore/jaxrs-resteasy/eap-java8/src/main +rm -rf samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen find samples/server/petstore/jaxrs-resteasy/eap-java8 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-resteasy-eap-joda-petstore-server.sh b/bin/jaxrs-resteasy-eap-joda-petstore-server.sh index a93dd36cb75..33257cd8490 100755 --- a/bin/jaxrs-resteasy-eap-joda-petstore-server.sh +++ b/bin/jaxrs-resteasy-eap-joda-petstore-server.sh @@ -30,6 +30,7 @@ ags="$@ generate --artifact-id swagger-jaxrs-resteasy-eap-joda-server -i modules echo "Removing files and folders under samples/server/petstore/jaxrs-resteasy/eap-joda/src/main" rm -rf samples/server/petstore/jaxrs-resteasy/eap-joda/src/main +rm -rf samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen find samples/server/petstore/jaxrs-resteasy/eap-joda -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-resteasy-eap-petstore-server.sh b/bin/jaxrs-resteasy-eap-petstore-server.sh index 0444009ef73..97e18870119 100755 --- a/bin/jaxrs-resteasy-eap-petstore-server.sh +++ b/bin/jaxrs-resteasy-eap-petstore-server.sh @@ -30,6 +30,7 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml echo "Removing files and folders under samples/server/petstore/jaxrs-resteasy/eap/src/main" rm -rf samples/server/petstore/jaxrs-resteasy/eap/src/main +rm -rf samples/server/petstore/jaxrs-resteasy/eap/src/gen find samples/server/petstore/jaxrs-resteasy/eap -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-resteasy-java8-petstore-server.sh b/bin/jaxrs-resteasy-java8-petstore-server.sh index 9819f19aec1..b3e0ec18331 100755 --- a/bin/jaxrs-resteasy-java8-petstore-server.sh +++ b/bin/jaxrs-resteasy-java8-petstore-server.sh @@ -29,6 +29,7 @@ export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -Dlogback.configur ags="$@ generate --artifact-id swagger-jaxrs-resteasy-java8-server -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/java8 -DhideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-java8-petstore-server.json" echo "Removing files and folders under samples/server/petstore/jaxrs-resteasy/java8/src/main" rm -rf samples/server/petstore/jaxrs-resteasy/java8/src/main +rm -rf samples/server/petstore/jaxrs-resteasy/java8/src/gen find samples/server/petstore/jaxrs-resteasy/java8 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-resteasy-joda-petstore-server.sh b/bin/jaxrs-resteasy-joda-petstore-server.sh index 5d37fec33fb..3a4326f173a 100755 --- a/bin/jaxrs-resteasy-joda-petstore-server.sh +++ b/bin/jaxrs-resteasy-joda-petstore-server.sh @@ -29,6 +29,7 @@ export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -Dlogback.configur ags="$@ generate --artifact-id swagger-jaxrs-resteasy-joda-server -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/joda -DhideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-joda-petstore-server.json" echo "Removing files and folders under samples/server/petstore/jaxrs-resteasy/joda/src/main" rm -rf samples/server/petstore/jaxrs-resteasy/joda/src/main +rm -rf samples/server/petstore/jaxrs-resteasy/joda/src/gen find samples/server/petstore/jaxrs-resteasy/joda -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-resteasy-petstore-server.sh b/bin/jaxrs-resteasy-petstore-server.sh index ef7cb715cf3..f1b77785e7d 100755 --- a/bin/jaxrs-resteasy-petstore-server.sh +++ b/bin/jaxrs-resteasy-petstore-server.sh @@ -29,6 +29,7 @@ export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -Dlogback.configur ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/default -DhideGenerationTimestamp=true" echo "Removing files and folders under samples/server/petstore/jaxrs-resteasy/default/src/main" rm -rf samples/server/petstore/jaxrs-resteasy/default/src/main +rm -rf samples/server/petstore/jaxrs-resteasy/default/src/gen find samples/server/petstore/jaxrs-resteasy/default -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-spec-petstore-server-interface.sh b/bin/jaxrs-spec-petstore-server-interface.sh index 007c3b67810..8ccb6ff195e 100755 --- a/bin/jaxrs-spec-petstore-server-interface.sh +++ b/bin/jaxrs-spec-petstore-server-interface.sh @@ -30,5 +30,8 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with -DhideGenerationTimestamp=true -DserializableModel=true -DinterfaceOnly=true" - +echo "Removing files and folders under samples/server/petstore/jaxrs-spec-interface/src/main" +rm -rf samples/server/petstore/jaxrs-spec-interface/src/main +rm -rf samples/server/petstore/jaxrs-spec-interface/src/gen +find samples/server/petstore/jaxrs-spec-interface -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-spec-petstore-server.sh b/bin/jaxrs-spec-petstore-server.sh index 05ad5a793d1..2fa9fdcd0cb 100755 --- a/bin/jaxrs-spec-petstore-server.sh +++ b/bin/jaxrs-spec-petstore-server.sh @@ -29,5 +29,9 @@ export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -Dlogback.configur ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l jaxrs-spec -o samples/server/petstore/jaxrs-spec -DhideGenerationTimestamp=true -DserializableModel=true" +echo "Removing files and folders under samples/server/petstore/jaxrs-spec/src/main" +rm -rf samples/server/petstore/jaxrs-spec/src/main +rm -rf samples/server/petstore/jaxrs-spec/src/gen +find samples/server/petstore/jaxrs-spec -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-usetags-petstore-server.sh b/bin/jaxrs-usetags-petstore-server.sh index 0d8f987277f..47e3e205a9c 100755 --- a/bin/jaxrs-usetags-petstore-server.sh +++ b/bin/jaxrs-usetags-petstore-server.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with echo "Removing files and folders under samples/server/petstore/jaxrs/jersey2-useTags/src/main" rm -rf samples/server/petstore/jaxrs/jersey2-useTags/src/main +rm -rf samples/server/petstore/jaxrs/jersey2-useTags/src/gen find samples/server/petstore/jaxrs/jersey2-useTags -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/spring-cloud-feign-petstore-v2.sh b/bin/spring-cloud-feign-petstore-v2.sh index d996e165c22..95ef5efba8f 100755 --- a/bin/spring-cloud-feign-petstore-v2.sh +++ b/bin/spring-cloud-feign-petstore-v2.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml echo "Removing files and folders under samples/client/petstore/spring-cloud-v2/src/main" rm -rf samples/client/petstore/spring-cloud-v2/src/main +rm -rf samples/client/petstore/spring-cloud-v2/src/gen find samples/client/petstore/spring-cloud-v2 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/spring-cloud-feign-petstore.sh b/bin/spring-cloud-feign-petstore.sh index 66c7cafe68e..dd30fb2cfe4 100755 --- a/bin/spring-cloud-feign-petstore.sh +++ b/bin/spring-cloud-feign-petstore.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml echo "Removing files and folders under samples/client/petstore/spring-cloud/src/main" rm -rf samples/client/petstore/spring-cloud/src/main +rm -rf samples/client/petstore/spring-cloud/src/gen find samples/client/petstore/spring-cloud -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/spring-delegate-j8.sh b/bin/spring-delegate-j8.sh index d1ee7720b4c..ef83f871b31 100755 --- a/bin/spring-delegate-j8.sh +++ b/bin/spring-delegate-j8.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with echo "Removing files and folders under samples/server/petstore/springboot-delegate-j8/src/main" rm -rf samples/server/petstore/springboot-delegate-j8/src/main +rm -rf samples/server/petstore/springboot-delegate-j8/src/gen find samples/server/petstore/springboot-delegate-j8/ -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/spring-delegate.sh b/bin/spring-delegate.sh index 5ecafc6ed27..f79079f6b74 100755 --- a/bin/spring-delegate.sh +++ b/bin/spring-delegate.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with echo "Removing files and folders under samples/server/petstore/springboot-delegate/src/main" rm -rf samples/server/petstore/springboot-delegate/src/main +rm -rf samples/server/petstore/springboot-delegate/src/gen find samples/server/petstore/springboot-delegate/ -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/spring-mvc-petstore-j8-async-server.sh b/bin/spring-mvc-petstore-j8-async-server.sh index 0e9f1ef81a1..ca83a660a5b 100755 --- a/bin/spring-mvc-petstore-j8-async-server.sh +++ b/bin/spring-mvc-petstore-j8-async-server.sh @@ -27,5 +27,9 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -Dlogback.configurationFile=bin/logback.xml" ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l spring -o samples/server/petstore/spring-mvc-j8-async -c bin/spring-mvc-petstore-j8-async.json -DhideGenerationTimestamp=true,java8=true,async=true" +echo "Removing files and folders under samples/server/petstore/spring-mvc-j8-async/src/main" +rm -rf samples/server/petstore/spring-mvc-j8-async/src/main +rm -rf samples/server/petstore/spring-mvc-j8-async/src/gen +find samples/server/petstore/spring-mvc-j8-async -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/spring-mvc-petstore-server.sh b/bin/spring-mvc-petstore-server.sh index 007f5580c4e..e72cdd97cac 100755 --- a/bin/spring-mvc-petstore-server.sh +++ b/bin/spring-mvc-petstore-server.sh @@ -29,6 +29,7 @@ export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -Dlogback.configur ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l spring -c bin/spring-mvc-petstore-server.json -o samples/server/petstore/spring-mvc -DhideGenerationTimestamp=true" echo "Removing files and folders under samples/server/petstore/spring-mvc/src/main" rm -rf samples/server/petstore/spring-mvc/src/main +rm -rf samples/server/petstore/spring-mvc/src/gen find samples/server/petstore/spring-mvc -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/spring-stubs.sh b/bin/spring-stubs.sh index ed915a61337..9abab75121e 100755 --- a/bin/spring-stubs.sh +++ b/bin/spring-stubs.sh @@ -27,4 +27,9 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -Dlogback.configurationFile=bin/logback.xml" ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l spring -o samples/client/petstore/spring-stubs -DinterfaceOnly=true,singleContentTypes=true,hideGenerationTimestamp=true" +echo "Removing files and folders under samples/client/petstore/spring-stubs/src/main" +rm -rf samples/client/petstore/spring-stubs/src/main +rm -rf samples/client/petstore/spring-stubs/src/gen +find samples/client/petstore/spring-stubs -maxdepth 1 -type f ! -name "README.md" -exec rm {} + + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/springboot-petstore-server-beanvalidation.sh b/bin/springboot-petstore-server-beanvalidation.sh index 970abf765cd..8c84b8ba743 100755 --- a/bin/springboot-petstore-server-beanvalidation.sh +++ b/bin/springboot-petstore-server-beanvalidation.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml echo "Removing files and folders under samples/server/petstore/springboot-beanvalidation/src/main" rm -rf samples/server/petstore/springboot-beanvalidation/src/main +rm -rf samples/server/petstore/springboot-beanvalidation/src/gen find samples/server/petstore/springboot-beanvalidation -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/springboot-petstore-server-implicitHeaders.sh b/bin/springboot-petstore-server-implicitHeaders.sh index 1b2c28ba35b..c146b48a531 100755 --- a/bin/springboot-petstore-server-implicitHeaders.sh +++ b/bin/springboot-petstore-server-implicitHeaders.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml echo "Removing files and folders under samples/server/petstore/springboot-implicitHeaders/src/main" rm -rf samples/server/petstore/springboot-implicitHeaders/src/main +rm -rf samples/server/petstore/springboot-implicitHeaders/src/gen find samples/server/petstore/springboot-implicitHeaders -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/springboot-petstore-server-useOptional.sh b/bin/springboot-petstore-server-useOptional.sh index 8f4914790c9..c6d42f65189 100755 --- a/bin/springboot-petstore-server-useOptional.sh +++ b/bin/springboot-petstore-server-useOptional.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml echo "Removing files and folders under samples/server/petstore/springboot-useoptional/src/main" rm -rf samples/server/petstore/springboot-useoptional/src/main +rm -rf samples/server/petstore/springboot-useoptional/src/gen find samples/server/petstore/springboot-useoptional -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/springboot-petstore-server-v2-no-default.sh b/bin/springboot-petstore-server-v2-no-default.sh index 5d955294279..00feb7d8b34 100755 --- a/bin/springboot-petstore-server-v2-no-default.sh +++ b/bin/springboot-petstore-server-v2-no-default.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml echo "Removing files and folders under samples/server/petstore/springboot-v2-nodefault/src/main" rm -rf samples/server/petstore/springboot-v2-nodefault/src/main +rm -rf samples/server/petstore/springboot-v2-nodefault/src/gen find samples/server/petstore/springboot-v2-nodefault -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/springboot-petstore-server-v2.sh b/bin/springboot-petstore-server-v2.sh index b07a96f3134..a8c33590941 100755 --- a/bin/springboot-petstore-server-v2.sh +++ b/bin/springboot-petstore-server-v2.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml echo "Removing files and folders under samples/server/petstore/springboot-v2/src/main" rm -rf samples/server/petstore/springboot-v2/src/main +rm -rf samples/server/petstore/springboot-v2/src/gen find samples/server/petstore/springboot-v2 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/bin/springboot-petstore-server.sh b/bin/springboot-petstore-server.sh index 471a601f385..f23c4ef710b 100755 --- a/bin/springboot-petstore-server.sh +++ b/bin/springboot-petstore-server.sh @@ -30,5 +30,6 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml echo "Removing files and folders under samples/server/petstore/springboot/src/main" rm -rf samples/server/petstore/springboot/src/main +rm -rf samples/server/petstore/springboot/src/gen find samples/server/petstore/springboot -maxdepth 1 -type f ! -name "README.md" -exec rm {} + java $JAVA_OPTS -jar $executable $ags diff --git a/samples/client/petstore/java/feign/.swagger-codegen/VERSION b/samples/client/petstore/java/feign/.swagger-codegen/VERSION index 8ea7a72a83e..a81b3f2a0b8 100644 --- a/samples/client/petstore/java/feign/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/feign/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.11-SNAPSHOT \ No newline at end of file +3.0.12-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Animal.java index f5a3a37d700..a0c711f26ac 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Animal.java @@ -17,6 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; @@ -31,7 +32,7 @@ }) public class Animal { - @JsonProperty("className") + @JsonTypeId private String className = null; @JsonProperty("color") diff --git a/samples/client/petstore/java/jersey1/.swagger-codegen/VERSION b/samples/client/petstore/java/jersey1/.swagger-codegen/VERSION index 8ea7a72a83e..a81b3f2a0b8 100644 --- a/samples/client/petstore/java/jersey1/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/jersey1/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.11-SNAPSHOT \ No newline at end of file +3.0.12-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey1/docs/SinglePetResponse.md b/samples/client/petstore/java/jersey1/docs/SinglePetResponse.md index 9415d48136e..1b2685bb393 100644 --- a/samples/client/petstore/java/jersey1/docs/SinglePetResponse.md +++ b/samples/client/petstore/java/jersey1/docs/SinglePetResponse.md @@ -3,4 +3,4 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pet** | [**OneOfSinglePetResponsePet**](.md) | | [optional] +**pet** | [**OneOfSinglePetResponsePet**](OneOfSinglePetResponsePet.md) | | [optional] diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Animal.java index f5a3a37d700..a0c711f26ac 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Animal.java @@ -17,6 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; @@ -31,7 +32,7 @@ }) public class Animal { - @JsonProperty("className") + @JsonTypeId private String className = null; @JsonProperty("color") diff --git a/samples/client/petstore/java/jersey2-java6/.swagger-codegen/VERSION b/samples/client/petstore/java/jersey2-java6/.swagger-codegen/VERSION index 8ea7a72a83e..a81b3f2a0b8 100644 --- a/samples/client/petstore/java/jersey2-java6/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/jersey2-java6/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.11-SNAPSHOT \ No newline at end of file +3.0.12-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Animal.java index f847471b094..a011e38bb53 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Animal.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; @@ -30,7 +31,7 @@ }) public class Animal { - @JsonProperty("className") + @JsonTypeId private String className = null; @JsonProperty("color") diff --git a/samples/client/petstore/java/jersey2-java8/docs/SinglePetResponse.md b/samples/client/petstore/java/jersey2-java8/docs/SinglePetResponse.md index a838236439c..1b2685bb393 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/SinglePetResponse.md +++ b/samples/client/petstore/java/jersey2-java8/docs/SinglePetResponse.md @@ -3,4 +3,4 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pet** | [**Object**](.md) | | [optional] +**pet** | [**OneOfSinglePetResponsePet**](OneOfSinglePetResponsePet.md) | | [optional] diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Cat.java index 4f1a8d20372..1884158dc6d 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Cat.java @@ -24,7 +24,7 @@ */ -public class Cat extends Animal implements OneOfAllPetsResponseItems { +public class Cat extends Animal implements OneOfAllPetsResponseItems, OneOfSinglePetResponsePet { @JsonProperty("declawed") private Boolean declawed = null; diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Dog.java index 1090455c466..e9a493f798a 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Dog.java @@ -24,7 +24,7 @@ */ -public class Dog extends Animal implements OneOfAllPetsResponseItems { +public class Dog extends Animal implements OneOfAllPetsResponseItems, OneOfSinglePetResponsePet { @JsonProperty("breed") private String breed = null; diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/OneOfSinglePetResponsePet.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/OneOfSinglePetResponsePet.java new file mode 100644 index 00000000000..cf417718aa8 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/OneOfSinglePetResponsePet.java @@ -0,0 +1,20 @@ +/* + * 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; + +/** +* OneOfSinglePetResponsePet +*/ +public interface OneOfSinglePetResponsePet { + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/SinglePetResponse.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/SinglePetResponse.java index a13360ed77a..440c7f3d660 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/SinglePetResponse.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/SinglePetResponse.java @@ -17,6 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.client.model.OneOfSinglePetResponsePet; import io.swagger.v3.oas.annotations.media.Schema; /** * SinglePetResponse @@ -25,9 +26,9 @@ public class SinglePetResponse { @JsonProperty("pet") - private Object pet = null; + private OneOfSinglePetResponsePet pet = null; - public SinglePetResponse pet(Object pet) { + public SinglePetResponse pet(OneOfSinglePetResponsePet pet) { this.pet = pet; return this; } @@ -37,11 +38,11 @@ public SinglePetResponse pet(Object pet) { * @return pet **/ @Schema(description = "") - public Object getPet() { + public OneOfSinglePetResponsePet getPet() { return pet; } - public void setPet(Object pet) { + public void setPet(OneOfSinglePetResponsePet pet) { this.pet = pet; } diff --git a/samples/client/petstore/java/jersey2/.swagger-codegen/VERSION b/samples/client/petstore/java/jersey2/.swagger-codegen/VERSION index 8ea7a72a83e..a81b3f2a0b8 100644 --- a/samples/client/petstore/java/jersey2/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/jersey2/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.11-SNAPSHOT \ No newline at end of file +3.0.12-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2/docs/SinglePetResponse.md b/samples/client/petstore/java/jersey2/docs/SinglePetResponse.md index 9415d48136e..1b2685bb393 100644 --- a/samples/client/petstore/java/jersey2/docs/SinglePetResponse.md +++ b/samples/client/petstore/java/jersey2/docs/SinglePetResponse.md @@ -3,4 +3,4 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pet** | [**OneOfSinglePetResponsePet**](.md) | | [optional] +**pet** | [**OneOfSinglePetResponsePet**](OneOfSinglePetResponsePet.md) | | [optional] diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Animal.java index f5a3a37d700..a0c711f26ac 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Animal.java @@ -17,6 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; @@ -31,7 +32,7 @@ }) public class Animal { - @JsonProperty("className") + @JsonTypeId private String className = null; @JsonProperty("color") diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/.swagger-codegen/VERSION b/samples/client/petstore/java/okhttp-gson-parcelableModel/.swagger-codegen/VERSION index da9c01e979a..a81b3f2a0b8 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.6-SNAPSHOT \ No newline at end of file +3.0.12-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AllPetsResponse.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AllPetsResponse.md new file mode 100644 index 00000000000..ad463bea3e3 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AllPetsResponse.md @@ -0,0 +1,5 @@ +# AllPetsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/OneOfAllPetsResponseItems.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/OneOfAllPetsResponseItems.md new file mode 100644 index 00000000000..6b4fffdb0a0 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/OneOfAllPetsResponseItems.md @@ -0,0 +1,5 @@ +# OneOfAllPetsResponseItems + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/OneOfSinglePetResponsePet.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/OneOfSinglePetResponsePet.md new file mode 100644 index 00000000000..e3a964f0c13 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/OneOfSinglePetResponsePet.md @@ -0,0 +1,5 @@ +# OneOfSinglePetResponsePet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md index 7dff282d120..4ce8d26d6cf 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md @@ -8,7 +8,9 @@ Method | HTTP request | Description [**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 +[**getAllPets**](PetApi.md#getAllPets) | **GET** /allPets | [**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID +[**getRandomPet**](PetApi.md#getRandomPet) | **GET** /randomPet | [**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 @@ -221,6 +223,45 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json + +# **getAllPets** +> AllPetsResponse getAllPets() + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.PetApi; + + +PetApi apiInstance = new PetApi(); +try { + AllPetsResponse result = apiInstance.getAllPets(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#getAllPets"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**AllPetsResponse**](AllPetsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + # **getPetById** > Pet getPetById(petId) @@ -276,6 +317,45 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json + +# **getRandomPet** +> SinglePetResponse getRandomPet() + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.PetApi; + + +PetApi apiInstance = new PetApi(); +try { + SinglePetResponse result = apiInstance.getRandomPet(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling PetApi#getRandomPet"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SinglePetResponse**](SinglePetResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + # **updatePet** > updatePet(body) diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/SinglePetResponse.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/SinglePetResponse.md new file mode 100644 index 00000000000..1b2685bb393 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/SinglePetResponse.md @@ -0,0 +1,6 @@ +# SinglePetResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pet** | [**OneOfSinglePetResponsePet**](OneOfSinglePetResponsePet.md) | | [optional] diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/StoreApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/StoreApi.md index 3e96f9c4c81..1c551b3af36 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/StoreApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/StoreApi.md @@ -93,7 +93,7 @@ This endpoint does not need any parameter. ### Return type -[**Map<String, Integer>**](Map.md) +**Map<String, Integer>** ### Authorization diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/JSON.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/JSON.java index c60622c8be7..716217f9a38 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/JSON.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/JSON.java @@ -15,7 +15,9 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonElement; +import com.google.gson.JsonObject; import io.gsonfire.GsonFireBuilder; +import io.gsonfire.PostProcessor; import io.gsonfire.TypeSelector; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapter; @@ -52,7 +54,6 @@ public static GsonBuilder createGson() { @Override public Class getClassForElement(JsonElement readElement) { Map> classByDiscriminatorValue = new HashMap<>(); - classByDiscriminatorValue.put("Cat".toUpperCase(), Cat.class); classByDiscriminatorValue.put("Dog".toUpperCase(), Dog.class); classByDiscriminatorValue.put("Animal".toUpperCase(), Animal.class); @@ -61,6 +62,27 @@ public Class getClassForElement(JsonElement readElement) { getDiscriminatorValue(readElement, "className")); } }) + .registerPostProcessor(Animal.class, new PostProcessor() { + @Override + public void postDeserialize(Animal result, JsonElement src, Gson gson) { + + } + + @Override + public void postSerialize(JsonElement result, Animal src, Gson gson) { + Map, String> discriminatorValueByClass = new HashMap<>(); + discriminatorValueByClass.put(Cat.class, "Cat"); + discriminatorValueByClass.put(Dog.class, "Dog"); + discriminatorValueByClass.put(Animal.class, "Animal"); + if(result instanceof JsonObject) + { + if(!((JsonObject) result).has("className")) + { + ((JsonObject) result).addProperty("className", discriminatorValueByClass.get(src.getClass())); + } + } + } + }) ; return fireBuilder.createGsonBuilder(); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/PetApi.java index 8c96da2bce8..f55759a5668 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/PetApi.java @@ -26,9 +26,11 @@ import java.io.IOException; +import io.swagger.client.model.AllPetsResponse; import java.io.File; import io.swagger.client.model.ModelApiResponse; import io.swagger.client.model.Pet; +import io.swagger.client.model.SinglePetResponse; import java.lang.reflect.Type; import java.util.ArrayList; @@ -554,6 +556,122 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for getAllPets + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getAllPetsCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/allPets"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getAllPetsValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + com.squareup.okhttp.Call call = getAllPetsCall(progressListener, progressRequestListener); + return call; + + + + + + } + + /** + * + * + * @return AllPetsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public AllPetsResponse getAllPets() throws ApiException { + ApiResponse resp = getAllPetsWithHttpInfo(); + return resp.getData(); + } + + /** + * + * + * @return ApiResponse<AllPetsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getAllPetsWithHttpInfo() throws ApiException { + com.squareup.okhttp.Call call = getAllPetsValidateBeforeCall(null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * (asynchronously) + * + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getAllPetsAsync(final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getAllPetsValidateBeforeCall(progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for getPetById * @param petId ID of pet to return (required) @@ -679,6 +797,122 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for getRandomPet + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getRandomPetCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/randomPet"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getRandomPetValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + com.squareup.okhttp.Call call = getRandomPetCall(progressListener, progressRequestListener); + return call; + + + + + + } + + /** + * + * + * @return SinglePetResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public SinglePetResponse getRandomPet() throws ApiException { + ApiResponse resp = getRandomPetWithHttpInfo(); + return resp.getData(); + } + + /** + * + * + * @return ApiResponse<SinglePetResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getRandomPetWithHttpInfo() throws ApiException { + com.squareup.okhttp.Call call = getRandomPetValidateBeforeCall(null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * (asynchronously) + * + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getRandomPetAsync(final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getRandomPetValidateBeforeCall(progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for updatePet * @param body Pet object that needs to be added to the store (required) diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java index 03642a91bf0..2dc1666fb56 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -25,24 +26,25 @@ import java.util.Map; import android.os.Parcelable; import android.os.Parcel; - /** * AdditionalPropertiesClass */ -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass implements Parcelable { @SerializedName("map_property") private Map mapProperty = null; @SerializedName("map_of_map_property") private Map> mapOfMapProperty = null; + + public AdditionalPropertiesClass() { + } public AdditionalPropertiesClass mapProperty(Map mapProperty) { this.mapProperty = mapProperty; return this; } - public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) { if (this.mapProperty == null) { this.mapProperty = new HashMap(); @@ -50,23 +52,25 @@ public AdditionalPropertiesClass putMapPropertyItem(String key, String mapProper this.mapProperty.put(key, mapPropertyItem); return this; } - /** - * Get mapProperty - * @return mapProperty + + /** + * Get mapProperty + * @return mapProperty **/ @Schema(description = "") public Map getMapProperty() { return mapProperty; } + public void setMapProperty(Map mapProperty) { this.mapProperty = mapProperty; } + public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { this.mapOfMapProperty = mapOfMapProperty; return this; } - public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map mapOfMapPropertyItem) { if (this.mapOfMapProperty == null) { this.mapOfMapProperty = new HashMap>(); @@ -74,17 +78,21 @@ public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map> getMapOfMapProperty() { return mapOfMapProperty; } + public void setMapOfMapProperty(Map> mapOfMapProperty) { this.mapOfMapProperty = mapOfMapProperty; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -100,9 +108,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(mapProperty, mapOfMapProperty); + return Objects.hash(mapProperty, mapOfMapProperty); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -125,21 +134,14 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(mapProperty); out.writeValue(mapOfMapProperty); } - public AdditionalPropertiesClass() { - super(); - } - AdditionalPropertiesClass(Parcel in) { - mapProperty = (Map)in.readValue(null); - - mapOfMapProperty = (Map>)in.readValue(Map.class.getClassLoader()); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/AllPetsResponse.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/AllPetsResponse.java new file mode 100644 index 00000000000..4a0b9507c95 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/AllPetsResponse.java @@ -0,0 +1,92 @@ +/* + * 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; +import io.swagger.client.model.OneOfAllPetsResponseItems; +import java.util.ArrayList; +import java.util.List; +import android.os.Parcelable; +import android.os.Parcel; +/** + * AllPetsResponse + */ + + +public class AllPetsResponse extends ArrayList implements Parcelable { + public AllPetsResponse() { + super(); + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllPetsResponse {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public void writeToParcel(Parcel out, int flags) { + out.writeList(this); + } + + AllPetsResponse(Parcel in) { + in.readTypedList(this, OneOfAllPetsResponseItems.CREATOR); + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { + public AllPetsResponse createFromParcel(Parcel in) { + AllPetsResponse result = new AllPetsResponse(); + result.addAll(in.readArrayList(OneOfAllPetsResponseItems.class.getClassLoader())); + return result; + } + public AllPetsResponse[] newArray(int size) { + return new AllPetsResponse[size]; + } + }; +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Animal.java index 1116c7a82e6..978c09033df 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Animal.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,55 +23,59 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * Animal */ -public class Animal { +public class Animal implements Parcelable { @SerializedName("className") private String className = null; @SerializedName("color") private String color = "red"; + + public Animal() { + this.className = this.getClass().getSimpleName(); + } public Animal className(String className) { this.className = className; return this; } - - - /** - * Get className - * @return className + /** + * Get className + * @return className **/ @Schema(required = true, description = "") public String getClassName() { return className; } + public void setClassName(String className) { this.className = className; } + public Animal color(String color) { this.color = color; return this; } - - - /** - * Get color - * @return color + /** + * Get color + * @return color **/ @Schema(description = "") public String getColor() { return color; } + public void setColor(String color) { this.color = color; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -86,9 +91,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(className, color); + return Objects.hash(className, color); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -111,22 +117,15 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(className); out.writeValue(color); } - public Animal() { - super(); - } - Animal(Parcel in) { - className = (String)in.readValue(null); - color = (String)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/AnimalFarm.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/AnimalFarm.java index 6a3a7ce0ae9..1bade42d3c4 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/AnimalFarm.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/AnimalFarm.java @@ -13,17 +13,22 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import io.swagger.client.model.Animal; import java.util.ArrayList; import java.util.List; import android.os.Parcelable; import android.os.Parcel; - /** * AnimalFarm */ -public class AnimalFarm extends ArrayList { + +public class AnimalFarm extends ArrayList implements Parcelable { + public AnimalFarm() { + super(); + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -37,9 +42,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode()); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -60,14 +66,13 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } - public void writeToParcel(Parcel out, int flags) { - } - public AnimalFarm() { - super(); + public void writeToParcel(Parcel out, int flags) { + out.writeList(this); } AnimalFarm(Parcel in) { + in.readTypedList(this, Animal.CREATOR); } public int describeContents() { @@ -76,7 +81,9 @@ public int describeContents() { public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { public AnimalFarm createFromParcel(Parcel in) { - return new AnimalFarm(in); + AnimalFarm result = new AnimalFarm(); + result.addAll(in.readArrayList(Animal.class.getClassLoader())); + return result; } public AnimalFarm[] newArray(int size) { return new AnimalFarm[size]; diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java index 60fbd5a6ab3..ed594fc4861 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -25,15 +26,17 @@ import java.util.List; import android.os.Parcelable; import android.os.Parcel; - /** * ArrayOfArrayOfNumberOnly */ -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly implements Parcelable { @SerializedName("ArrayArrayNumber") private List> arrayArrayNumber = null; + + public ArrayOfArrayOfNumberOnly() { + } public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; return this; @@ -47,17 +50,20 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr return this; } - /** - * Get arrayArrayNumber - * @return arrayArrayNumber + /** + * Get arrayArrayNumber + * @return arrayArrayNumber **/ @Schema(description = "") public List> getArrayArrayNumber() { return arrayArrayNumber; } + public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -72,9 +78,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(arrayArrayNumber); + return Objects.hash(arrayArrayNumber); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -96,18 +103,12 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(arrayArrayNumber); } - public ArrayOfArrayOfNumberOnly() { - super(); - } - ArrayOfArrayOfNumberOnly(Parcel in) { - - arrayArrayNumber = (List>)in.readValue(List.class.getClassLoader()); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java index 0205c64e9f6..e162599322b 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -25,15 +26,17 @@ import java.util.List; import android.os.Parcelable; import android.os.Parcel; - /** * ArrayOfNumberOnly */ -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly implements Parcelable { @SerializedName("ArrayNumber") private List arrayNumber = null; + + public ArrayOfNumberOnly() { + } public ArrayOfNumberOnly arrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; return this; @@ -47,17 +50,20 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { return this; } - /** - * Get arrayNumber - * @return arrayNumber + /** + * Get arrayNumber + * @return arrayNumber **/ @Schema(description = "") public List getArrayNumber() { return arrayNumber; } + public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -72,9 +78,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(arrayNumber); + return Objects.hash(arrayNumber); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -96,18 +103,12 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(arrayNumber); } - public ArrayOfNumberOnly() { - super(); - } - ArrayOfNumberOnly(Parcel in) { - - arrayNumber = (List)in.readValue(BigDecimal.class.getClassLoader()); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayTest.java index 3b81858abd1..e60cb3e2242 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayTest.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -25,13 +26,12 @@ import java.util.List; import android.os.Parcelable; import android.os.Parcel; - /** * ArrayTest */ -public class ArrayTest { +public class ArrayTest implements Parcelable { @SerializedName("array_of_string") private List arrayOfString = null; @@ -40,6 +40,9 @@ public class ArrayTest { @SerializedName("array_array_of_model") private List> arrayArrayOfModel = null; + + public ArrayTest() { + } public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; return this; @@ -53,17 +56,19 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { return this; } - /** - * Get arrayOfString - * @return arrayOfString + /** + * Get arrayOfString + * @return arrayOfString **/ @Schema(description = "") public List getArrayOfString() { return arrayOfString; } + public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } + public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; return this; @@ -77,17 +82,19 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) return this; } - /** - * Get arrayArrayOfInteger - * @return arrayArrayOfInteger + /** + * Get arrayArrayOfInteger + * @return arrayArrayOfInteger **/ @Schema(description = "") public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } + public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; @@ -101,17 +108,20 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI return this; } - /** - * Get arrayArrayOfModel - * @return arrayArrayOfModel + /** + * Get arrayArrayOfModel + * @return arrayArrayOfModel **/ @Schema(description = "") public List> getArrayArrayOfModel() { return arrayArrayOfModel; } + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -128,9 +138,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); + return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -154,24 +165,16 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(arrayOfString); out.writeValue(arrayArrayOfInteger); out.writeValue(arrayArrayOfModel); } - public ArrayTest() { - super(); - } - ArrayTest(Parcel in) { - arrayOfString = (List)in.readValue(null); - - arrayArrayOfInteger = (List>)in.readValue(List.class.getClassLoader()); - arrayArrayOfModel = (List>)in.readValue(List.class.getClassLoader()); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body.java index ea90d1beb86..c4a784294c6 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,54 +23,57 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * Body */ -public class Body { +public class Body implements Parcelable { @SerializedName("name") private String name = null; @SerializedName("status") private String status = null; + + public Body() { + } public Body name(String name) { this.name = name; return this; } - - - /** - * Updated name of the pet - * @return name + /** + * Updated name of the pet + * @return name **/ @Schema(description = "Updated name of the pet") public String getName() { return name; } + public void setName(String name) { this.name = name; } + public Body status(String status) { this.status = status; return this; } - - - /** - * Updated status of the pet - * @return status + /** + * Updated status of the pet + * @return status **/ @Schema(description = "Updated status of the pet") public String getStatus() { return status; } + public void setStatus(String status) { this.status = status; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -85,9 +89,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(name, status); + return Objects.hash(name, status); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -110,22 +115,15 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(name); out.writeValue(status); } - public Body() { - super(); - } - Body(Parcel in) { - name = (String)in.readValue(null); - status = (String)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body1.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body1.java index 753cfa8ec6a..d80e659e9cc 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body1.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body1.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,54 +24,57 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * Body1 */ -public class Body1 { +public class Body1 implements Parcelable { @SerializedName("additionalMetadata") private String additionalMetadata = null; @SerializedName("file") private File file = null; + + public Body1() { + } public Body1 additionalMetadata(String additionalMetadata) { this.additionalMetadata = additionalMetadata; return this; } - - - /** - * Additional data to pass to server - * @return additionalMetadata + /** + * Additional data to pass to server + * @return additionalMetadata **/ @Schema(description = "Additional data to pass to server") public String getAdditionalMetadata() { return additionalMetadata; } + public void setAdditionalMetadata(String additionalMetadata) { this.additionalMetadata = additionalMetadata; } + public Body1 file(File file) { this.file = file; return this; } - - - /** - * file to upload - * @return file + /** + * file to upload + * @return file **/ @Schema(description = "file to upload") public File getFile() { return file; } + public void setFile(File file) { this.file = file; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -86,9 +90,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(additionalMetadata, file); + return Objects.hash(additionalMetadata, Objects.hashCode(file)); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -111,21 +116,14 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(additionalMetadata); out.writeValue(file); } - public Body1() { - super(); - } - Body1(Parcel in) { - additionalMetadata = (String)in.readValue(null); - - file = (File)in.readValue(File.class.getClassLoader()); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body2.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body2.java index e32c907eec2..5702bbfa4e3 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body2.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body2.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -26,13 +27,12 @@ import org.threeten.bp.OffsetDateTime; import android.os.Parcelable; import android.os.Parcel; - /** * Body2 */ -public class Body2 { +public class Body2 implements Parcelable { @SerializedName("integer") private Integer integer = null; @@ -74,267 +74,271 @@ public class Body2 { @SerializedName("callback") private String callback = null; + + public Body2() { + } public Body2 integer(Integer integer) { this.integer = integer; return this; } - - - /** - * None - * minimum: 10 - * maximum: 100 - * @return integer + /** + * None + * minimum: 10 + * maximum: 100 + * @return integer **/ @Schema(description = "None") public Integer getInteger() { return integer; } + public void setInteger(Integer integer) { this.integer = integer; } + public Body2 int32(Integer int32) { this.int32 = int32; return this; } - - - /** - * None - * minimum: 20 - * maximum: 200 - * @return int32 + /** + * None + * minimum: 20 + * maximum: 200 + * @return int32 **/ @Schema(description = "None") public Integer getInt32() { return int32; } + public void setInt32(Integer int32) { this.int32 = int32; } + public Body2 int64(Long int64) { this.int64 = int64; return this; } - - - /** - * None - * @return int64 + /** + * None + * @return int64 **/ @Schema(description = "None") public Long getInt64() { return int64; } + public void setInt64(Long int64) { this.int64 = int64; } + public Body2 number(BigDecimal number) { this.number = number; return this; } - - - /** - * None - * minimum: 32 - * maximum: 543 - * @return number + /** + * None + * minimum: 32 + * maximum: 543 + * @return number **/ @Schema(required = true, description = "None") public BigDecimal getNumber() { return number; } + public void setNumber(BigDecimal number) { this.number = number; } + public Body2 _float(Float _float) { this._float = _float; return this; } - - - /** - * None - * maximum: 987 - * @return _float + /** + * None + * maximum: 987 + * @return _float **/ @Schema(description = "None") public Float getFloat() { return _float; } + public void setFloat(Float _float) { this._float = _float; } + public Body2 _double(Double _double) { this._double = _double; return this; } - - - /** - * None - * minimum: 67 - * maximum: 123 - * @return _double + /** + * None + * minimum: 67 + * maximum: 123 + * @return _double **/ @Schema(required = true, description = "None") public Double getDouble() { return _double; } + public void setDouble(Double _double) { this._double = _double; } + public Body2 string(String string) { this.string = string; return this; } - - - /** - * None - * @return string + /** + * None + * @return string **/ @Schema(description = "None") public String getString() { return string; } + public void setString(String string) { this.string = string; } + public Body2 patternWithoutDelimiter(String patternWithoutDelimiter) { this.patternWithoutDelimiter = patternWithoutDelimiter; return this; } - - - /** - * None - * @return patternWithoutDelimiter + /** + * None + * @return patternWithoutDelimiter **/ @Schema(required = true, description = "None") public String getPatternWithoutDelimiter() { return patternWithoutDelimiter; } + public void setPatternWithoutDelimiter(String patternWithoutDelimiter) { this.patternWithoutDelimiter = patternWithoutDelimiter; } + public Body2 _byte(byte[] _byte) { this._byte = _byte; return this; } - - - /** - * None - * @return _byte + /** + * None + * @return _byte **/ @Schema(required = true, description = "None") public byte[] getByte() { return _byte; } + public void setByte(byte[] _byte) { this._byte = _byte; } + public Body2 binary(File binary) { this.binary = binary; return this; } - - - /** - * None - * @return binary + /** + * None + * @return binary **/ @Schema(description = "None") public File getBinary() { return binary; } + public void setBinary(File binary) { this.binary = binary; } + public Body2 date(LocalDate date) { this.date = date; return this; } - - - /** - * None - * @return date + /** + * None + * @return date **/ @Schema(description = "None") public LocalDate getDate() { return date; } + public void setDate(LocalDate date) { this.date = date; } + public Body2 dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; return this; } - - - /** - * None - * @return dateTime + /** + * None + * @return dateTime **/ @Schema(description = "None") public OffsetDateTime getDateTime() { return dateTime; } + public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } + public Body2 password(String password) { this.password = password; return this; } - - - /** - * None - * @return password + /** + * None + * @return password **/ @Schema(description = "None") public String getPassword() { return password; } + public void setPassword(String password) { this.password = password; } + public Body2 callback(String callback) { this.callback = callback; return this; } - - - /** - * None - * @return callback + /** + * None + * @return callback **/ @Schema(description = "None") public String getCallback() { return callback; } + public void setCallback(String callback) { this.callback = callback; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -352,7 +356,7 @@ public boolean equals(java.lang.Object o) { Objects.equals(this._double, body2._double) && Objects.equals(this.string, body2.string) && Objects.equals(this.patternWithoutDelimiter, body2.patternWithoutDelimiter) && - Objects.equals(this._byte, body2._byte) && + Arrays.equals(this._byte, body2._byte) && Objects.equals(this.binary, body2.binary) && Objects.equals(this.date, body2.date) && Objects.equals(this.dateTime, body2.dateTime) && @@ -362,9 +366,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(integer, int32, int64, number, _float, _double, string, patternWithoutDelimiter, _byte, binary, date, dateTime, password, callback); + return Objects.hash(integer, int32, int64, number, _float, _double, string, patternWithoutDelimiter, Arrays.hashCode(_byte), Objects.hashCode(binary), date, dateTime, password, callback); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -399,8 +404,8 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(integer); out.writeValue(int32); out.writeValue(int64); @@ -417,40 +422,21 @@ public void writeToParcel(Parcel out, int flags) { out.writeValue(callback); } - public Body2() { - super(); - } - Body2(Parcel in) { - integer = (Integer)in.readValue(null); - int32 = (Integer)in.readValue(null); - int64 = (Long)in.readValue(null); - - number = (BigDecimal)in.readValue(BigDecimal.class.getClassLoader()); _float = (Float)in.readValue(null); - _double = (Double)in.readValue(null); - string = (String)in.readValue(null); - patternWithoutDelimiter = (String)in.readValue(null); - _byte = (byte[])in.readValue(null); - - binary = (File)in.readValue(File.class.getClassLoader()); - date = (LocalDate)in.readValue(LocalDate.class.getClassLoader()); - dateTime = (OffsetDateTime)in.readValue(OffsetDateTime.class.getClassLoader()); password = (String)in.readValue(null); - callback = (String)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body3.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body3.java index b0e7514d2a8..627aa440519 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body3.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body3.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -26,13 +27,12 @@ import org.threeten.bp.OffsetDateTime; import android.os.Parcelable; import android.os.Parcel; - /** * Body3 */ -public class Body3 { +public class Body3 implements Parcelable { @SerializedName("integer") private Integer integer = null; @@ -74,267 +74,271 @@ public class Body3 { @SerializedName("callback") private String callback = null; + + public Body3() { + } public Body3 integer(Integer integer) { this.integer = integer; return this; } - - - /** - * None - * minimum: 10 - * maximum: 100 - * @return integer + /** + * None + * minimum: 10 + * maximum: 100 + * @return integer **/ @Schema(description = "None") public Integer getInteger() { return integer; } + public void setInteger(Integer integer) { this.integer = integer; } + public Body3 int32(Integer int32) { this.int32 = int32; return this; } - - - /** - * None - * minimum: 20 - * maximum: 200 - * @return int32 + /** + * None + * minimum: 20 + * maximum: 200 + * @return int32 **/ @Schema(description = "None") public Integer getInt32() { return int32; } + public void setInt32(Integer int32) { this.int32 = int32; } + public Body3 int64(Long int64) { this.int64 = int64; return this; } - - - /** - * None - * @return int64 + /** + * None + * @return int64 **/ @Schema(description = "None") public Long getInt64() { return int64; } + public void setInt64(Long int64) { this.int64 = int64; } + public Body3 number(BigDecimal number) { this.number = number; return this; } - - - /** - * None - * minimum: 32 - * maximum: 543 - * @return number + /** + * None + * minimum: 32 + * maximum: 543 + * @return number **/ @Schema(required = true, description = "None") public BigDecimal getNumber() { return number; } + public void setNumber(BigDecimal number) { this.number = number; } + public Body3 _float(Float _float) { this._float = _float; return this; } - - - /** - * None - * maximum: 987 - * @return _float + /** + * None + * maximum: 987 + * @return _float **/ @Schema(description = "None") public Float getFloat() { return _float; } + public void setFloat(Float _float) { this._float = _float; } + public Body3 _double(Double _double) { this._double = _double; return this; } - - - /** - * None - * minimum: 67 - * maximum: 123 - * @return _double + /** + * None + * minimum: 67 + * maximum: 123 + * @return _double **/ @Schema(required = true, description = "None") public Double getDouble() { return _double; } + public void setDouble(Double _double) { this._double = _double; } + public Body3 string(String string) { this.string = string; return this; } - - - /** - * None - * @return string + /** + * None + * @return string **/ @Schema(description = "None") public String getString() { return string; } + public void setString(String string) { this.string = string; } + public Body3 patternWithoutDelimiter(String patternWithoutDelimiter) { this.patternWithoutDelimiter = patternWithoutDelimiter; return this; } - - - /** - * None - * @return patternWithoutDelimiter + /** + * None + * @return patternWithoutDelimiter **/ @Schema(required = true, description = "None") public String getPatternWithoutDelimiter() { return patternWithoutDelimiter; } + public void setPatternWithoutDelimiter(String patternWithoutDelimiter) { this.patternWithoutDelimiter = patternWithoutDelimiter; } + public Body3 _byte(byte[] _byte) { this._byte = _byte; return this; } - - - /** - * None - * @return _byte + /** + * None + * @return _byte **/ @Schema(required = true, description = "None") public byte[] getByte() { return _byte; } + public void setByte(byte[] _byte) { this._byte = _byte; } + public Body3 binary(File binary) { this.binary = binary; return this; } - - - /** - * None - * @return binary + /** + * None + * @return binary **/ @Schema(description = "None") public File getBinary() { return binary; } + public void setBinary(File binary) { this.binary = binary; } + public Body3 date(LocalDate date) { this.date = date; return this; } - - - /** - * None - * @return date + /** + * None + * @return date **/ @Schema(description = "None") public LocalDate getDate() { return date; } + public void setDate(LocalDate date) { this.date = date; } + public Body3 dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; return this; } - - - /** - * None - * @return dateTime + /** + * None + * @return dateTime **/ @Schema(description = "None") public OffsetDateTime getDateTime() { return dateTime; } + public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } + public Body3 password(String password) { this.password = password; return this; } - - - /** - * None - * @return password + /** + * None + * @return password **/ @Schema(description = "None") public String getPassword() { return password; } + public void setPassword(String password) { this.password = password; } + public Body3 callback(String callback) { this.callback = callback; return this; } - - - /** - * None - * @return callback + /** + * None + * @return callback **/ @Schema(description = "None") public String getCallback() { return callback; } + public void setCallback(String callback) { this.callback = callback; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -352,7 +356,7 @@ public boolean equals(java.lang.Object o) { Objects.equals(this._double, body3._double) && Objects.equals(this.string, body3.string) && Objects.equals(this.patternWithoutDelimiter, body3.patternWithoutDelimiter) && - Objects.equals(this._byte, body3._byte) && + Arrays.equals(this._byte, body3._byte) && Objects.equals(this.binary, body3.binary) && Objects.equals(this.date, body3.date) && Objects.equals(this.dateTime, body3.dateTime) && @@ -362,9 +366,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(integer, int32, int64, number, _float, _double, string, patternWithoutDelimiter, _byte, binary, date, dateTime, password, callback); + return Objects.hash(integer, int32, int64, number, _float, _double, string, patternWithoutDelimiter, Arrays.hashCode(_byte), Objects.hashCode(binary), date, dateTime, password, callback); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -399,8 +404,8 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(integer); out.writeValue(int32); out.writeValue(int64); @@ -417,40 +422,21 @@ public void writeToParcel(Parcel out, int flags) { out.writeValue(callback); } - public Body3() { - super(); - } - Body3(Parcel in) { - integer = (Integer)in.readValue(null); - int32 = (Integer)in.readValue(null); - int64 = (Long)in.readValue(null); - - number = (BigDecimal)in.readValue(BigDecimal.class.getClassLoader()); _float = (Float)in.readValue(null); - _double = (Double)in.readValue(null); - string = (String)in.readValue(null); - patternWithoutDelimiter = (String)in.readValue(null); - _byte = (byte[])in.readValue(null); - - binary = (File)in.readValue(File.class.getClassLoader()); - date = (LocalDate)in.readValue(LocalDate.class.getClassLoader()); - dateTime = (OffsetDateTime)in.readValue(OffsetDateTime.class.getClassLoader()); password = (String)in.readValue(null); - callback = (String)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body4.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body4.java index 00bb929446b..49e00a874d7 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body4.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body4.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,12 +25,12 @@ import java.util.List; import android.os.Parcelable; import android.os.Parcel; - /** * Body4 */ -public class Body4 { + +public class Body4 implements Parcelable { /** * Gets or Sets enumFormStringArray */ @@ -71,9 +72,9 @@ public EnumFormStringArrayEnum read(final JsonReader jsonReader) throws IOExcept return EnumFormStringArrayEnum.fromValue(String.valueOf(value)); } } - } - @SerializedName("enum_form_string_array") + } @SerializedName("enum_form_string_array") private List enumFormStringArray = null; + /** * Form parameter enum test (string) */ @@ -116,9 +117,9 @@ public EnumFormStringEnum read(final JsonReader jsonReader) throws IOException { return EnumFormStringEnum.fromValue(String.valueOf(value)); } } - } - @SerializedName("enum_form_string") + } @SerializedName("enum_form_string") private EnumFormStringEnum enumFormString = EnumFormStringEnum._EFG; + /** * Query parameter enum test (double) */ @@ -160,9 +161,11 @@ public EnumQueryDoubleEnum read(final JsonReader jsonReader) throws IOException return EnumQueryDoubleEnum.fromValue(String.valueOf(value)); } } - } - @SerializedName("enum_query_double") + } @SerializedName("enum_query_double") private EnumQueryDoubleEnum enumQueryDouble = null; + + public Body4() { + } public Body4 enumFormStringArray(List enumFormStringArray) { this.enumFormStringArray = enumFormStringArray; return this; @@ -176,53 +179,56 @@ public Body4 addEnumFormStringArrayItem(EnumFormStringArrayEnum enumFormStringAr return this; } - /** - * Form parameter enum test (string array) - * @return enumFormStringArray + /** + * Form parameter enum test (string array) + * @return enumFormStringArray **/ @Schema(description = "Form parameter enum test (string array)") public List getEnumFormStringArray() { return enumFormStringArray; } + public void setEnumFormStringArray(List enumFormStringArray) { this.enumFormStringArray = enumFormStringArray; } + public Body4 enumFormString(EnumFormStringEnum enumFormString) { this.enumFormString = enumFormString; return this; } - - - /** - * Form parameter enum test (string) - * @return enumFormString + /** + * Form parameter enum test (string) + * @return enumFormString **/ @Schema(description = "Form parameter enum test (string)") public EnumFormStringEnum getEnumFormString() { return enumFormString; } + public void setEnumFormString(EnumFormStringEnum enumFormString) { this.enumFormString = enumFormString; } + public Body4 enumQueryDouble(EnumQueryDoubleEnum enumQueryDouble) { this.enumQueryDouble = enumQueryDouble; return this; } - - - /** - * Query parameter enum test (double) - * @return enumQueryDouble + /** + * Query parameter enum test (double) + * @return enumQueryDouble **/ @Schema(description = "Query parameter enum test (double)") public EnumQueryDoubleEnum getEnumQueryDouble() { return enumQueryDouble; } + public void setEnumQueryDouble(EnumQueryDoubleEnum enumQueryDouble) { this.enumQueryDouble = enumQueryDouble; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -239,9 +245,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(enumFormStringArray, enumFormString, enumQueryDouble); + return Objects.hash(enumFormStringArray, enumFormString, enumQueryDouble); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -265,25 +272,17 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(enumFormStringArray); out.writeValue(enumFormString); out.writeValue(enumQueryDouble); } - public Body4() { - super(); - } - Body4(Parcel in) { - enumFormStringArray = (List)in.readValue(null); - enumFormString = (EnumFormStringEnum)in.readValue(null); - enumQueryDouble = (EnumQueryDoubleEnum)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body5.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body5.java index 896e0f425a3..9fe7079c9a8 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body5.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body5.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,54 +23,57 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * Body5 */ -public class Body5 { +public class Body5 implements Parcelable { @SerializedName("param") private String param = null; @SerializedName("param2") private String param2 = null; + + public Body5() { + } public Body5 param(String param) { this.param = param; return this; } - - - /** - * field1 - * @return param + /** + * field1 + * @return param **/ @Schema(required = true, description = "field1") public String getParam() { return param; } + public void setParam(String param) { this.param = param; } + public Body5 param2(String param2) { this.param2 = param2; return this; } - - - /** - * field2 - * @return param2 + /** + * field2 + * @return param2 **/ @Schema(required = true, description = "field2") public String getParam2() { return param2; } + public void setParam2(String param2) { this.param2 = param2; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -85,9 +89,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(param, param2); + return Objects.hash(param, param2); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -110,22 +115,15 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(param); out.writeValue(param2); } - public Body5() { - super(); - } - Body5(Parcel in) { - param = (String)in.readValue(null); - param2 = (String)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body6.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body6.java index 82085aa8d07..f01c25cf3e5 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body6.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body6.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,54 +23,57 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * Body6 */ -public class Body6 { +public class Body6 implements Parcelable { @SerializedName("name") private String name = null; @SerializedName("status") private String status = null; + + public Body6() { + } public Body6 name(String name) { this.name = name; return this; } - - - /** - * Updated name of the animal - * @return name + /** + * Updated name of the animal + * @return name **/ @Schema(description = "Updated name of the animal") public String getName() { return name; } + public void setName(String name) { this.name = name; } + public Body6 status(String status) { this.status = status; return this; } - - - /** - * Updated status of the animal - * @return status + /** + * Updated status of the animal + * @return status **/ @Schema(description = "Updated status of the animal") public String getStatus() { return status; } + public void setStatus(String status) { this.status = status; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -85,9 +89,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(name, status); + return Objects.hash(name, status); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -110,22 +115,15 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(name); out.writeValue(status); } - public Body6() { - super(); - } - Body6(Parcel in) { - name = (String)in.readValue(null); - status = (String)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body7.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body7.java index a81d6840cb3..df5c6e38d5f 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body7.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Body7.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,54 +23,57 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * Body7 */ -public class Body7 { +public class Body7 implements Parcelable { @SerializedName("name") private String name = null; @SerializedName("status") private String status = null; + + public Body7() { + } public Body7 name(String name) { this.name = name; return this; } - - - /** - * Updated name of the dog - * @return name + /** + * Updated name of the dog + * @return name **/ @Schema(description = "Updated name of the dog") public String getName() { return name; } + public void setName(String name) { this.name = name; } + public Body7 status(String status) { this.status = status; return this; } - - - /** - * Updated status of the dog - * @return status + /** + * Updated status of the dog + * @return status **/ @Schema(description = "Updated status of the dog") public String getStatus() { return status; } + public void setStatus(String status) { this.status = status; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -85,9 +89,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(name, status); + return Objects.hash(name, status); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -110,22 +115,15 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(name); out.writeValue(status); } - public Body7() { - super(); - } - Body7(Parcel in) { - name = (String)in.readValue(null); - status = (String)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Capitalization.java index cee795d4452..c04e6b29dc0 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Capitalization.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Capitalization.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,13 +23,12 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * Capitalization */ -public class Capitalization { +public class Capitalization implements Parcelable { @SerializedName("smallCamel") private String smallCamel = null; @@ -46,114 +46,118 @@ public class Capitalization { @SerializedName("ATT_NAME") private String ATT_NAME = null; + + public Capitalization() { + } public Capitalization smallCamel(String smallCamel) { this.smallCamel = smallCamel; return this; } - - - /** - * Get smallCamel - * @return smallCamel + /** + * Get smallCamel + * @return smallCamel **/ @Schema(description = "") public String getSmallCamel() { return smallCamel; } + public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } + public Capitalization capitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; return this; } - - - /** - * Get capitalCamel - * @return capitalCamel + /** + * Get capitalCamel + * @return capitalCamel **/ @Schema(description = "") public String getCapitalCamel() { return capitalCamel; } + public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } + public Capitalization smallSnake(String smallSnake) { this.smallSnake = smallSnake; return this; } - - - /** - * Get smallSnake - * @return smallSnake + /** + * Get smallSnake + * @return smallSnake **/ @Schema(description = "") public String getSmallSnake() { return smallSnake; } + public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } + public Capitalization capitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; return this; } - - - /** - * Get capitalSnake - * @return capitalSnake + /** + * Get capitalSnake + * @return capitalSnake **/ @Schema(description = "") public String getCapitalSnake() { return capitalSnake; } + public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } + public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; return this; } - - - /** - * Get scAETHFlowPoints - * @return scAETHFlowPoints + /** + * Get scAETHFlowPoints + * @return scAETHFlowPoints **/ @Schema(description = "") public String getScAETHFlowPoints() { return scAETHFlowPoints; } + public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } + public Capitalization ATT_NAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; return this; } - - - /** - * Name of the pet - * @return ATT_NAME + /** + * Name of the pet + * @return ATT_NAME **/ @Schema(description = "Name of the pet ") public String getATTNAME() { return ATT_NAME; } + public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -173,9 +177,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); + return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -202,8 +207,8 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(smallCamel); out.writeValue(capitalCamel); out.writeValue(smallSnake); @@ -212,24 +217,13 @@ public void writeToParcel(Parcel out, int flags) { out.writeValue(ATT_NAME); } - public Capitalization() { - super(); - } - Capitalization(Parcel in) { - smallCamel = (String)in.readValue(null); - capitalCamel = (String)in.readValue(null); - smallSnake = (String)in.readValue(null); - capitalSnake = (String)in.readValue(null); - scAETHFlowPoints = (String)in.readValue(null); - ATT_NAME = (String)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Cat.java index 3060bb1085e..515a44dfda5 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Cat.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,33 +24,37 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * Cat */ -public class Cat extends Animal { +public class Cat extends Animal implements Parcelable , OneOfAllPetsResponseItems, OneOfSinglePetResponsePet { @SerializedName("declawed") private Boolean declawed = null; + + public Cat() { + super(); + } public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; } - - - /** - * Get declawed - * @return declawed + /** + * Get declawed + * @return declawed **/ @Schema(description = "") public Boolean isDeclawed() { return declawed; } + public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -65,9 +70,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(declawed, super.hashCode()); + return Objects.hash(declawed, super.hashCode()); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -89,19 +95,15 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - super.writeToParcel(out, flags); + super.writeToParcel(out, flags); out.writeValue(declawed); } - public Cat() { - super(); - } - Cat(Parcel in) { - super(in); + super(in); declawed = (Boolean)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Category.java index 559c3558e9e..268b2d868a4 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Category.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,54 +23,57 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * Category */ -public class Category { +public class Category implements Parcelable { @SerializedName("id") private Long id = null; @SerializedName("name") private String name = null; + + public Category() { + } public Category id(Long id) { this.id = id; return this; } - - - /** - * Get id - * @return id + /** + * Get id + * @return id **/ @Schema(description = "") public Long getId() { return id; } + public void setId(Long id) { this.id = id; } + public Category name(String name) { this.name = name; return this; } - - - /** - * Get name - * @return name + /** + * Get name + * @return name **/ @Schema(description = "") public String getName() { return name; } + public void setName(String name) { this.name = name; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -85,9 +89,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(id, name); + return Objects.hash(id, name); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -110,22 +115,15 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(id); out.writeValue(name); } - public Category() { - super(); - } - Category(Parcel in) { - id = (Long)in.readValue(null); - name = (String)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ClassModel.java index 1a6f85fc18c..00de3e36f91 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ClassModel.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ClassModel.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,33 +23,36 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * Model for testing model with \"_class\" property */ @Schema(description = "Model for testing model with \"_class\" property") -public class ClassModel { +public class ClassModel implements Parcelable { @SerializedName("_class") private String propertyClass = null; + + public ClassModel() { + } public ClassModel propertyClass(String propertyClass) { this.propertyClass = propertyClass; return this; } - - - /** - * Get propertyClass - * @return propertyClass + /** + * Get propertyClass + * @return propertyClass **/ @Schema(description = "") public String getPropertyClass() { return propertyClass; } + public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -63,9 +67,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(propertyClass); + return Objects.hash(propertyClass); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -87,19 +92,13 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(propertyClass); } - public ClassModel() { - super(); - } - ClassModel(Parcel in) { - propertyClass = (String)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Client.java index 44e9f09c8a0..20f570a879a 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Client.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Client.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,33 +23,36 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * Client */ -public class Client { +public class Client implements Parcelable { @SerializedName("client") private String client = null; + + public Client() { + } public Client client(String client) { this.client = client; return this; } - - - /** - * Get client - * @return client + /** + * Get client + * @return client **/ @Schema(description = "") public String getClient() { return client; } + public void setClient(String client) { this.client = client; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -63,9 +67,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(client); + return Objects.hash(client); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -87,19 +92,13 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(client); } - public Client() { - super(); - } - Client(Parcel in) { - client = (String)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Dog.java index 8d830370c6c..5437662d2a8 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Dog.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,33 +24,37 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * Dog */ -public class Dog extends Animal { +public class Dog extends Animal implements Parcelable , OneOfAllPetsResponseItems, OneOfSinglePetResponsePet { @SerializedName("breed") private String breed = null; + + public Dog() { + super(); + } public Dog breed(String breed) { this.breed = breed; return this; } - - - /** - * Get breed - * @return breed + /** + * Get breed + * @return breed **/ @Schema(description = "") public String getBreed() { return breed; } + public void setBreed(String breed) { this.breed = breed; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -65,9 +70,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(breed, super.hashCode()); + return Objects.hash(breed, super.hashCode()); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -89,19 +95,15 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - super.writeToParcel(out, flags); + super.writeToParcel(out, flags); out.writeValue(breed); } - public Dog() { - super(); - } - Dog(Parcel in) { - super(in); + super(in); breed = (String)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/EnumArrays.java index 31ca7e46945..cf66959f349 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/EnumArrays.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/EnumArrays.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -24,12 +25,12 @@ import java.util.List; import android.os.Parcelable; import android.os.Parcel; - /** * EnumArrays */ -public class EnumArrays { + +public class EnumArrays implements Parcelable { /** * Gets or Sets justSymbol */ @@ -71,9 +72,9 @@ public JustSymbolEnum read(final JsonReader jsonReader) throws IOException { return JustSymbolEnum.fromValue(String.valueOf(value)); } } - } - @SerializedName("just_symbol") + } @SerializedName("just_symbol") private JustSymbolEnum justSymbol = null; + /** * Gets or Sets arrayEnum */ @@ -115,27 +116,29 @@ public ArrayEnumEnum read(final JsonReader jsonReader) throws IOException { return ArrayEnumEnum.fromValue(String.valueOf(value)); } } - } - @SerializedName("array_enum") + } @SerializedName("array_enum") private List arrayEnum = null; + + public EnumArrays() { + } public EnumArrays justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; return this; } - - - /** - * Get justSymbol - * @return justSymbol + /** + * Get justSymbol + * @return justSymbol **/ @Schema(description = "") public JustSymbolEnum getJustSymbol() { return justSymbol; } + public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } + public EnumArrays arrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; return this; @@ -149,17 +152,20 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { return this; } - /** - * Get arrayEnum - * @return arrayEnum + /** + * Get arrayEnum + * @return arrayEnum **/ @Schema(description = "") public List getArrayEnum() { return arrayEnum; } + public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -175,9 +181,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(justSymbol, arrayEnum); + return Objects.hash(justSymbol, arrayEnum); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -200,22 +207,15 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(justSymbol); out.writeValue(arrayEnum); } - public EnumArrays() { - super(); - } - EnumArrays(Parcel in) { - justSymbol = (JustSymbolEnum)in.readValue(null); - arrayEnum = (List)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/EnumClass.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/EnumClass.java index b5f792edcbd..8808d45ecb1 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/EnumClass.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/EnumClass.java @@ -13,10 +13,10 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.annotations.SerializedName; import android.os.Parcelable; import android.os.Parcel; - import java.io.IOException; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/EnumTest.java index c82f5f80ba9..48fcf548b8f 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/EnumTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/EnumTest.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,12 +24,12 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * EnumTest */ -public class EnumTest { + +public class EnumTest implements Parcelable { /** * Gets or Sets enumString */ @@ -71,9 +72,9 @@ public EnumStringEnum read(final JsonReader jsonReader) throws IOException { return EnumStringEnum.fromValue(String.valueOf(value)); } } - } - @SerializedName("enum_string") + } @SerializedName("enum_string") private EnumStringEnum enumString = null; + /** * Gets or Sets enumInteger */ @@ -115,9 +116,9 @@ public EnumIntegerEnum read(final JsonReader jsonReader) throws IOException { return EnumIntegerEnum.fromValue(String.valueOf(value)); } } - } - @SerializedName("enum_integer") + } @SerializedName("enum_integer") private EnumIntegerEnum enumInteger = null; + /** * Gets or Sets enumNumber */ @@ -159,84 +160,87 @@ public EnumNumberEnum read(final JsonReader jsonReader) throws IOException { return EnumNumberEnum.fromValue(String.valueOf(value)); } } - } - @SerializedName("enum_number") + } @SerializedName("enum_number") private EnumNumberEnum enumNumber = null; @SerializedName("outerEnum") private OuterEnum outerEnum = null; + + public EnumTest() { + } public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; } - - - /** - * Get enumString - * @return enumString + /** + * Get enumString + * @return enumString **/ @Schema(description = "") public EnumStringEnum getEnumString() { return enumString; } + public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } + public EnumTest enumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; return this; } - - - /** - * Get enumInteger - * @return enumInteger + /** + * Get enumInteger + * @return enumInteger **/ @Schema(description = "") public EnumIntegerEnum getEnumInteger() { return enumInteger; } + public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } + public EnumTest enumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; return this; } - - - /** - * Get enumNumber - * @return enumNumber + /** + * Get enumNumber + * @return enumNumber **/ @Schema(description = "") public EnumNumberEnum getEnumNumber() { return enumNumber; } + public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } + public EnumTest outerEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; return this; } - - - /** - * Get outerEnum - * @return outerEnum + /** + * Get outerEnum + * @return outerEnum **/ @Schema(description = "") public OuterEnum getOuterEnum() { return outerEnum; } + public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -254,9 +258,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(enumString, enumInteger, enumNumber, outerEnum); + return Objects.hash(enumString, enumInteger, enumNumber, outerEnum); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -281,27 +286,18 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(enumString); out.writeValue(enumInteger); out.writeValue(enumNumber); out.writeValue(outerEnum); } - public EnumTest() { - super(); - } - EnumTest(Parcel in) { - enumString = (EnumStringEnum)in.readValue(null); - enumInteger = (EnumIntegerEnum)in.readValue(null); - enumNumber = (EnumNumberEnum)in.readValue(null); - - outerEnum = (OuterEnum)in.readValue(OuterEnum.class.getClassLoader()); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/FormatTest.java index 00cd54a5144..c65065799a0 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/FormatTest.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -27,13 +28,12 @@ import org.threeten.bp.OffsetDateTime; import android.os.Parcelable; import android.os.Parcel; - /** * FormatTest */ -public class FormatTest { +public class FormatTest implements Parcelable { @SerializedName("integer") private Integer integer = null; @@ -72,250 +72,254 @@ public class FormatTest { @SerializedName("password") private String password = null; + + public FormatTest() { + } public FormatTest integer(Integer integer) { this.integer = integer; return this; } - - - /** - * Get integer - * minimum: 10 - * maximum: 100 - * @return integer + /** + * Get integer + * minimum: 10 + * maximum: 100 + * @return integer **/ @Schema(description = "") public Integer getInteger() { return integer; } + public void setInteger(Integer integer) { this.integer = integer; } + public FormatTest int32(Integer int32) { this.int32 = int32; return this; } - - - /** - * Get int32 - * minimum: 20 - * maximum: 200 - * @return int32 + /** + * Get int32 + * minimum: 20 + * maximum: 200 + * @return int32 **/ @Schema(description = "") public Integer getInt32() { return int32; } + public void setInt32(Integer int32) { this.int32 = int32; } + public FormatTest int64(Long int64) { this.int64 = int64; return this; } - - - /** - * Get int64 - * @return int64 + /** + * Get int64 + * @return int64 **/ @Schema(description = "") public Long getInt64() { return int64; } + public void setInt64(Long int64) { this.int64 = int64; } + public FormatTest number(BigDecimal number) { this.number = number; return this; } - - - /** - * Get number - * minimum: 32 - * maximum: 543 - * @return number + /** + * Get number + * minimum: 32 + * maximum: 543 + * @return number **/ @Schema(required = true, description = "") public BigDecimal getNumber() { return number; } + public void setNumber(BigDecimal number) { this.number = number; } + public FormatTest _float(Float _float) { this._float = _float; return this; } - - - /** - * Get _float - * minimum: 54 - * maximum: 987 - * @return _float + /** + * Get _float + * minimum: 54 + * maximum: 987 + * @return _float **/ @Schema(description = "") public Float getFloat() { return _float; } + public void setFloat(Float _float) { this._float = _float; } + public FormatTest _double(Double _double) { this._double = _double; return this; } - - - /** - * Get _double - * minimum: 67 - * maximum: 123 - * @return _double + /** + * Get _double + * minimum: 67 + * maximum: 123 + * @return _double **/ @Schema(description = "") public Double getDouble() { return _double; } + public void setDouble(Double _double) { this._double = _double; } + public FormatTest string(String string) { this.string = string; return this; } - - - /** - * Get string - * @return string + /** + * Get string + * @return string **/ @Schema(description = "") public String getString() { return string; } + public void setString(String string) { this.string = string; } + public FormatTest _byte(byte[] _byte) { this._byte = _byte; return this; } - - - /** - * Get _byte - * @return _byte + /** + * Get _byte + * @return _byte **/ @Schema(required = true, description = "") public byte[] getByte() { return _byte; } + public void setByte(byte[] _byte) { this._byte = _byte; } + public FormatTest binary(File binary) { this.binary = binary; return this; } - - - /** - * Get binary - * @return binary + /** + * Get binary + * @return binary **/ @Schema(description = "") public File getBinary() { return binary; } + public void setBinary(File binary) { this.binary = binary; } + public FormatTest date(LocalDate date) { this.date = date; return this; } - - - /** - * Get date - * @return date + /** + * Get date + * @return date **/ @Schema(required = true, description = "") public LocalDate getDate() { return date; } + public void setDate(LocalDate date) { this.date = date; } + public FormatTest dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; return this; } - - - /** - * Get dateTime - * @return dateTime + /** + * Get dateTime + * @return dateTime **/ @Schema(description = "") public OffsetDateTime getDateTime() { return dateTime; } + public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } + public FormatTest uuid(UUID uuid) { this.uuid = uuid; return this; } - - - /** - * Get uuid - * @return uuid + /** + * Get uuid + * @return uuid **/ @Schema(description = "") public UUID getUuid() { return uuid; } + public void setUuid(UUID uuid) { this.uuid = uuid; } + public FormatTest password(String password) { this.password = password; return this; } - - - /** - * Get password - * @return password + /** + * Get password + * @return password **/ @Schema(required = true, description = "") public String getPassword() { return password; } + public void setPassword(String password) { this.password = password; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -332,7 +336,7 @@ public boolean equals(java.lang.Object o) { Objects.equals(this._float, formatTest._float) && Objects.equals(this._double, formatTest._double) && Objects.equals(this.string, formatTest.string) && - Objects.equals(this._byte, formatTest._byte) && + Arrays.equals(this._byte, formatTest._byte) && Objects.equals(this.binary, formatTest.binary) && Objects.equals(this.date, formatTest.date) && Objects.equals(this.dateTime, formatTest.dateTime) && @@ -342,9 +346,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, uuid, password); + return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), Objects.hashCode(binary), date, dateTime, uuid, password); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -378,8 +383,8 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(integer); out.writeValue(int32); out.writeValue(int64); @@ -395,38 +400,20 @@ public void writeToParcel(Parcel out, int flags) { out.writeValue(password); } - public FormatTest() { - super(); - } - FormatTest(Parcel in) { - integer = (Integer)in.readValue(null); - int32 = (Integer)in.readValue(null); - int64 = (Long)in.readValue(null); - - number = (BigDecimal)in.readValue(BigDecimal.class.getClassLoader()); _float = (Float)in.readValue(null); - _double = (Double)in.readValue(null); - string = (String)in.readValue(null); - _byte = (byte[])in.readValue(null); - - binary = (File)in.readValue(File.class.getClassLoader()); - date = (LocalDate)in.readValue(LocalDate.class.getClassLoader()); - dateTime = (OffsetDateTime)in.readValue(OffsetDateTime.class.getClassLoader()); - uuid = (UUID)in.readValue(UUID.class.getClassLoader()); password = (String)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java index db074cb2020..7d1ce2f0801 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,34 +23,39 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * HasOnlyReadOnly */ -public class HasOnlyReadOnly { +public class HasOnlyReadOnly implements Parcelable { @SerializedName("bar") private String bar = null; @SerializedName("foo") private String foo = null; - /** - * Get bar - * @return bar + + public HasOnlyReadOnly() { + } + /** + * Get bar + * @return bar **/ @Schema(description = "") public String getBar() { return bar; } - /** - * Get foo - * @return foo + + /** + * Get foo + * @return foo **/ @Schema(description = "") public String getFoo() { return foo; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -65,9 +71,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(bar, foo); + return Objects.hash(bar, foo); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -90,22 +97,15 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(bar); out.writeValue(foo); } - public HasOnlyReadOnly() { - super(); - } - HasOnlyReadOnly(Parcel in) { - bar = (String)in.readValue(null); - foo = (String)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/MapTest.java index 843dfd5ec23..190c54e822d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/MapTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/MapTest.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -25,15 +26,15 @@ import java.util.Map; import android.os.Parcelable; import android.os.Parcel; - /** * MapTest */ -public class MapTest { +public class MapTest implements Parcelable { @SerializedName("map_map_of_string") private Map> mapMapOfString = null; + /** * Gets or Sets inner */ @@ -75,15 +76,16 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { return InnerEnum.fromValue(String.valueOf(value)); } } - } - @SerializedName("map_of_enum_string") + } @SerializedName("map_of_enum_string") private Map mapOfEnumString = null; + + public MapTest() { + } public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; return this; } - public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { if (this.mapMapOfString == null) { this.mapMapOfString = new HashMap>(); @@ -91,23 +93,25 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr this.mapMapOfString.put(key, mapMapOfStringItem); return this; } - /** - * Get mapMapOfString - * @return mapMapOfString + + /** + * Get mapMapOfString + * @return mapMapOfString **/ @Schema(description = "") public Map> getMapMapOfString() { return mapMapOfString; } + public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } + public MapTest mapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; return this; } - public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { if (this.mapOfEnumString == null) { this.mapOfEnumString = new HashMap(); @@ -115,17 +119,21 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) this.mapOfEnumString.put(key, mapOfEnumStringItem); return this; } - /** - * Get mapOfEnumString - * @return mapOfEnumString + + /** + * Get mapOfEnumString + * @return mapOfEnumString **/ @Schema(description = "") public Map getMapOfEnumString() { return mapOfEnumString; } + public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -141,9 +149,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(mapMapOfString, mapOfEnumString); + return Objects.hash(mapMapOfString, mapOfEnumString); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -166,22 +175,15 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(mapMapOfString); out.writeValue(mapOfEnumString); } - public MapTest() { - super(); - } - MapTest(Parcel in) { - - mapMapOfString = (Map>)in.readValue(Map.class.getClassLoader()); mapOfEnumString = (Map)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 795796fd310..206964b86ef 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -28,13 +29,12 @@ import org.threeten.bp.OffsetDateTime; import android.os.Parcelable; import android.os.Parcel; - /** * MixedPropertiesAndAdditionalPropertiesClass */ -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass implements Parcelable { @SerializedName("uuid") private UUID uuid = null; @@ -43,48 +43,50 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @SerializedName("map") private Map map = null; + + public MixedPropertiesAndAdditionalPropertiesClass() { + } public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { this.uuid = uuid; return this; } - - - /** - * Get uuid - * @return uuid + /** + * Get uuid + * @return uuid **/ @Schema(description = "") public UUID getUuid() { return uuid; } + public void setUuid(UUID uuid) { this.uuid = uuid; } + public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; return this; } - - - /** - * Get dateTime - * @return dateTime + /** + * Get dateTime + * @return dateTime **/ @Schema(description = "") public OffsetDateTime getDateTime() { return dateTime; } + public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } + public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { this.map = map; return this; } - public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { if (this.map == null) { this.map = new HashMap(); @@ -92,17 +94,21 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal this.map.put(key, mapItem); return this; } - /** - * Get map - * @return map + + /** + * Get map + * @return map **/ @Schema(description = "") public Map getMap() { return map; } + public void setMap(Map map) { this.map = map; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -119,9 +125,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(uuid, dateTime, map); + return Objects.hash(uuid, dateTime, map); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -145,24 +152,16 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(uuid); out.writeValue(dateTime); out.writeValue(map); } - public MixedPropertiesAndAdditionalPropertiesClass() { - super(); - } - MixedPropertiesAndAdditionalPropertiesClass(Parcel in) { - - uuid = (UUID)in.readValue(UUID.class.getClassLoader()); - dateTime = (OffsetDateTime)in.readValue(OffsetDateTime.class.getClassLoader()); - map = (Map)in.readValue(Animal.class.getClassLoader()); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Model200Response.java index 8dc25e4c4ea..5e92a5c8f1f 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Model200Response.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,54 +23,57 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * Model for testing model name starting with number */ @Schema(description = "Model for testing model name starting with number") -public class Model200Response { +public class Model200Response implements Parcelable { @SerializedName("name") private Integer name = null; @SerializedName("class") private String propertyClass = null; + + public Model200Response() { + } public Model200Response name(Integer name) { this.name = name; return this; } - - - /** - * Get name - * @return name + /** + * Get name + * @return name **/ @Schema(description = "") public Integer getName() { return name; } + public void setName(Integer name) { this.name = name; } + public Model200Response propertyClass(String propertyClass) { this.propertyClass = propertyClass; return this; } - - - /** - * Get propertyClass - * @return propertyClass + /** + * Get propertyClass + * @return propertyClass **/ @Schema(description = "") public String getPropertyClass() { return propertyClass; } + public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -85,9 +89,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(name, propertyClass); + return Objects.hash(name, propertyClass); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -110,22 +115,15 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(name); out.writeValue(propertyClass); } - public Model200Response() { - super(); - } - Model200Response(Parcel in) { - name = (Integer)in.readValue(null); - propertyClass = (String)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ModelApiResponse.java index 40c710321b5..b44a24e630d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ModelApiResponse.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,13 +23,12 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * ModelApiResponse */ -public class ModelApiResponse { +public class ModelApiResponse implements Parcelable { @SerializedName("code") private Integer code = null; @@ -37,60 +37,64 @@ public class ModelApiResponse { @SerializedName("message") private String message = null; + + public ModelApiResponse() { + } public ModelApiResponse code(Integer code) { this.code = code; return this; } - - - /** - * Get code - * @return code + /** + * Get code + * @return code **/ @Schema(description = "") public Integer getCode() { return code; } + public void setCode(Integer code) { this.code = code; } + public ModelApiResponse type(String type) { this.type = type; return this; } - - - /** - * Get type - * @return type + /** + * Get type + * @return type **/ @Schema(description = "") public String getType() { return type; } + public void setType(String type) { this.type = type; } + public ModelApiResponse message(String message) { this.message = message; return this; } - - - /** - * Get message - * @return message + /** + * Get message + * @return message **/ @Schema(description = "") public String getMessage() { return message; } + public void setMessage(String message) { this.message = message; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -107,9 +111,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(code, type, message); + return Objects.hash(code, type, message); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -133,25 +138,17 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(code); out.writeValue(type); out.writeValue(message); } - public ModelApiResponse() { - super(); - } - ModelApiResponse(Parcel in) { - code = (Integer)in.readValue(null); - type = (String)in.readValue(null); - message = (String)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ModelReturn.java index ce23c81eed9..fccaf4e759f 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ModelReturn.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,33 +23,36 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * Model for testing reserved words */ @Schema(description = "Model for testing reserved words") -public class ModelReturn { +public class ModelReturn implements Parcelable { @SerializedName("return") private Integer _return = null; + + public ModelReturn() { + } public ModelReturn _return(Integer _return) { this._return = _return; return this; } - - - /** - * Get _return - * @return _return + /** + * Get _return + * @return _return **/ @Schema(description = "") public Integer getReturn() { return _return; } + public void setReturn(Integer _return) { this._return = _return; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -63,9 +67,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(_return); + return Objects.hash(_return); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -87,19 +92,13 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(_return); } - public ModelReturn() { - super(); - } - ModelReturn(Parcel in) { - _return = (Integer)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Name.java index 4a0d25f09a6..92323401a76 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Name.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,13 +23,12 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * Model for testing model name same as property name */ @Schema(description = "Model for testing model name same as property name") -public class Name { +public class Name implements Parcelable { @SerializedName("name") private Integer name = null; @@ -40,58 +40,64 @@ public class Name { @SerializedName("123Number") private Integer _123Number = null; + + public Name() { + } public Name name(Integer name) { this.name = name; return this; } - - - /** - * Get name - * @return name + /** + * Get name + * @return name **/ @Schema(required = true, description = "") public Integer getName() { return name; } + public void setName(Integer name) { this.name = name; } - /** - * Get snakeCase - * @return snakeCase + + /** + * Get snakeCase + * @return snakeCase **/ @Schema(description = "") public Integer getSnakeCase() { return snakeCase; } + public Name property(String property) { this.property = property; return this; } - - - /** - * Get property - * @return property + /** + * Get property + * @return property **/ @Schema(description = "") public String getProperty() { return property; } + public void setProperty(String property) { this.property = property; } - /** - * Get _123Number - * @return _123Number + + /** + * Get _123Number + * @return _123Number **/ @Schema(description = "") public Integer get123Number() { return _123Number; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -109,9 +115,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(name, snakeCase, property, _123Number); + return Objects.hash(name, snakeCase, property, _123Number); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -136,28 +143,19 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(name); out.writeValue(snakeCase); out.writeValue(property); out.writeValue(_123Number); } - public Name() { - super(); - } - Name(Parcel in) { - name = (Integer)in.readValue(null); - snakeCase = (Integer)in.readValue(null); - property = (String)in.readValue(null); - _123Number = (Integer)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/NumberOnly.java index 0e531c84c80..b1d52bb5271 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/NumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/NumberOnly.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,33 +24,36 @@ import java.math.BigDecimal; import android.os.Parcelable; import android.os.Parcel; - /** * NumberOnly */ -public class NumberOnly { +public class NumberOnly implements Parcelable { @SerializedName("JustNumber") private BigDecimal justNumber = null; + + public NumberOnly() { + } public NumberOnly justNumber(BigDecimal justNumber) { this.justNumber = justNumber; return this; } - - - /** - * Get justNumber - * @return justNumber + /** + * Get justNumber + * @return justNumber **/ @Schema(description = "") public BigDecimal getJustNumber() { return justNumber; } + public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -64,9 +68,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(justNumber); + return Objects.hash(justNumber); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -88,18 +93,12 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(justNumber); } - public NumberOnly() { - super(); - } - NumberOnly(Parcel in) { - - justNumber = (BigDecimal)in.readValue(BigDecimal.class.getClassLoader()); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/OneOfAllPetsResponseItems.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/OneOfAllPetsResponseItems.java new file mode 100644 index 00000000000..4695bb22c42 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/OneOfAllPetsResponseItems.java @@ -0,0 +1,20 @@ +/* + * 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; + +/** +* OneOfAllPetsResponseItems +*/ +public interface OneOfAllPetsResponseItems { + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/OneOfSinglePetResponsePet.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/OneOfSinglePetResponsePet.java new file mode 100644 index 00000000000..cf417718aa8 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/OneOfSinglePetResponsePet.java @@ -0,0 +1,20 @@ +/* + * 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; + +/** +* OneOfSinglePetResponsePet +*/ +public interface OneOfSinglePetResponsePet { + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Order.java index 1b98839b2ab..97833212303 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Order.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,13 +24,12 @@ import org.threeten.bp.OffsetDateTime; import android.os.Parcelable; import android.os.Parcel; - /** * Order */ -public class Order { +public class Order implements Parcelable { @SerializedName("id") private Long id = null; @@ -41,6 +41,7 @@ public class Order { @SerializedName("shipDate") private OffsetDateTime shipDate = null; + /** * Order Status */ @@ -83,120 +84,123 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { return StatusEnum.fromValue(String.valueOf(value)); } } - } - @SerializedName("status") + } @SerializedName("status") private StatusEnum status = null; @SerializedName("complete") private Boolean complete = false; + + public Order() { + } public Order id(Long id) { this.id = id; return this; } - - - /** - * Get id - * @return id + /** + * Get id + * @return id **/ @Schema(description = "") public Long getId() { return id; } + public void setId(Long id) { this.id = id; } + public Order petId(Long petId) { this.petId = petId; return this; } - - - /** - * Get petId - * @return petId + /** + * Get petId + * @return petId **/ @Schema(description = "") public Long getPetId() { return petId; } + public void setPetId(Long petId) { this.petId = petId; } + public Order quantity(Integer quantity) { this.quantity = quantity; return this; } - - - /** - * Get quantity - * @return quantity + /** + * Get quantity + * @return quantity **/ @Schema(description = "") public Integer getQuantity() { return quantity; } + public void setQuantity(Integer quantity) { this.quantity = quantity; } + public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; return this; } - - - /** - * Get shipDate - * @return shipDate + /** + * Get shipDate + * @return shipDate **/ @Schema(description = "") public OffsetDateTime getShipDate() { return shipDate; } + public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } + public Order status(StatusEnum status) { this.status = status; return this; } - - - /** - * Order Status - * @return status + /** + * Order Status + * @return status **/ @Schema(description = "Order Status") public StatusEnum getStatus() { return status; } + public void setStatus(StatusEnum status) { this.status = status; } + public Order complete(Boolean complete) { this.complete = complete; return this; } - - - /** - * Get complete - * @return complete + /** + * Get complete + * @return complete **/ @Schema(description = "") public Boolean isComplete() { return complete; } + public void setComplete(Boolean complete) { this.complete = complete; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -216,9 +220,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -245,8 +250,8 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(id); out.writeValue(petId); out.writeValue(quantity); @@ -255,24 +260,13 @@ public void writeToParcel(Parcel out, int flags) { out.writeValue(complete); } - public Order() { - super(); - } - Order(Parcel in) { - id = (Long)in.readValue(null); - petId = (Long)in.readValue(null); - quantity = (Integer)in.readValue(null); - - shipDate = (OffsetDateTime)in.readValue(OffsetDateTime.class.getClassLoader()); status = (StatusEnum)in.readValue(null); - complete = (Boolean)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/OuterComposite.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/OuterComposite.java index 112c4678826..0bfca50815e 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/OuterComposite.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/OuterComposite.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,13 +24,12 @@ import java.math.BigDecimal; import android.os.Parcelable; import android.os.Parcel; - /** * OuterComposite */ -public class OuterComposite { +public class OuterComposite implements Parcelable { @SerializedName("my_number") private BigDecimal myNumber = null; @@ -38,60 +38,64 @@ public class OuterComposite { @SerializedName("my_boolean") private Boolean myBoolean = null; + + public OuterComposite() { + } public OuterComposite myNumber(BigDecimal myNumber) { this.myNumber = myNumber; return this; } - - - /** - * Get myNumber - * @return myNumber + /** + * Get myNumber + * @return myNumber **/ @Schema(description = "") public BigDecimal getMyNumber() { return myNumber; } + public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } + public OuterComposite myString(String myString) { this.myString = myString; return this; } - - - /** - * Get myString - * @return myString + /** + * Get myString + * @return myString **/ @Schema(description = "") public String getMyString() { return myString; } + public void setMyString(String myString) { this.myString = myString; } + public OuterComposite myBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; return this; } - - - /** - * Get myBoolean - * @return myBoolean + /** + * Get myBoolean + * @return myBoolean **/ @Schema(description = "") public Boolean getMyBoolean() { return myBoolean; } + public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -108,9 +112,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(myNumber, myString, myBoolean); + return Objects.hash(myNumber, myString, myBoolean); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -134,25 +139,17 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(myNumber); out.writeValue(myString); out.writeValue(myBoolean); } - public OuterComposite() { - super(); - } - OuterComposite(Parcel in) { - - myNumber = (BigDecimal)in.readValue(BigDecimal.class.getClassLoader()); myString = (String)in.readValue(null); - myBoolean = (Boolean)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/OuterEnum.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/OuterEnum.java index d913e8551d9..425920fd7bf 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/OuterEnum.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/OuterEnum.java @@ -13,10 +13,10 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.annotations.SerializedName; import android.os.Parcelable; import android.os.Parcel; - import java.io.IOException; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Pet.java index 6a17129cdbe..6ba10812c13 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Pet.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -26,13 +27,12 @@ import java.util.List; import android.os.Parcelable; import android.os.Parcel; - /** * Pet */ -public class Pet { +public class Pet implements Parcelable { @SerializedName("id") private Long id = null; @@ -47,6 +47,7 @@ public class Pet { @SerializedName("tags") private List tags = null; + /** * pet status in the store */ @@ -89,63 +90,65 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { return StatusEnum.fromValue(String.valueOf(value)); } } - } - @SerializedName("status") + } @SerializedName("status") private StatusEnum status = null; + + public Pet() { + } public Pet id(Long id) { this.id = id; return this; } - - - /** - * Get id - * @return id + /** + * Get id + * @return id **/ @Schema(description = "") public Long getId() { return id; } + public void setId(Long id) { this.id = id; } + public Pet category(Category category) { this.category = category; return this; } - - - /** - * Get category - * @return category + /** + * Get category + * @return category **/ @Schema(description = "") public Category getCategory() { return category; } + public void setCategory(Category category) { this.category = category; } + public Pet name(String name) { this.name = name; return this; } - - - /** - * Get name - * @return name + /** + * Get name + * @return name **/ @Schema(example = "doggie", required = true, description = "") public String getName() { return name; } + public void setName(String name) { this.name = name; } + public Pet photoUrls(List photoUrls) { this.photoUrls = photoUrls; return this; @@ -156,17 +159,19 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { return this; } - /** - * Get photoUrls - * @return photoUrls + /** + * Get photoUrls + * @return photoUrls **/ @Schema(required = true, description = "") public List getPhotoUrls() { return photoUrls; } + public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } + public Pet tags(List tags) { this.tags = tags; return this; @@ -180,35 +185,38 @@ public Pet addTagsItem(Tag tagsItem) { return this; } - /** - * Get tags - * @return tags + /** + * Get tags + * @return tags **/ @Schema(description = "") public List getTags() { return tags; } + public void setTags(List tags) { this.tags = tags; } + public Pet status(StatusEnum status) { this.status = status; return this; } - - - /** - * pet status in the store - * @return status + /** + * pet status in the store + * @return status **/ @Schema(description = "pet status in the store") public StatusEnum getStatus() { return status; } + public void setStatus(StatusEnum status) { this.status = status; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -228,9 +236,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(id, category, name, photoUrls, tags, status); + return Objects.hash(id, category, name, photoUrls, tags, status); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -257,8 +266,8 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(id); out.writeValue(category); out.writeValue(name); @@ -267,24 +276,13 @@ public void writeToParcel(Parcel out, int flags) { out.writeValue(status); } - public Pet() { - super(); - } - Pet(Parcel in) { - id = (Long)in.readValue(null); - - category = (Category)in.readValue(Category.class.getClassLoader()); name = (String)in.readValue(null); - photoUrls = (List)in.readValue(null); - - tags = (List)in.readValue(Tag.class.getClassLoader()); status = (StatusEnum)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ReadOnlyFirst.java index 97c1d7e6ad1..b1e8005e864 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ReadOnlyFirst.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,44 +23,48 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * ReadOnlyFirst */ -public class ReadOnlyFirst { +public class ReadOnlyFirst implements Parcelable { @SerializedName("bar") private String bar = null; @SerializedName("baz") private String baz = null; - /** - * Get bar - * @return bar + + public ReadOnlyFirst() { + } + /** + * Get bar + * @return bar **/ @Schema(description = "") public String getBar() { return bar; } + public ReadOnlyFirst baz(String baz) { this.baz = baz; return this; } - - - /** - * Get baz - * @return baz + /** + * Get baz + * @return baz **/ @Schema(description = "") public String getBaz() { return baz; } + public void setBaz(String baz) { this.baz = baz; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -75,9 +80,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(bar, baz); + return Objects.hash(bar, baz); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -100,22 +106,15 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(bar); out.writeValue(baz); } - public ReadOnlyFirst() { - super(); - } - ReadOnlyFirst(Parcel in) { - bar = (String)in.readValue(null); - baz = (String)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/SinglePetResponse.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/SinglePetResponse.java new file mode 100644 index 00000000000..777179df1a2 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/SinglePetResponse.java @@ -0,0 +1,117 @@ +/* + * 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; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.client.model.OneOfSinglePetResponsePet; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.IOException; +import android.os.Parcelable; +import android.os.Parcel; +/** + * SinglePetResponse + */ + + +public class SinglePetResponse implements Parcelable { + @SerializedName("pet") + private OneOfSinglePetResponsePet pet = null; + + public SinglePetResponse() { + } + public SinglePetResponse pet(OneOfSinglePetResponsePet pet) { + this.pet = pet; + return this; + } + + /** + * Get pet + * @return pet + **/ + @Schema(description = "") + public OneOfSinglePetResponsePet getPet() { + return pet; + } + + public void setPet(OneOfSinglePetResponsePet pet) { + this.pet = pet; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SinglePetResponse singlePetResponse = (SinglePetResponse) o; + return Objects.equals(this.pet, singlePetResponse.pet); + } + + @Override + public int hashCode() { + return Objects.hash(pet); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SinglePetResponse {\n"); + + sb.append(" pet: ").append(toIndentedString(pet)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public void writeToParcel(Parcel out, int flags) { + out.writeValue(pet); + } + + SinglePetResponse(Parcel in) { + pet = (OneOfSinglePetResponsePet)in.readValue(OneOfSinglePetResponsePet.class.getClassLoader()); + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { + public SinglePetResponse createFromParcel(Parcel in) { + return new SinglePetResponse(in); + } + public SinglePetResponse[] newArray(int size) { + return new SinglePetResponse[size]; + } + }; +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/SpecialModelName.java index 5c74cd6e7ba..a7854761785 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,33 +23,36 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * SpecialModelName */ -public class SpecialModelName { +public class SpecialModelName implements Parcelable { @SerializedName("$special[property.name]") private Long $specialPropertyName = null; + + public SpecialModelName() { + } public SpecialModelName $specialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; return this; } - - - /** - * Get $specialPropertyName - * @return $specialPropertyName + /** + * Get $specialPropertyName + * @return $specialPropertyName **/ @Schema(description = "") public Long get$SpecialPropertyName() { return $specialPropertyName; } + public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -63,9 +67,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash($specialPropertyName); + return Objects.hash($specialPropertyName); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -87,19 +92,13 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue($specialPropertyName); } - public SpecialModelName() { - super(); - } - SpecialModelName(Parcel in) { - $specialPropertyName = (Long)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Tag.java index 7ba7e5b04cb..bdd56f29fe6 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Tag.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,54 +23,57 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * Tag */ -public class Tag { +public class Tag implements Parcelable { @SerializedName("id") private Long id = null; @SerializedName("name") private String name = null; + + public Tag() { + } public Tag id(Long id) { this.id = id; return this; } - - - /** - * Get id - * @return id + /** + * Get id + * @return id **/ @Schema(description = "") public Long getId() { return id; } + public void setId(Long id) { this.id = id; } + public Tag name(String name) { this.name = name; return this; } - - - /** - * Get name - * @return name + /** + * Get name + * @return name **/ @Schema(description = "") public String getName() { return name; } + public void setName(String name) { this.name = name; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -85,9 +89,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(id, name); + return Objects.hash(id, name); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -110,22 +115,15 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(id); out.writeValue(name); } - public Tag() { - super(); - } - Tag(Parcel in) { - id = (Long)in.readValue(null); - name = (String)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/User.java index 3bd257defd1..5b8eebef3f3 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/User.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,13 +23,12 @@ import java.io.IOException; import android.os.Parcelable; import android.os.Parcel; - /** * User */ -public class User { +public class User implements Parcelable { @SerializedName("id") private Long id = null; @@ -52,150 +52,154 @@ public class User { @SerializedName("userStatus") private Integer userStatus = null; + + public User() { + } public User id(Long id) { this.id = id; return this; } - - - /** - * Get id - * @return id + /** + * Get id + * @return id **/ @Schema(description = "") public Long getId() { return id; } + public void setId(Long id) { this.id = id; } + public User username(String username) { this.username = username; return this; } - - - /** - * Get username - * @return username + /** + * Get username + * @return username **/ @Schema(description = "") public String getUsername() { return username; } + public void setUsername(String username) { this.username = username; } + public User firstName(String firstName) { this.firstName = firstName; return this; } - - - /** - * Get firstName - * @return firstName + /** + * Get firstName + * @return firstName **/ @Schema(description = "") public String getFirstName() { return firstName; } + public void setFirstName(String firstName) { this.firstName = firstName; } + public User lastName(String lastName) { this.lastName = lastName; return this; } - - - /** - * Get lastName - * @return lastName + /** + * Get lastName + * @return lastName **/ @Schema(description = "") public String getLastName() { return lastName; } + public void setLastName(String lastName) { this.lastName = lastName; } + public User email(String email) { this.email = email; return this; } - - - /** - * Get email - * @return email + /** + * Get email + * @return email **/ @Schema(description = "") public String getEmail() { return email; } + public void setEmail(String email) { this.email = email; } + public User password(String password) { this.password = password; return this; } - - - /** - * Get password - * @return password + /** + * Get password + * @return password **/ @Schema(description = "") public String getPassword() { return password; } + public void setPassword(String password) { this.password = password; } + public User phone(String phone) { this.phone = phone; return this; } - - - /** - * Get phone - * @return phone + /** + * Get phone + * @return phone **/ @Schema(description = "") public String getPhone() { return phone; } + public void setPhone(String phone) { this.phone = phone; } + public User userStatus(Integer userStatus) { this.userStatus = userStatus; return this; } - - - /** - * User Status - * @return userStatus + /** + * User Status + * @return userStatus **/ @Schema(description = "User Status") public Integer getUserStatus() { return userStatus; } + public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -217,9 +221,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -248,8 +253,8 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } + public void writeToParcel(Parcel out, int flags) { - out.writeValue(id); out.writeValue(username); out.writeValue(firstName); @@ -260,28 +265,15 @@ public void writeToParcel(Parcel out, int flags) { out.writeValue(userStatus); } - public User() { - super(); - } - User(Parcel in) { - id = (Long)in.readValue(null); - username = (String)in.readValue(null); - firstName = (String)in.readValue(null); - lastName = (String)in.readValue(null); - email = (String)in.readValue(null); - password = (String)in.readValue(null); - phone = (String)in.readValue(null); - userStatus = (Integer)in.readValue(null); - } public int describeContents() { diff --git a/samples/client/petstore/java/okhttp-gson/.swagger-codegen/VERSION b/samples/client/petstore/java/okhttp-gson/.swagger-codegen/VERSION index 8ea7a72a83e..a81b3f2a0b8 100644 --- a/samples/client/petstore/java/okhttp-gson/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/okhttp-gson/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.11-SNAPSHOT \ No newline at end of file +3.0.12-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson/docs/SinglePetResponse.md b/samples/client/petstore/java/okhttp-gson/docs/SinglePetResponse.md index 9415d48136e..1b2685bb393 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/SinglePetResponse.md +++ b/samples/client/petstore/java/okhttp-gson/docs/SinglePetResponse.md @@ -3,4 +3,4 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pet** | [**OneOfSinglePetResponsePet**](.md) | | [optional] +**pet** | [**OneOfSinglePetResponsePet**](OneOfSinglePetResponsePet.md) | | [optional] diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/JSON.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/JSON.java index 474fa9a769d..716217f9a38 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/JSON.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/JSON.java @@ -54,7 +54,6 @@ public static GsonBuilder createGson() { @Override public Class getClassForElement(JsonElement readElement) { Map> classByDiscriminatorValue = new HashMap<>(); - classByDiscriminatorValue.put("Cat".toUpperCase(), Cat.class); classByDiscriminatorValue.put("Dog".toUpperCase(), Dog.class); classByDiscriminatorValue.put("Animal".toUpperCase(), Animal.class); @@ -72,7 +71,6 @@ public void postDeserialize(Animal result, JsonElement src, Gson gson) { @Override public void postSerialize(JsonElement result, Animal src, Gson gson) { Map, String> discriminatorValueByClass = new HashMap<>(); - discriminatorValueByClass.put(Cat.class, "Cat"); discriminatorValueByClass.put(Dog.class, "Dog"); discriminatorValueByClass.put(Animal.class, "Animal"); diff --git a/samples/client/petstore/java/resteasy/docs/SinglePetResponse.md b/samples/client/petstore/java/resteasy/docs/SinglePetResponse.md index a838236439c..1b2685bb393 100644 --- a/samples/client/petstore/java/resteasy/docs/SinglePetResponse.md +++ b/samples/client/petstore/java/resteasy/docs/SinglePetResponse.md @@ -3,4 +3,4 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pet** | [**Object**](.md) | | [optional] +**pet** | [**OneOfSinglePetResponsePet**](OneOfSinglePetResponsePet.md) | | [optional] diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Cat.java index 4f1a8d20372..1884158dc6d 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Cat.java @@ -24,7 +24,7 @@ */ -public class Cat extends Animal implements OneOfAllPetsResponseItems { +public class Cat extends Animal implements OneOfAllPetsResponseItems, OneOfSinglePetResponsePet { @JsonProperty("declawed") private Boolean declawed = null; diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Dog.java index 1090455c466..e9a493f798a 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Dog.java @@ -24,7 +24,7 @@ */ -public class Dog extends Animal implements OneOfAllPetsResponseItems { +public class Dog extends Animal implements OneOfAllPetsResponseItems, OneOfSinglePetResponsePet { @JsonProperty("breed") private String breed = null; diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/OneOfSinglePetResponsePet.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/OneOfSinglePetResponsePet.java new file mode 100644 index 00000000000..cf417718aa8 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/OneOfSinglePetResponsePet.java @@ -0,0 +1,20 @@ +/* + * 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; + +/** +* OneOfSinglePetResponsePet +*/ +public interface OneOfSinglePetResponsePet { + +} diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/SinglePetResponse.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/SinglePetResponse.java index a13360ed77a..440c7f3d660 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/SinglePetResponse.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/SinglePetResponse.java @@ -17,6 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.client.model.OneOfSinglePetResponsePet; import io.swagger.v3.oas.annotations.media.Schema; /** * SinglePetResponse @@ -25,9 +26,9 @@ public class SinglePetResponse { @JsonProperty("pet") - private Object pet = null; + private OneOfSinglePetResponsePet pet = null; - public SinglePetResponse pet(Object pet) { + public SinglePetResponse pet(OneOfSinglePetResponsePet pet) { this.pet = pet; return this; } @@ -37,11 +38,11 @@ public SinglePetResponse pet(Object pet) { * @return pet **/ @Schema(description = "") - public Object getPet() { + public OneOfSinglePetResponsePet getPet() { return pet; } - public void setPet(Object pet) { + public void setPet(OneOfSinglePetResponsePet pet) { this.pet = pet; } diff --git a/samples/client/petstore/java/resttemplate-withXml/.swagger-codegen/VERSION b/samples/client/petstore/java/resttemplate-withXml/.swagger-codegen/VERSION index 8ea7a72a83e..a81b3f2a0b8 100644 --- a/samples/client/petstore/java/resttemplate-withXml/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/resttemplate-withXml/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.11-SNAPSHOT \ No newline at end of file +3.0.12-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Animal.java index 5a856cae260..1cce17f72ab 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Animal.java @@ -17,6 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; @@ -35,8 +36,7 @@ @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "Animal") public class Animal { - @JsonProperty("className") - @JacksonXmlProperty(localName = "className") + @JsonTypeId @XmlElement(name = "className") private String className = null; diff --git a/samples/client/petstore/java/resttemplate/.swagger-codegen/VERSION b/samples/client/petstore/java/resttemplate/.swagger-codegen/VERSION index 8ea7a72a83e..a81b3f2a0b8 100644 --- a/samples/client/petstore/java/resttemplate/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/resttemplate/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.11-SNAPSHOT \ No newline at end of file +3.0.12-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Animal.java index f5a3a37d700..a0c711f26ac 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Animal.java @@ -17,6 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; @@ -31,7 +32,7 @@ }) public class Animal { - @JsonProperty("className") + @JsonTypeId private String className = null; @JsonProperty("color") diff --git a/samples/client/petstore/java/retrofit/.swagger-codegen/VERSION b/samples/client/petstore/java/retrofit/.swagger-codegen/VERSION index 8ea7a72a83e..a81b3f2a0b8 100644 --- a/samples/client/petstore/java/retrofit/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/retrofit/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.11-SNAPSHOT \ No newline at end of file +3.0.12-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play24/.swagger-codegen/VERSION b/samples/client/petstore/java/retrofit2-play24/.swagger-codegen/VERSION index 8ea7a72a83e..a81b3f2a0b8 100644 --- a/samples/client/petstore/java/retrofit2-play24/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/retrofit2-play24/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.11-SNAPSHOT \ No newline at end of file +3.0.12-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Animal.java index 4b34a9aaa4f..c2fe762871d 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Animal.java @@ -17,6 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; @@ -33,7 +34,7 @@ }) public class Animal { - @JsonProperty("className") + @JsonTypeId private String className = null; @JsonProperty("color") diff --git a/samples/client/petstore/java/retrofit2-play25/.swagger-codegen/VERSION b/samples/client/petstore/java/retrofit2-play25/.swagger-codegen/VERSION index ad121e8340e..a81b3f2a0b8 100644 --- a/samples/client/petstore/java/retrofit2-play25/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/retrofit2-play25/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.1-SNAPSHOT \ No newline at end of file +3.0.12-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play25/docs/FakeApi.md b/samples/client/petstore/java/retrofit2-play25/docs/FakeApi.md index 1fce79be461..8586c57fa75 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/FakeApi.md @@ -329,10 +329,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**Object**](Object.md)| | [optional] **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] - **enumHeaderString** | [**String**](.md)| Header parameter enum test (string) | [optional] + **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [enum: _abc, -efg, (xyz)] **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] - **enumQueryString** | [**String**](.md)| Query parameter enum test (string) | [optional] - **enumQueryInteger** | [**Integer**](.md)| Query parameter enum test (double) | [optional] + **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [enum: _abc, -efg, (xyz)] + **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] ### Return type diff --git a/samples/client/petstore/java/retrofit2-play25/docs/PetApi.md b/samples/client/petstore/java/retrofit2-play25/docs/PetApi.md index 48e9db415c1..98d493d6889 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/PetApi.md @@ -86,7 +86,7 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(); -Integer petId = 56; // Integer | Pet id to delete +Long petId = 789L; // Long | Pet id to delete String apiKey = "apiKey_example"; // String | try { Void result = apiInstance.deletePet(petId, apiKey); @@ -101,8 +101,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | [**Integer**](.md)| Pet id to delete | - **apiKey** | [**String**](.md)| | [optional] + **petId** | **Long**| Pet id to delete | + **apiKey** | **String**| | [optional] ### Return type @@ -249,7 +249,7 @@ api_key.setApiKey("YOUR API KEY"); //api_key.setApiKeyPrefix("Token"); PetApi apiInstance = new PetApi(); -Integer petId = 56; // Integer | ID of pet to return +Long petId = 789L; // Long | ID of pet to return try { Pet result = apiInstance.getPetById(petId); System.out.println(result); @@ -263,7 +263,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | [**Integer**](.md)| ID of pet to return | + **petId** | **Long**| ID of pet to return | ### Return type @@ -351,7 +351,7 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(); -Integer petId = 56; // Integer | ID of pet that needs to be updated +Long petId = 789L; // Long | ID of pet that needs to be updated String name = "name_example"; // String | String status = "status_example"; // String | try { @@ -367,9 +367,9 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | [**Integer**](.md)| ID of pet that needs to be updated | - **name** | [**String**](.md)| | [optional] - **status** | [**String**](.md)| | [optional] + **petId** | **Long**| ID of pet that needs to be updated | + **name** | **String**| | [optional] + **status** | **String**| | [optional] ### Return type @@ -406,7 +406,7 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(); -Integer petId = 56; // Integer | ID of pet to update +Long petId = 789L; // Long | ID of pet to update String additionalMetadata = "additionalMetadata_example"; // String | File file = new File("file_example"); // File | try { @@ -422,8 +422,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | [**Integer**](.md)| ID of pet to update | - **additionalMetadata** | [**String**](.md)| | [optional] + **petId** | **Long**| ID of pet to update | + **additionalMetadata** | **String**| | [optional] **file** | **File**| | [optional] ### Return type diff --git a/samples/client/petstore/java/retrofit2-play25/docs/StoreApi.md b/samples/client/petstore/java/retrofit2-play25/docs/StoreApi.md index cd90b85354e..f37736d7a73 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/StoreApi.md @@ -39,7 +39,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **orderId** | [**String**](.md)| ID of the order that needs to be deleted | + **orderId** | **String**| ID of the order that needs to be deleted | ### Return type @@ -121,7 +121,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other val StoreApi apiInstance = new StoreApi(); -Integer orderId = 56; // Integer | ID of pet that needs to be fetched +Long orderId = 789L; // 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** | [**Integer**](.md)| ID of pet that needs to be fetched | + **orderId** | **Long**| ID of pet that needs to be fetched | [enum: ] ### Return type diff --git a/samples/client/petstore/java/retrofit2-play25/docs/UserApi.md b/samples/client/petstore/java/retrofit2-play25/docs/UserApi.md index 7261c090915..e447e3a8318 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/UserApi.md @@ -174,7 +174,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **username** | [**String**](.md)| The name that needs to be deleted | + **username** | **String**| The name that needs to be deleted | ### Return type @@ -217,7 +217,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **username** | [**String**](.md)| The name that needs to be fetched. Use user1 for testing. | + **username** | **String**| The name that needs to be fetched. Use user1 for testing. | ### Return type @@ -261,8 +261,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **username** | [**String**](.md)| The user name for login | - **password** | [**String**](.md)| The password for login in clear text | + **username** | **String**| The user name for login | + **password** | **String**| The password for login in clear text | ### Return type @@ -348,7 +348,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**User**](User.md)| Updated user object | - **username** | [**String**](.md)| name that need to be deleted | + **username** | **String**| name that need to be deleted | ### Return type diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/api/FakeApi.java index 90fad2bc1d0..f1ea27c7e08 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/api/FakeApi.java @@ -99,7 +99,7 @@ CompletionStage> testClientModel( * @return Call<Void> */ @Headers({ - "Content-Type:application/json; charset=utf-8" + "Content-Type:application/json; charset=utf-8" }) @POST("fake") CompletionStage> testEndpointParameters( @@ -122,7 +122,7 @@ CompletionStage> testEndpointParameters( }) @GET("fake") CompletionStage> testEnumParameters( - @retrofit2.http.Body Object body , @retrofit2.http.Header("enum_header_string_array") List enumHeaderStringArray , @retrofit2.http.Header("enum_header_string") String enumHeaderString , @retrofit2.http.Path("enum_query_string_array") List enumQueryStringArray , @retrofit2.http.Path("enum_query_string") String enumQueryString , @retrofit2.http.Path("enum_query_integer") Integer enumQueryInteger + @retrofit2.http.Body Object body , @retrofit2.http.Header("enum_header_string_array") List enumHeaderStringArray , @retrofit2.http.Header("enum_header_string") String enumHeaderString , @retrofit2.http.Query("enum_query_string_array") List enumQueryStringArray , @retrofit2.http.Query("enum_query_string") String enumQueryString , @retrofit2.http.Query("enum_query_integer") Integer enumQueryInteger ); /** diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/api/PetApi.java index 00751768aac..9b196cfce09 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/api/PetApi.java @@ -45,7 +45,7 @@ CompletionStage> addPet( */ @DELETE("pet/{petId}") CompletionStage> deletePet( - @retrofit2.http.Path("petId") Integer petId , @retrofit2.http.Header("api_key") String apiKey + @retrofit2.http.Path("petId") Long petId , @retrofit2.http.Header("api_key") String apiKey ); /** @@ -56,7 +56,7 @@ CompletionStage> deletePet( */ @GET("pet/findByStatus") CompletionStage>> findPetsByStatus( - @retrofit2.http.Path("status") List status + @retrofit2.http.Query("status") List status ); /** @@ -67,7 +67,7 @@ CompletionStage>> findPetsByStatus( */ @GET("pet/findByTags") CompletionStage>> findPetsByTags( - @retrofit2.http.Path("tags") List tags + @retrofit2.http.Query("tags") List tags ); /** @@ -78,7 +78,7 @@ CompletionStage>> findPetsByTags( */ @GET("pet/{petId}") CompletionStage> getPetById( - @retrofit2.http.Path("petId") Integer petId + @retrofit2.http.Path("petId") Long petId ); /** @@ -106,7 +106,7 @@ CompletionStage> updatePet( @retrofit2.http.FormUrlEncoded @POST("pet/{petId}") CompletionStage> updatePetWithForm( - @retrofit2.http.Path("petId") Integer petId , @retrofit2.http.Field("name") String name, @retrofit2.http.Field("status") String status + @retrofit2.http.Path("petId") Long petId , @retrofit2.http.Field("name") String name, @retrofit2.http.Field("status") String status ); /** @@ -120,7 +120,7 @@ CompletionStage> updatePetWithForm( @retrofit2.http.Multipart @POST("pet/{petId}/uploadImage") CompletionStage> uploadFile( - @retrofit2.http.Path("petId") Integer petId , @retrofit2.http.Part("additionalMetadata") String additionalMetadata, @retrofit2.http.Part okhttp3.MultipartBody.Part file + @retrofit2.http.Path("petId") Long petId , @retrofit2.http.Part("additionalMetadata") String additionalMetadata, @retrofit2.http.Part okhttp3.MultipartBody.Part file ); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/api/StoreApi.java index aa5508b30df..df0a4cd3c15 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/api/StoreApi.java @@ -48,7 +48,7 @@ CompletionStage> deleteOrder( */ @GET("store/order/{order_id}") CompletionStage> getOrderById( - @retrofit2.http.Path("order_id") Integer orderId + @retrofit2.http.Path("order_id") Long orderId ); /** diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/api/UserApi.java index f7aded4ca94..302a2b75a1e 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/api/UserApi.java @@ -93,7 +93,7 @@ CompletionStage> getUserByName( */ @GET("user/login") CompletionStage> loginUser( - @retrofit2.http.Path("username") String username , @retrofit2.http.Path("password") String password + @retrofit2.http.Query("username") String username , @retrofit2.http.Query("password") String password ); /** diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java index 723081d6e8a..c237b61c571 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -22,26 +23,23 @@ import java.util.Map; import javax.validation.constraints.*; import javax.validation.Valid; - /** * AdditionalPropertiesClass */ -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass { @JsonProperty("map_property") - private Map mapProperty = null; @JsonProperty("map_of_map_property") - private Map> mapOfMapProperty = null; + public AdditionalPropertiesClass mapProperty(Map mapProperty) { this.mapProperty = mapProperty; return this; } - public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) { if (this.mapProperty == null) { this.mapProperty = new HashMap<>(); @@ -49,23 +47,25 @@ public AdditionalPropertiesClass putMapPropertyItem(String key, String mapProper this.mapProperty.put(key, mapPropertyItem); return this; } - /** - * Get mapProperty - * @return mapProperty + + /** + * Get mapProperty + * @return mapProperty **/ - @Schema(description = "") + @Schema(description = "") public Map getMapProperty() { return mapProperty; } + public void setMapProperty(Map mapProperty) { this.mapProperty = mapProperty; } + public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { this.mapOfMapProperty = mapOfMapProperty; return this; } - public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map mapOfMapPropertyItem) { if (this.mapOfMapProperty == null) { this.mapOfMapProperty = new HashMap<>(); @@ -73,18 +73,22 @@ public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map> getMapOfMapProperty() { return mapOfMapProperty; } + public void setMapOfMapProperty(Map> mapOfMapProperty) { this.mapOfMapProperty = mapOfMapProperty; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -100,9 +104,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(mapProperty, mapOfMapProperty); + return Objects.hash(mapProperty, mapOfMapProperty); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Animal.java index 305d1ceda76..c2fe762871d 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Animal.java @@ -13,70 +13,71 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.*; import javax.validation.Valid; - /** * Animal */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Discriminator{propertyName='className', mapping=null}", visible = true ) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true ) @JsonSubTypes({ @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), }) -public class Animal { - - @JsonProperty("className") +public class Animal { + @JsonTypeId private String className = null; @JsonProperty("color") - private String color = "red"; + public Animal className(String className) { this.className = className; return this; } - - - /** - * Get className - * @return className + /** + * Get className + * @return className **/ - @NotNull - @Schema(required = true, description = "") + @NotNull + @Schema(required = true, description = "") public String getClassName() { return className; } + public void setClassName(String className) { this.className = className; } + public Animal color(String color) { this.color = color; return this; } - - - /** - * Get color - * @return color + /** + * Get color + * @return color **/ - @Schema(description = "") + @Schema(description = "") public String getColor() { return color; } + public void setColor(String color) { this.color = color; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -92,9 +93,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(className, color); + return Objects.hash(className, color); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/AnimalFarm.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/AnimalFarm.java index 2d6157de337..1d079af9bec 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/AnimalFarm.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/AnimalFarm.java @@ -13,17 +13,19 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import io.swagger.client.model.Animal; import java.util.ArrayList; import java.util.List; import javax.validation.constraints.*; import javax.validation.Valid; - /** * AnimalFarm */ + public class AnimalFarm extends ArrayList { + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -37,9 +39,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(super.hashCode()); + return Objects.hash(super.hashCode()); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java index f1849b67b95..09afad6a419 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -22,16 +23,15 @@ import java.util.List; import javax.validation.constraints.*; import javax.validation.Valid; - /** * ArrayOfArrayOfNumberOnly */ -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly { @JsonProperty("ArrayArrayNumber") - private List> arrayArrayNumber = null; + public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; return this; @@ -45,18 +45,21 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr return this; } - /** - * Get arrayArrayNumber - * @return arrayArrayNumber + /** + * Get arrayArrayNumber + * @return arrayArrayNumber **/ - @Valid - @Schema(description = "") + @Valid + @Schema(description = "") public List> getArrayArrayNumber() { return arrayArrayNumber; } + public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -71,9 +74,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(arrayArrayNumber); + return Objects.hash(arrayArrayNumber); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java index 3b1a7e15973..d7309becb95 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -22,16 +23,15 @@ import java.util.List; import javax.validation.constraints.*; import javax.validation.Valid; - /** * ArrayOfNumberOnly */ -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly { @JsonProperty("ArrayNumber") - private List arrayNumber = null; + public ArrayOfNumberOnly arrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; return this; @@ -45,18 +45,21 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { return this; } - /** - * Get arrayNumber - * @return arrayNumber + /** + * Get arrayNumber + * @return arrayNumber **/ - @Valid - @Schema(description = "") + @Valid + @Schema(description = "") public List getArrayNumber() { return arrayNumber; } + public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -71,9 +74,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(arrayNumber); + return Objects.hash(arrayNumber); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayTest.java index 677eb210552..852f5e2e67c 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayTest.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -22,24 +23,21 @@ import java.util.List; import javax.validation.constraints.*; import javax.validation.Valid; - /** * ArrayTest */ -public class ArrayTest { +public class ArrayTest { @JsonProperty("array_of_string") - private List arrayOfString = null; @JsonProperty("array_array_of_integer") - private List> arrayArrayOfInteger = null; @JsonProperty("array_array_of_model") - private List> arrayArrayOfModel = null; + public ArrayTest arrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; return this; @@ -53,17 +51,19 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { return this; } - /** - * Get arrayOfString - * @return arrayOfString + /** + * Get arrayOfString + * @return arrayOfString **/ - @Schema(description = "") + @Schema(description = "") public List getArrayOfString() { return arrayOfString; } + public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } + public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; return this; @@ -77,18 +77,20 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) return this; } - /** - * Get arrayArrayOfInteger - * @return arrayArrayOfInteger + /** + * Get arrayArrayOfInteger + * @return arrayArrayOfInteger **/ - @Valid - @Schema(description = "") + @Valid + @Schema(description = "") public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } + public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; return this; @@ -102,18 +104,21 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI return this; } - /** - * Get arrayArrayOfModel - * @return arrayArrayOfModel + /** + * Get arrayArrayOfModel + * @return arrayArrayOfModel **/ - @Valid - @Schema(description = "") + @Valid + @Schema(description = "") public List> getArrayArrayOfModel() { return arrayArrayOfModel; } + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -130,9 +135,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); + return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Capitalization.java index e13a860bd06..7c5763a73ff 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Capitalization.java @@ -13,150 +13,146 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.*; import javax.validation.Valid; - /** * Capitalization */ -public class Capitalization { +public class Capitalization { @JsonProperty("smallCamel") - private String smallCamel = null; @JsonProperty("CapitalCamel") - private String capitalCamel = null; @JsonProperty("small_Snake") - private String smallSnake = null; @JsonProperty("Capital_Snake") - private String capitalSnake = null; @JsonProperty("SCA_ETH_Flow_Points") - private String scAETHFlowPoints = null; @JsonProperty("ATT_NAME") - private String ATT_NAME = null; + public Capitalization smallCamel(String smallCamel) { this.smallCamel = smallCamel; return this; } - - - /** - * Get smallCamel - * @return smallCamel + /** + * Get smallCamel + * @return smallCamel **/ - @Schema(description = "") + @Schema(description = "") public String getSmallCamel() { return smallCamel; } + public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } + public Capitalization capitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; return this; } - - - /** - * Get capitalCamel - * @return capitalCamel + /** + * Get capitalCamel + * @return capitalCamel **/ - @Schema(description = "") + @Schema(description = "") public String getCapitalCamel() { return capitalCamel; } + public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } + public Capitalization smallSnake(String smallSnake) { this.smallSnake = smallSnake; return this; } - - - /** - * Get smallSnake - * @return smallSnake + /** + * Get smallSnake + * @return smallSnake **/ - @Schema(description = "") + @Schema(description = "") public String getSmallSnake() { return smallSnake; } + public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } + public Capitalization capitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; return this; } - - - /** - * Get capitalSnake - * @return capitalSnake + /** + * Get capitalSnake + * @return capitalSnake **/ - @Schema(description = "") + @Schema(description = "") public String getCapitalSnake() { return capitalSnake; } + public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } + public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; return this; } - - - /** - * Get scAETHFlowPoints - * @return scAETHFlowPoints + /** + * Get scAETHFlowPoints + * @return scAETHFlowPoints **/ - @Schema(description = "") + @Schema(description = "") public String getScAETHFlowPoints() { return scAETHFlowPoints; } + public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } + public Capitalization ATT_NAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; return this; } - - - /** - * Name of the pet - * @return ATT_NAME + /** + * Name of the pet + * @return ATT_NAME **/ - @Schema(description = "Name of the pet ") + @Schema(description = "Name of the pet ") public String getATTNAME() { return ATT_NAME; } + public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -176,9 +172,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); + return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Cat.java index ca068df2974..46025351e3c 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Cat.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -20,34 +21,34 @@ import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.*; import javax.validation.Valid; - /** * Cat */ -public class Cat extends Animal { +public class Cat extends Animal { @JsonProperty("declawed") - private Boolean declawed = null; + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; } - - - /** - * Get declawed - * @return declawed + /** + * Get declawed + * @return declawed **/ - @Schema(description = "") + @Schema(description = "") public Boolean isDeclawed() { return declawed; } + public void setDeclawed(Boolean declawed) { this.declawed = declawed; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -63,9 +64,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(declawed, super.hashCode()); + return Objects.hash(declawed, super.hashCode()); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Category.java index 0ebf4e05eda..a7c95326dde 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Category.java @@ -13,62 +13,62 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.*; import javax.validation.Valid; - /** * Category */ -public class Category { +public class Category { @JsonProperty("id") - private Long id = null; @JsonProperty("name") - private String name = null; + public Category id(Long id) { this.id = id; return this; } - - - /** - * Get id - * @return id + /** + * Get id + * @return id **/ - @Schema(description = "") + @Schema(description = "") public Long getId() { return id; } + public void setId(Long id) { this.id = id; } + public Category name(String name) { this.name = name; return this; } - - - /** - * Get name - * @return name + /** + * Get name + * @return name **/ - @Schema(description = "") + @Schema(description = "") public String getName() { return name; } + public void setName(String name) { this.name = name; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -84,9 +84,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(id, name); + return Objects.hash(id, name); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ClassModel.java index 34875e9e641..2768cc82781 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ClassModel.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ClassModel.java @@ -13,40 +13,41 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.*; import javax.validation.Valid; - /** * Model for testing model with \"_class\" property */ @Schema(description = "Model for testing model with \"_class\" property") -public class ClassModel { +public class ClassModel { @JsonProperty("_class") - private String propertyClass = null; + public ClassModel propertyClass(String propertyClass) { this.propertyClass = propertyClass; return this; } - - - /** - * Get propertyClass - * @return propertyClass + /** + * Get propertyClass + * @return propertyClass **/ - @Schema(description = "") + @Schema(description = "") public String getPropertyClass() { return propertyClass; } + public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -61,9 +62,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(propertyClass); + return Objects.hash(propertyClass); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Client.java index 2a614b63bf5..dadc6bcb486 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Client.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Client.java @@ -13,40 +13,41 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.*; import javax.validation.Valid; - /** * Client */ -public class Client { +public class Client { @JsonProperty("client") - private String client = null; + public Client client(String client) { this.client = client; return this; } - - - /** - * Get client - * @return client + /** + * Get client + * @return client **/ - @Schema(description = "") + @Schema(description = "") public String getClient() { return client; } + public void setClient(String client) { this.client = client; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -61,9 +62,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(client); + return Objects.hash(client); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Dog.java index 0ccc283b291..62884f90987 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Dog.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -20,34 +21,34 @@ import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.*; import javax.validation.Valid; - /** * Dog */ -public class Dog extends Animal { +public class Dog extends Animal { @JsonProperty("breed") - private String breed = null; + public Dog breed(String breed) { this.breed = breed; return this; } - - - /** - * Get breed - * @return breed + /** + * Get breed + * @return breed **/ - @Schema(description = "") + @Schema(description = "") public String getBreed() { return breed; } + public void setBreed(String breed) { this.breed = breed; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -63,9 +64,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(breed, super.hashCode()); + return Objects.hash(breed, super.hashCode()); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/EnumArrays.java index 45f6fe4450c..c6e218f95c2 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/EnumArrays.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -21,11 +22,11 @@ import java.util.List; import javax.validation.constraints.*; import javax.validation.Valid; - /** * EnumArrays */ + public class EnumArrays { /** * Gets or Sets justSymbol @@ -58,10 +59,9 @@ public static JustSymbolEnum fromValue(String text) { return null; } - } - @JsonProperty("just_symbol") - + } @JsonProperty("just_symbol") private JustSymbolEnum justSymbol = null; + /** * Gets or Sets arrayEnum */ @@ -93,28 +93,27 @@ public static ArrayEnumEnum fromValue(String text) { return null; } - } - @JsonProperty("array_enum") - + } @JsonProperty("array_enum") private List arrayEnum = null; + public EnumArrays justSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; return this; } - - - /** - * Get justSymbol - * @return justSymbol + /** + * Get justSymbol + * @return justSymbol **/ - @Schema(description = "") + @Schema(description = "") public JustSymbolEnum getJustSymbol() { return justSymbol; } + public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } + public EnumArrays arrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; return this; @@ -128,17 +127,20 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { return this; } - /** - * Get arrayEnum - * @return arrayEnum + /** + * Get arrayEnum + * @return arrayEnum **/ - @Schema(description = "") + @Schema(description = "") public List getArrayEnum() { return arrayEnum; } + public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -154,9 +156,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(justSymbol, arrayEnum); + return Objects.hash(justSymbol, arrayEnum); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/EnumClass.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/EnumClass.java index 223f5c98eee..89b93154546 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/EnumClass.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/EnumClass.java @@ -12,7 +12,10 @@ package io.swagger.client.model; - +import java.util.Objects; +import java.util.Arrays; +import javax.validation.constraints.*; +import javax.validation.Valid; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/EnumTest.java index 5dbcfdd88ac..e6eee369907 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/EnumTest.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -20,11 +21,11 @@ import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.*; import javax.validation.Valid; - /** * EnumTest */ + public class EnumTest { /** * Gets or Sets enumString @@ -58,10 +59,9 @@ public static EnumStringEnum fromValue(String text) { return null; } - } - @JsonProperty("enum_string") - + } @JsonProperty("enum_string") private EnumStringEnum enumString = null; + /** * Gets or Sets enumInteger */ @@ -93,10 +93,9 @@ public static EnumIntegerEnum fromValue(String text) { return null; } - } - @JsonProperty("enum_integer") - + } @JsonProperty("enum_integer") private EnumIntegerEnum enumInteger = null; + /** * Gets or Sets enumNumber */ @@ -128,87 +127,86 @@ public static EnumNumberEnum fromValue(String text) { return null; } - } - @JsonProperty("enum_number") - + } @JsonProperty("enum_number") private EnumNumberEnum enumNumber = null; @JsonProperty("outerEnum") - private OuterEnum outerEnum = null; + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; } - - - /** - * Get enumString - * @return enumString + /** + * Get enumString + * @return enumString **/ - @Schema(description = "") + @Schema(description = "") public EnumStringEnum getEnumString() { return enumString; } + public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } + public EnumTest enumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; return this; } - - - /** - * Get enumInteger - * @return enumInteger + /** + * Get enumInteger + * @return enumInteger **/ - @Schema(description = "") + @Schema(description = "") public EnumIntegerEnum getEnumInteger() { return enumInteger; } + public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } + public EnumTest enumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; return this; } - - - /** - * Get enumNumber - * @return enumNumber + /** + * Get enumNumber + * @return enumNumber **/ - @Schema(description = "") + @Schema(description = "") public EnumNumberEnum getEnumNumber() { return enumNumber; } + public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } + public EnumTest outerEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; return this; } - - - /** - * Get outerEnum - * @return outerEnum + /** + * Get outerEnum + * @return outerEnum **/ - @Valid - @Schema(description = "") + @Valid + @Schema(description = "") public OuterEnum getOuterEnum() { return outerEnum; } + public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -226,9 +224,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(enumString, enumInteger, enumNumber, outerEnum); + return Objects.hash(enumString, enumInteger, enumNumber, outerEnum); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/FormatTest.java index 4bbad9e8085..3bf9ae0ba76 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/FormatTest.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -23,316 +24,304 @@ import org.threeten.bp.OffsetDateTime; import javax.validation.constraints.*; import javax.validation.Valid; - /** * FormatTest */ -public class FormatTest { +public class FormatTest { @JsonProperty("integer") - private Integer integer = null; @JsonProperty("int32") - private Integer int32 = null; @JsonProperty("int64") - private Long int64 = null; @JsonProperty("number") - private BigDecimal number = null; @JsonProperty("float") - private Float _float = null; @JsonProperty("double") - private Double _double = null; @JsonProperty("string") - private String string = null; @JsonProperty("byte") - private String _byte = null; @JsonProperty("binary") - private String binary = null; @JsonProperty("date") - private LocalDate date = null; @JsonProperty("dateTime") - private OffsetDateTime dateTime = null; @JsonProperty("uuid") - private UUID uuid = null; @JsonProperty("password") - private String password = null; + public FormatTest integer(Integer integer) { this.integer = integer; return this; } - - - /** - * Get integer - * minimum: 10 - * maximum: 100 - * @return integer + /** + * Get integer + * minimum: 10 + * maximum: 100 + * @return integer **/ - @Min(10) @Max(100) @Schema(description = "") + @Min(10) @Max(100) @Schema(description = "") public Integer getInteger() { return integer; } + public void setInteger(Integer integer) { this.integer = integer; } + public FormatTest int32(Integer int32) { this.int32 = int32; return this; } - - - /** - * Get int32 - * minimum: 20 - * maximum: 200 - * @return int32 + /** + * Get int32 + * minimum: 20 + * maximum: 200 + * @return int32 **/ - @Min(20) @Max(200) @Schema(description = "") + @Min(20) @Max(200) @Schema(description = "") public Integer getInt32() { return int32; } + public void setInt32(Integer int32) { this.int32 = int32; } + public FormatTest int64(Long int64) { this.int64 = int64; return this; } - - - /** - * Get int64 - * @return int64 + /** + * Get int64 + * @return int64 **/ - @Schema(description = "") + @Schema(description = "") public Long getInt64() { return int64; } + public void setInt64(Long int64) { this.int64 = int64; } + public FormatTest number(BigDecimal number) { this.number = number; return this; } - - - /** - * Get number - * minimum: 32 - * maximum: 543 - * @return number + /** + * Get number + * minimum: 32 + * maximum: 543 + * @return number **/ - @NotNull - @Valid - @DecimalMin("32") @DecimalMax("543") @Schema(required = true, description = "") + @NotNull + @Valid + @DecimalMin("32") @DecimalMax("543") @Schema(required = true, description = "") public BigDecimal getNumber() { return number; } + public void setNumber(BigDecimal number) { this.number = number; } + public FormatTest _float(Float _float) { this._float = _float; return this; } - - - /** - * Get _float - * minimum: 54 - * maximum: 987 - * @return _float + /** + * Get _float + * minimum: 54 + * maximum: 987 + * @return _float **/ - @DecimalMin("54") @DecimalMax("987") @Schema(description = "") + @DecimalMin("54") @DecimalMax("987") @Schema(description = "") public Float getFloat() { return _float; } + public void setFloat(Float _float) { this._float = _float; } + public FormatTest _double(Double _double) { this._double = _double; return this; } - - - /** - * Get _double - * minimum: 67 - * maximum: 123 - * @return _double + /** + * Get _double + * minimum: 67 + * maximum: 123 + * @return _double **/ - @DecimalMin("67") @DecimalMax("123") @Schema(description = "") + @DecimalMin("67") @DecimalMax("123") @Schema(description = "") public Double getDouble() { return _double; } + public void setDouble(Double _double) { this._double = _double; } + public FormatTest string(String string) { this.string = string; return this; } - - - /** - * Get string - * @return string + /** + * Get string + * @return string **/ - @Pattern(regexp="/[a-z]/i") @Schema(description = "") + @Pattern(regexp="/[a-z]/i") @Schema(description = "") public String getString() { return string; } + public void setString(String string) { this.string = string; } + public FormatTest _byte(String _byte) { this._byte = _byte; return this; } - - - /** - * Get _byte - * @return _byte + /** + * Get _byte + * @return _byte **/ - @NotNull - @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$") @Schema(required = true, description = "") + @NotNull + @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$") @Schema(required = true, description = "") public String getByte() { return _byte; } + public void setByte(String _byte) { this._byte = _byte; } + public FormatTest binary(String binary) { this.binary = binary; return this; } - - - /** - * Get binary - * @return binary + /** + * Get binary + * @return binary **/ - @Schema(description = "") + @Schema(description = "") public String getBinary() { return binary; } + public void setBinary(String binary) { this.binary = binary; } + public FormatTest date(LocalDate date) { this.date = date; return this; } - - - /** - * Get date - * @return date + /** + * Get date + * @return date **/ - @NotNull - @Valid - @Schema(required = true, description = "") + @NotNull + @Valid + @Schema(required = true, description = "") public LocalDate getDate() { return date; } + public void setDate(LocalDate date) { this.date = date; } + public FormatTest dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; return this; } - - - /** - * Get dateTime - * @return dateTime + /** + * Get dateTime + * @return dateTime **/ - @Valid - @Schema(description = "") + @Valid + @Schema(description = "") public OffsetDateTime getDateTime() { return dateTime; } + public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } + public FormatTest uuid(UUID uuid) { this.uuid = uuid; return this; } - - - /** - * Get uuid - * @return uuid + /** + * Get uuid + * @return uuid **/ - @Valid - @Schema(description = "") + @Valid + @Schema(description = "") public UUID getUuid() { return uuid; } + public void setUuid(UUID uuid) { this.uuid = uuid; } + public FormatTest password(String password) { this.password = password; return this; } - - - /** - * Get password - * @return password + /** + * Get password + * @return password **/ - @NotNull - @Schema(required = true, description = "") + @NotNull + @Schema(required = true, description = "") public String getPassword() { return password; } + public void setPassword(String password) { this.password = password; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -359,9 +348,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, uuid, password); + return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, uuid, password); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java index 128a2ab6f0f..db03bd6dffb 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java @@ -13,42 +13,44 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.*; import javax.validation.Valid; - /** * HasOnlyReadOnly */ -public class HasOnlyReadOnly { +public class HasOnlyReadOnly { @JsonProperty("bar") - private String bar = null; @JsonProperty("foo") - private String foo = null; - /** - * Get bar - * @return bar + + /** + * Get bar + * @return bar **/ - @Schema(description = "") + @Schema(description = "") public String getBar() { return bar; } - /** - * Get foo - * @return foo + + /** + * Get foo + * @return foo **/ - @Schema(description = "") + @Schema(description = "") public String getFoo() { return foo; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -64,9 +66,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(bar, foo); + return Objects.hash(bar, foo); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/MapTest.java index d929761ed4d..2d7d0172acd 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/MapTest.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -22,16 +23,15 @@ import java.util.Map; import javax.validation.constraints.*; import javax.validation.Valid; - /** * MapTest */ -public class MapTest { +public class MapTest { @JsonProperty("map_map_of_string") - private Map> mapMapOfString = null; + /** * Gets or Sets inner */ @@ -63,16 +63,14 @@ public static InnerEnum fromValue(String text) { return null; } - } - @JsonProperty("map_of_enum_string") - + } @JsonProperty("map_of_enum_string") private Map mapOfEnumString = null; + public MapTest mapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; return this; } - public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { if (this.mapMapOfString == null) { this.mapMapOfString = new HashMap<>(); @@ -80,24 +78,26 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr this.mapMapOfString.put(key, mapMapOfStringItem); return this; } - /** - * Get mapMapOfString - * @return mapMapOfString + + /** + * Get mapMapOfString + * @return mapMapOfString **/ - @Valid - @Schema(description = "") + @Valid + @Schema(description = "") public Map> getMapMapOfString() { return mapMapOfString; } + public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } + public MapTest mapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; return this; } - public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { if (this.mapOfEnumString == null) { this.mapOfEnumString = new HashMap<>(); @@ -105,17 +105,21 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) this.mapOfEnumString.put(key, mapOfEnumStringItem); return this; } - /** - * Get mapOfEnumString - * @return mapOfEnumString + + /** + * Get mapOfEnumString + * @return mapOfEnumString **/ - @Schema(description = "") + @Schema(description = "") public Map getMapOfEnumString() { return mapOfEnumString; } + public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -131,9 +135,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(mapMapOfString, mapOfEnumString); + return Objects.hash(mapMapOfString, mapOfEnumString); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index b4c347d0dbf..075e03ba25c 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -25,68 +26,64 @@ import org.threeten.bp.OffsetDateTime; import javax.validation.constraints.*; import javax.validation.Valid; - /** * MixedPropertiesAndAdditionalPropertiesClass */ -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty("uuid") - private UUID uuid = null; @JsonProperty("dateTime") - private OffsetDateTime dateTime = null; @JsonProperty("map") - private Map map = null; + public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { this.uuid = uuid; return this; } - - - /** - * Get uuid - * @return uuid + /** + * Get uuid + * @return uuid **/ - @Valid - @Schema(description = "") + @Valid + @Schema(description = "") public UUID getUuid() { return uuid; } + public void setUuid(UUID uuid) { this.uuid = uuid; } + public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; return this; } - - - /** - * Get dateTime - * @return dateTime + /** + * Get dateTime + * @return dateTime **/ - @Valid - @Schema(description = "") + @Valid + @Schema(description = "") public OffsetDateTime getDateTime() { return dateTime; } + public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } + public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { this.map = map; return this; } - public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { if (this.map == null) { this.map = new HashMap<>(); @@ -94,18 +91,22 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal this.map.put(key, mapItem); return this; } - /** - * Get map - * @return map + + /** + * Get map + * @return map **/ - @Valid - @Schema(description = "") + @Valid + @Schema(description = "") public Map getMap() { return map; } + public void setMap(Map map) { this.map = map; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -122,9 +123,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(uuid, dateTime, map); + return Objects.hash(uuid, dateTime, map); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Model200Response.java index 9669e94cd63..9c21c5f1a1e 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Model200Response.java @@ -13,62 +13,62 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.*; import javax.validation.Valid; - /** * Model for testing model name starting with number */ @Schema(description = "Model for testing model name starting with number") -public class Model200Response { +public class Model200Response { @JsonProperty("name") - private Integer name = null; @JsonProperty("class") - private String propertyClass = null; + public Model200Response name(Integer name) { this.name = name; return this; } - - - /** - * Get name - * @return name + /** + * Get name + * @return name **/ - @Schema(description = "") + @Schema(description = "") public Integer getName() { return name; } + public void setName(Integer name) { this.name = name; } + public Model200Response propertyClass(String propertyClass) { this.propertyClass = propertyClass; return this; } - - - /** - * Get propertyClass - * @return propertyClass + /** + * Get propertyClass + * @return propertyClass **/ - @Schema(description = "") + @Schema(description = "") public String getPropertyClass() { return propertyClass; } + public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -84,9 +84,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(name, propertyClass); + return Objects.hash(name, propertyClass); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ModelApiResponse.java index 220bddca5d2..0d6380ec4eb 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ModelApiResponse.java @@ -13,84 +13,83 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.*; import javax.validation.Valid; - /** * ModelApiResponse */ -public class ModelApiResponse { +public class ModelApiResponse { @JsonProperty("code") - private Integer code = null; @JsonProperty("type") - private String type = null; @JsonProperty("message") - private String message = null; + public ModelApiResponse code(Integer code) { this.code = code; return this; } - - - /** - * Get code - * @return code + /** + * Get code + * @return code **/ - @Schema(description = "") + @Schema(description = "") public Integer getCode() { return code; } + public void setCode(Integer code) { this.code = code; } + public ModelApiResponse type(String type) { this.type = type; return this; } - - - /** - * Get type - * @return type + /** + * Get type + * @return type **/ - @Schema(description = "") + @Schema(description = "") public String getType() { return type; } + public void setType(String type) { this.type = type; } + public ModelApiResponse message(String message) { this.message = message; return this; } - - - /** - * Get message - * @return message + /** + * Get message + * @return message **/ - @Schema(description = "") + @Schema(description = "") public String getMessage() { return message; } + public void setMessage(String message) { this.message = message; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -107,9 +106,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(code, type, message); + return Objects.hash(code, type, message); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ModelReturn.java index ac6c6ee0439..bbb2c196e4a 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ModelReturn.java @@ -13,40 +13,41 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.*; import javax.validation.Valid; - /** * Model for testing reserved words */ @Schema(description = "Model for testing reserved words") -public class ModelReturn { +public class ModelReturn { @JsonProperty("return") - private Integer _return = null; + public ModelReturn _return(Integer _return) { this._return = _return; return this; } - - - /** - * Get _return - * @return _return + /** + * Get _return + * @return _return **/ - @Schema(description = "") + @Schema(description = "") public Integer getReturn() { return _return; } + public void setReturn(Integer _return) { this._return = _return; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -61,9 +62,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(_return); + return Objects.hash(_return); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Name.java index ca972da6a5f..3d64a6be49a 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Name.java @@ -13,87 +13,87 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.*; import javax.validation.Valid; - /** * Model for testing model name same as property name */ @Schema(description = "Model for testing model name same as property name") -public class Name { +public class Name { @JsonProperty("name") - private Integer name = null; @JsonProperty("snake_case") - private Integer snakeCase = null; @JsonProperty("property") - private String property = null; @JsonProperty("123Number") - private Integer _123Number = null; + public Name name(Integer name) { this.name = name; return this; } - - - /** - * Get name - * @return name + /** + * Get name + * @return name **/ - @NotNull - @Schema(required = true, description = "") + @NotNull + @Schema(required = true, description = "") public Integer getName() { return name; } + public void setName(Integer name) { this.name = name; } - /** - * Get snakeCase - * @return snakeCase + + /** + * Get snakeCase + * @return snakeCase **/ - @Schema(description = "") + @Schema(description = "") public Integer getSnakeCase() { return snakeCase; } + public Name property(String property) { this.property = property; return this; } - - - /** - * Get property - * @return property + /** + * Get property + * @return property **/ - @Schema(description = "") + @Schema(description = "") public String getProperty() { return property; } + public void setProperty(String property) { this.property = property; } - /** - * Get _123Number - * @return _123Number + + /** + * Get _123Number + * @return _123Number **/ - @Schema(description = "") + @Schema(description = "") public Integer get123Number() { return _123Number; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -111,9 +111,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(name, snakeCase, property, _123Number); + return Objects.hash(name, snakeCase, property, _123Number); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/NumberOnly.java index cd5d324c8bb..d513dbfc1c1 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/NumberOnly.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/NumberOnly.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -20,35 +21,35 @@ import java.math.BigDecimal; import javax.validation.constraints.*; import javax.validation.Valid; - /** * NumberOnly */ -public class NumberOnly { +public class NumberOnly { @JsonProperty("JustNumber") - private BigDecimal justNumber = null; + public NumberOnly justNumber(BigDecimal justNumber) { this.justNumber = justNumber; return this; } - - - /** - * Get justNumber - * @return justNumber + /** + * Get justNumber + * @return justNumber **/ - @Valid - @Schema(description = "") + @Valid + @Schema(description = "") public BigDecimal getJustNumber() { return justNumber; } + public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -63,9 +64,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(justNumber); + return Objects.hash(justNumber); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Order.java index 46e4d184694..e91e4a9b728 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Order.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -20,28 +21,24 @@ import org.threeten.bp.OffsetDateTime; import javax.validation.constraints.*; import javax.validation.Valid; - /** * Order */ -public class Order { +public class Order { @JsonProperty("id") - private Long id = null; @JsonProperty("petId") - private Long petId = null; @JsonProperty("quantity") - private Integer quantity = null; @JsonProperty("shipDate") - private OffsetDateTime shipDate = null; + /** * Order Status */ @@ -74,123 +71,122 @@ public static StatusEnum fromValue(String text) { return null; } - } - @JsonProperty("status") - + } @JsonProperty("status") private StatusEnum status = null; @JsonProperty("complete") - private Boolean complete = false; + public Order id(Long id) { this.id = id; return this; } - - - /** - * Get id - * @return id + /** + * Get id + * @return id **/ - @Schema(description = "") + @Schema(description = "") public Long getId() { return id; } + public void setId(Long id) { this.id = id; } + public Order petId(Long petId) { this.petId = petId; return this; } - - - /** - * Get petId - * @return petId + /** + * Get petId + * @return petId **/ - @Schema(description = "") + @Schema(description = "") public Long getPetId() { return petId; } + public void setPetId(Long petId) { this.petId = petId; } + public Order quantity(Integer quantity) { this.quantity = quantity; return this; } - - - /** - * Get quantity - * @return quantity + /** + * Get quantity + * @return quantity **/ - @Schema(description = "") + @Schema(description = "") public Integer getQuantity() { return quantity; } + public void setQuantity(Integer quantity) { this.quantity = quantity; } + public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; return this; } - - - /** - * Get shipDate - * @return shipDate + /** + * Get shipDate + * @return shipDate **/ - @Valid - @Schema(description = "") + @Valid + @Schema(description = "") public OffsetDateTime getShipDate() { return shipDate; } + public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } + public Order status(StatusEnum status) { this.status = status; return this; } - - - /** - * Order Status - * @return status + /** + * Order Status + * @return status **/ - @Schema(description = "Order Status") + @Schema(description = "Order Status") public StatusEnum getStatus() { return status; } + public void setStatus(StatusEnum status) { this.status = status; } + public Order complete(Boolean complete) { this.complete = complete; return this; } - - - /** - * Get complete - * @return complete + /** + * Get complete + * @return complete **/ - @Schema(description = "") + @Schema(description = "") public Boolean isComplete() { return complete; } + public void setComplete(Boolean complete) { this.complete = complete; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -210,9 +206,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(id, petId, quantity, shipDate, status, complete); + return Objects.hash(id, petId, quantity, shipDate, status, complete); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/OuterComposite.java index 7486e3bd2c6..f2451860ade 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/OuterComposite.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -20,79 +21,77 @@ import java.math.BigDecimal; import javax.validation.constraints.*; import javax.validation.Valid; - /** * OuterComposite */ -public class OuterComposite { +public class OuterComposite { @JsonProperty("my_number") - private BigDecimal myNumber = null; @JsonProperty("my_string") - private String myString = null; @JsonProperty("my_boolean") - private Boolean myBoolean = null; + public OuterComposite myNumber(BigDecimal myNumber) { this.myNumber = myNumber; return this; } - - - /** - * Get myNumber - * @return myNumber + /** + * Get myNumber + * @return myNumber **/ - @Valid - @Schema(description = "") + @Valid + @Schema(description = "") public BigDecimal getMyNumber() { return myNumber; } + public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } + public OuterComposite myString(String myString) { this.myString = myString; return this; } - - - /** - * Get myString - * @return myString + /** + * Get myString + * @return myString **/ - @Schema(description = "") + @Schema(description = "") public String getMyString() { return myString; } + public void setMyString(String myString) { this.myString = myString; } + public OuterComposite myBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; return this; } - - - /** - * Get myBoolean - * @return myBoolean + /** + * Get myBoolean + * @return myBoolean **/ - @Schema(description = "") + @Schema(description = "") public Boolean getMyBoolean() { return myBoolean; } + public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -109,9 +108,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(myNumber, myString, myBoolean); + return Objects.hash(myNumber, myString, myBoolean); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/OuterEnum.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/OuterEnum.java index 7c0548c2f4d..86274f176fe 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/OuterEnum.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/OuterEnum.java @@ -12,7 +12,10 @@ package io.swagger.client.model; - +import java.util.Objects; +import java.util.Arrays; +import javax.validation.constraints.*; +import javax.validation.Valid; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Pet.java index 816bff2d900..7d1c3119f74 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Pet.java @@ -13,6 +13,7 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -23,32 +24,27 @@ import java.util.List; import javax.validation.constraints.*; import javax.validation.Valid; - /** * Pet */ -public class Pet { +public class Pet { @JsonProperty("id") - private Long id = null; @JsonProperty("category") - private Category category = null; @JsonProperty("name") - private String name = null; @JsonProperty("photoUrls") - private List photoUrls = new ArrayList<>(); @JsonProperty("tags") - private List tags = null; + /** * pet status in the store */ @@ -81,66 +77,65 @@ public static StatusEnum fromValue(String text) { return null; } - } - @JsonProperty("status") - + } @JsonProperty("status") private StatusEnum status = null; + public Pet id(Long id) { this.id = id; return this; } - - - /** - * Get id - * @return id + /** + * Get id + * @return id **/ - @Schema(description = "") + @Schema(description = "") public Long getId() { return id; } + public void setId(Long id) { this.id = id; } + public Pet category(Category category) { this.category = category; return this; } - - - /** - * Get category - * @return category + /** + * Get category + * @return category **/ - @Valid - @Schema(description = "") + @Valid + @Schema(description = "") public Category getCategory() { return category; } + public void setCategory(Category category) { this.category = category; } + public Pet name(String name) { this.name = name; return this; } - - - /** - * Get name - * @return name + /** + * Get name + * @return name **/ - @NotNull - @Schema(example = "doggie", required = true, description = "") + @NotNull + @Schema(example = "doggie", required = true, description = "") public String getName() { return name; } + public void setName(String name) { this.name = name; } + public Pet photoUrls(List photoUrls) { this.photoUrls = photoUrls; return this; @@ -151,18 +146,20 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { return this; } - /** - * Get photoUrls - * @return photoUrls + /** + * Get photoUrls + * @return photoUrls **/ - @NotNull - @Schema(required = true, description = "") + @NotNull + @Schema(required = true, description = "") public List getPhotoUrls() { return photoUrls; } + public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } + public Pet tags(List tags) { this.tags = tags; return this; @@ -176,36 +173,39 @@ public Pet addTagsItem(Tag tagsItem) { return this; } - /** - * Get tags - * @return tags + /** + * Get tags + * @return tags **/ - @Valid - @Schema(description = "") + @Valid + @Schema(description = "") public List getTags() { return tags; } + public void setTags(List tags) { this.tags = tags; } + public Pet status(StatusEnum status) { this.status = status; return this; } - - - /** - * pet status in the store - * @return status + /** + * pet status in the store + * @return status **/ - @Schema(description = "pet status in the store") + @Schema(description = "pet status in the store") public StatusEnum getStatus() { return status; } + public void setStatus(StatusEnum status) { this.status = status; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -225,9 +225,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(id, category, name, photoUrls, tags, status); + return Objects.hash(id, category, name, photoUrls, tags, status); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ReadOnlyFirst.java index 886a1226703..2a845710ddc 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ReadOnlyFirst.java @@ -13,52 +13,53 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.*; import javax.validation.Valid; - /** * ReadOnlyFirst */ -public class ReadOnlyFirst { +public class ReadOnlyFirst { @JsonProperty("bar") - private String bar = null; @JsonProperty("baz") - private String baz = null; - /** - * Get bar - * @return bar + + /** + * Get bar + * @return bar **/ - @Schema(description = "") + @Schema(description = "") public String getBar() { return bar; } + public ReadOnlyFirst baz(String baz) { this.baz = baz; return this; } - - - /** - * Get baz - * @return baz + /** + * Get baz + * @return baz **/ - @Schema(description = "") + @Schema(description = "") public String getBaz() { return baz; } + public void setBaz(String baz) { this.baz = baz; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -74,9 +75,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(bar, baz); + return Objects.hash(bar, baz); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/SpecialModelName.java index 04b1dac850b..881888ccf19 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -13,40 +13,41 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.*; import javax.validation.Valid; - /** * SpecialModelName */ -public class SpecialModelName { +public class SpecialModelName { @JsonProperty("$special[property.name]") - private Long $specialPropertyName = null; + public SpecialModelName $specialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; return this; } - - - /** - * Get $specialPropertyName - * @return $specialPropertyName + /** + * Get $specialPropertyName + * @return $specialPropertyName **/ - @Schema(description = "") + @Schema(description = "") public Long get$SpecialPropertyName() { return $specialPropertyName; } + public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -61,9 +62,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash($specialPropertyName); + return Objects.hash($specialPropertyName); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Tag.java index 77742db9905..1fedf46c09b 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Tag.java @@ -13,62 +13,62 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.*; import javax.validation.Valid; - /** * Tag */ -public class Tag { +public class Tag { @JsonProperty("id") - private Long id = null; @JsonProperty("name") - private String name = null; + public Tag id(Long id) { this.id = id; return this; } - - - /** - * Get id - * @return id + /** + * Get id + * @return id **/ - @Schema(description = "") + @Schema(description = "") public Long getId() { return id; } + public void setId(Long id) { this.id = id; } + public Tag name(String name) { this.name = name; return this; } - - - /** - * Get name - * @return name + /** + * Get name + * @return name **/ - @Schema(description = "") + @Schema(description = "") public String getName() { return name; } + public void setName(String name) { this.name = name; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -84,9 +84,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(id, name); + return Objects.hash(id, name); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/User.java index c1d9cf95a56..7eeb24d1912 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/User.java @@ -13,194 +13,188 @@ package io.swagger.client.model; import java.util.Objects; +import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.*; import javax.validation.Valid; - /** * User */ -public class User { +public class User { @JsonProperty("id") - private Long id = null; @JsonProperty("username") - private String username = null; @JsonProperty("firstName") - private String firstName = null; @JsonProperty("lastName") - private String lastName = null; @JsonProperty("email") - private String email = null; @JsonProperty("password") - private String password = null; @JsonProperty("phone") - private String phone = null; @JsonProperty("userStatus") - private Integer userStatus = null; + public User id(Long id) { this.id = id; return this; } - - - /** - * Get id - * @return id + /** + * Get id + * @return id **/ - @Schema(description = "") + @Schema(description = "") public Long getId() { return id; } + public void setId(Long id) { this.id = id; } + public User username(String username) { this.username = username; return this; } - - - /** - * Get username - * @return username + /** + * Get username + * @return username **/ - @Schema(description = "") + @Schema(description = "") public String getUsername() { return username; } + public void setUsername(String username) { this.username = username; } + public User firstName(String firstName) { this.firstName = firstName; return this; } - - - /** - * Get firstName - * @return firstName + /** + * Get firstName + * @return firstName **/ - @Schema(description = "") + @Schema(description = "") public String getFirstName() { return firstName; } + public void setFirstName(String firstName) { this.firstName = firstName; } + public User lastName(String lastName) { this.lastName = lastName; return this; } - - - /** - * Get lastName - * @return lastName + /** + * Get lastName + * @return lastName **/ - @Schema(description = "") + @Schema(description = "") public String getLastName() { return lastName; } + public void setLastName(String lastName) { this.lastName = lastName; } + public User email(String email) { this.email = email; return this; } - - - /** - * Get email - * @return email + /** + * Get email + * @return email **/ - @Schema(description = "") + @Schema(description = "") public String getEmail() { return email; } + public void setEmail(String email) { this.email = email; } + public User password(String password) { this.password = password; return this; } - - - /** - * Get password - * @return password + /** + * Get password + * @return password **/ - @Schema(description = "") + @Schema(description = "") public String getPassword() { return password; } + public void setPassword(String password) { this.password = password; } + public User phone(String phone) { this.phone = phone; return this; } - - - /** - * Get phone - * @return phone + /** + * Get phone + * @return phone **/ - @Schema(description = "") + @Schema(description = "") public String getPhone() { return phone; } + public void setPhone(String phone) { this.phone = phone; } + public User userStatus(Integer userStatus) { this.userStatus = userStatus; return this; } - - - /** - * User Status - * @return userStatus + /** + * User Status + * @return userStatus **/ - @Schema(description = "User Status") + @Schema(description = "User Status") public Integer getUserStatus() { return userStatus; } + public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -222,9 +216,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return java.util.Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/retrofit2/.swagger-codegen/VERSION b/samples/client/petstore/java/retrofit2/.swagger-codegen/VERSION index 8ea7a72a83e..a81b3f2a0b8 100644 --- a/samples/client/petstore/java/retrofit2/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/retrofit2/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.11-SNAPSHOT \ No newline at end of file +3.0.12-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx/.swagger-codegen/VERSION b/samples/client/petstore/java/retrofit2rx/.swagger-codegen/VERSION index 8ea7a72a83e..a81b3f2a0b8 100644 --- a/samples/client/petstore/java/retrofit2rx/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/retrofit2rx/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.11-SNAPSHOT \ No newline at end of file +3.0.12-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx2/.swagger-codegen/VERSION b/samples/client/petstore/java/retrofit2rx2/.swagger-codegen/VERSION index 8ea7a72a83e..a81b3f2a0b8 100644 --- a/samples/client/petstore/java/retrofit2rx2/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/retrofit2rx2/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.11-SNAPSHOT \ No newline at end of file +3.0.12-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/api/StoreApi.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/api/StoreApi.java index e2a474962b7..279e7664e1e 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/api/StoreApi.java @@ -77,7 +77,7 @@ public interface StoreApi { */ @POST @Path("/store/order") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Produces({ "application/xml", "application/json" }) @Operation(summary = "Place an order for a pet", tags={ }) @ApiResponses(value = { diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/api/UserApi.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/api/UserApi.java index 03c409143f4..1b7e2cfa094 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/api/UserApi.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/api/UserApi.java @@ -35,7 +35,7 @@ public interface UserApi { */ @POST @Path("/user") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Operation(summary = "Create user", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) @@ -47,7 +47,7 @@ public interface UserApi { */ @POST @Path("/user/createWithArray") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Operation(summary = "Creates list of users with given input array", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) @@ -59,7 +59,7 @@ public interface UserApi { */ @POST @Path("/user/createWithList") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Operation(summary = "Creates list of users with given input array", tags={ }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) diff --git a/samples/client/petstore/spring-cloud-v2/pom.xml b/samples/client/petstore/spring-cloud-v2/pom.xml index feef9a5c497..dfa21a864b1 100644 --- a/samples/client/petstore/spring-cloud-v2/pom.xml +++ b/samples/client/petstore/spring-cloud-v2/pom.xml @@ -38,6 +38,7 @@ swagger-annotations ${swagger-core-version} + org.springframework.cloud spring-cloud-starter-openfeign @@ -55,7 +56,6 @@ - com.github.joschi.jackson jackson-datatype-threetenbp diff --git a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/Category.java b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/Category.java index 517db24e7da..bca2d21fead 100644 --- a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/Category.java +++ b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/Category.java @@ -31,8 +31,8 @@ public Category id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -50,8 +50,8 @@ public Category name(String name) { * @return name **/ @ApiModelProperty(value = "") - - public String getName() { + + public String getName() { return name; } diff --git a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/ModelApiResponse.java b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/ModelApiResponse.java index 931ef0b2449..bcb1016ab7a 100644 --- a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/ModelApiResponse.java @@ -34,8 +34,8 @@ public ModelApiResponse code(Integer code) { * @return code **/ @ApiModelProperty(value = "") - - public Integer getCode() { + + public Integer getCode() { return code; } @@ -53,8 +53,8 @@ public ModelApiResponse type(String type) { * @return type **/ @ApiModelProperty(value = "") - - public String getType() { + + public String getType() { return type; } @@ -72,8 +72,8 @@ public ModelApiResponse message(String message) { * @return message **/ @ApiModelProperty(value = "") - - public String getMessage() { + + public String getMessage() { return message; } diff --git a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/Order.java b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/Order.java index ca6a5d1670f..4b877527ac7 100644 --- a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/Order.java +++ b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/Order.java @@ -77,8 +77,8 @@ public Order id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -96,8 +96,8 @@ public Order petId(Long petId) { * @return petId **/ @ApiModelProperty(value = "") - - public Long getPetId() { + + public Long getPetId() { return petId; } @@ -115,8 +115,8 @@ public Order quantity(Integer quantity) { * @return quantity **/ @ApiModelProperty(value = "") - - public Integer getQuantity() { + + public Integer getQuantity() { return quantity; } @@ -134,9 +134,9 @@ public Order shipDate(OffsetDateTime shipDate) { * @return shipDate **/ @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { + + @Valid + public OffsetDateTime getShipDate() { return shipDate; } @@ -154,8 +154,8 @@ public Order status(StatusEnum status) { * @return status **/ @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { + + public StatusEnum getStatus() { return status; } @@ -173,8 +173,8 @@ public Order complete(Boolean complete) { * @return complete **/ @ApiModelProperty(value = "") - - public Boolean isComplete() { + + public Boolean isComplete() { return complete; } diff --git a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/Pet.java b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/Pet.java index 356030a9c2b..8dacc77b491 100644 --- a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/Pet.java +++ b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/Pet.java @@ -82,8 +82,8 @@ public Pet id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -101,9 +101,9 @@ public Pet category(Category category) { * @return category **/ @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { + + @Valid + public Category getCategory() { return category; } @@ -121,9 +121,9 @@ public Pet name(String name) { * @return name **/ @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull + @NotNull - public String getName() { + public String getName() { return name; } @@ -146,9 +146,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * @return photoUrls **/ @ApiModelProperty(required = true, value = "") - @NotNull + @NotNull - public List getPhotoUrls() { + public List getPhotoUrls() { return photoUrls; } @@ -174,8 +174,8 @@ public Pet addTagsItem(Tag tagsItem) { * @return tags **/ @ApiModelProperty(value = "") - @Valid - public List getTags() { + @Valid + public List getTags() { return tags; } @@ -193,8 +193,8 @@ public Pet status(StatusEnum status) { * @return status **/ @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { + + public StatusEnum getStatus() { return status; } diff --git a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/Tag.java b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/Tag.java index 100cd2fd225..30481908ec6 100644 --- a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/Tag.java +++ b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/Tag.java @@ -31,8 +31,8 @@ public Tag id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -50,8 +50,8 @@ public Tag name(String name) { * @return name **/ @ApiModelProperty(value = "") - - public String getName() { + + public String getName() { return name; } diff --git a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/User.java b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/User.java index 74ae59c77ab..f2658f87f74 100644 --- a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/User.java +++ b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/model/User.java @@ -49,8 +49,8 @@ public User id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -68,8 +68,8 @@ public User username(String username) { * @return username **/ @ApiModelProperty(value = "") - - public String getUsername() { + + public String getUsername() { return username; } @@ -87,8 +87,8 @@ public User firstName(String firstName) { * @return firstName **/ @ApiModelProperty(value = "") - - public String getFirstName() { + + public String getFirstName() { return firstName; } @@ -106,8 +106,8 @@ public User lastName(String lastName) { * @return lastName **/ @ApiModelProperty(value = "") - - public String getLastName() { + + public String getLastName() { return lastName; } @@ -125,8 +125,8 @@ public User email(String email) { * @return email **/ @ApiModelProperty(value = "") - - public String getEmail() { + + public String getEmail() { return email; } @@ -144,8 +144,8 @@ public User password(String password) { * @return password **/ @ApiModelProperty(value = "") - - public String getPassword() { + + public String getPassword() { return password; } @@ -163,8 +163,8 @@ public User phone(String phone) { * @return phone **/ @ApiModelProperty(value = "") - - public String getPhone() { + + public String getPhone() { return phone; } @@ -182,8 +182,8 @@ public User userStatus(Integer userStatus) { * @return userStatus **/ @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { + + public Integer getUserStatus() { return userStatus; } diff --git a/samples/client/petstore/spring-cloud/pom.xml b/samples/client/petstore/spring-cloud/pom.xml index fe88eb73619..f861674c3e8 100644 --- a/samples/client/petstore/spring-cloud/pom.xml +++ b/samples/client/petstore/spring-cloud/pom.xml @@ -50,7 +50,7 @@ org.springframework.security.oauth spring-security-oauth2 - + diff --git a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/Category.java b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/Category.java index 517db24e7da..bca2d21fead 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/Category.java +++ b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/Category.java @@ -31,8 +31,8 @@ public Category id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -50,8 +50,8 @@ public Category name(String name) { * @return name **/ @ApiModelProperty(value = "") - - public String getName() { + + public String getName() { return name; } diff --git a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/ModelApiResponse.java b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/ModelApiResponse.java index 931ef0b2449..bcb1016ab7a 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/ModelApiResponse.java @@ -34,8 +34,8 @@ public ModelApiResponse code(Integer code) { * @return code **/ @ApiModelProperty(value = "") - - public Integer getCode() { + + public Integer getCode() { return code; } @@ -53,8 +53,8 @@ public ModelApiResponse type(String type) { * @return type **/ @ApiModelProperty(value = "") - - public String getType() { + + public String getType() { return type; } @@ -72,8 +72,8 @@ public ModelApiResponse message(String message) { * @return message **/ @ApiModelProperty(value = "") - - public String getMessage() { + + public String getMessage() { return message; } diff --git a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/Order.java b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/Order.java index ca6a5d1670f..4b877527ac7 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/Order.java +++ b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/Order.java @@ -77,8 +77,8 @@ public Order id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -96,8 +96,8 @@ public Order petId(Long petId) { * @return petId **/ @ApiModelProperty(value = "") - - public Long getPetId() { + + public Long getPetId() { return petId; } @@ -115,8 +115,8 @@ public Order quantity(Integer quantity) { * @return quantity **/ @ApiModelProperty(value = "") - - public Integer getQuantity() { + + public Integer getQuantity() { return quantity; } @@ -134,9 +134,9 @@ public Order shipDate(OffsetDateTime shipDate) { * @return shipDate **/ @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { + + @Valid + public OffsetDateTime getShipDate() { return shipDate; } @@ -154,8 +154,8 @@ public Order status(StatusEnum status) { * @return status **/ @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { + + public StatusEnum getStatus() { return status; } @@ -173,8 +173,8 @@ public Order complete(Boolean complete) { * @return complete **/ @ApiModelProperty(value = "") - - public Boolean isComplete() { + + public Boolean isComplete() { return complete; } diff --git a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/Pet.java b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/Pet.java index 356030a9c2b..8dacc77b491 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/Pet.java +++ b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/Pet.java @@ -82,8 +82,8 @@ public Pet id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -101,9 +101,9 @@ public Pet category(Category category) { * @return category **/ @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { + + @Valid + public Category getCategory() { return category; } @@ -121,9 +121,9 @@ public Pet name(String name) { * @return name **/ @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull + @NotNull - public String getName() { + public String getName() { return name; } @@ -146,9 +146,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * @return photoUrls **/ @ApiModelProperty(required = true, value = "") - @NotNull + @NotNull - public List getPhotoUrls() { + public List getPhotoUrls() { return photoUrls; } @@ -174,8 +174,8 @@ public Pet addTagsItem(Tag tagsItem) { * @return tags **/ @ApiModelProperty(value = "") - @Valid - public List getTags() { + @Valid + public List getTags() { return tags; } @@ -193,8 +193,8 @@ public Pet status(StatusEnum status) { * @return status **/ @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { + + public StatusEnum getStatus() { return status; } diff --git a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/Tag.java b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/Tag.java index 100cd2fd225..30481908ec6 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/Tag.java +++ b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/Tag.java @@ -31,8 +31,8 @@ public Tag id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -50,8 +50,8 @@ public Tag name(String name) { * @return name **/ @ApiModelProperty(value = "") - - public String getName() { + + public String getName() { return name; } diff --git a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/User.java b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/User.java index 74ae59c77ab..f2658f87f74 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/User.java +++ b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/model/User.java @@ -49,8 +49,8 @@ public User id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -68,8 +68,8 @@ public User username(String username) { * @return username **/ @ApiModelProperty(value = "") - - public String getUsername() { + + public String getUsername() { return username; } @@ -87,8 +87,8 @@ public User firstName(String firstName) { * @return firstName **/ @ApiModelProperty(value = "") - - public String getFirstName() { + + public String getFirstName() { return firstName; } @@ -106,8 +106,8 @@ public User lastName(String lastName) { * @return lastName **/ @ApiModelProperty(value = "") - - public String getLastName() { + + public String getLastName() { return lastName; } @@ -125,8 +125,8 @@ public User email(String email) { * @return email **/ @ApiModelProperty(value = "") - - public String getEmail() { + + public String getEmail() { return email; } @@ -144,8 +144,8 @@ public User password(String password) { * @return password **/ @ApiModelProperty(value = "") - - public String getPassword() { + + public String getPassword() { return password; } @@ -163,8 +163,8 @@ public User phone(String phone) { * @return phone **/ @ApiModelProperty(value = "") - - public String getPhone() { + + public String getPhone() { return phone; } @@ -182,8 +182,8 @@ public User userStatus(Integer userStatus) { * @return userStatus **/ @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { + + public Integer getUserStatus() { return userStatus; } diff --git a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/Category.java b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/Category.java index 517db24e7da..bca2d21fead 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/Category.java +++ b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/Category.java @@ -31,8 +31,8 @@ public Category id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -50,8 +50,8 @@ public Category name(String name) { * @return name **/ @ApiModelProperty(value = "") - - public String getName() { + + public String getName() { return name; } diff --git a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/ModelApiResponse.java b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/ModelApiResponse.java index 931ef0b2449..bcb1016ab7a 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/ModelApiResponse.java +++ b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/ModelApiResponse.java @@ -34,8 +34,8 @@ public ModelApiResponse code(Integer code) { * @return code **/ @ApiModelProperty(value = "") - - public Integer getCode() { + + public Integer getCode() { return code; } @@ -53,8 +53,8 @@ public ModelApiResponse type(String type) { * @return type **/ @ApiModelProperty(value = "") - - public String getType() { + + public String getType() { return type; } @@ -72,8 +72,8 @@ public ModelApiResponse message(String message) { * @return message **/ @ApiModelProperty(value = "") - - public String getMessage() { + + public String getMessage() { return message; } diff --git a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/Order.java b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/Order.java index ca6a5d1670f..4b877527ac7 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/Order.java +++ b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/Order.java @@ -77,8 +77,8 @@ public Order id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -96,8 +96,8 @@ public Order petId(Long petId) { * @return petId **/ @ApiModelProperty(value = "") - - public Long getPetId() { + + public Long getPetId() { return petId; } @@ -115,8 +115,8 @@ public Order quantity(Integer quantity) { * @return quantity **/ @ApiModelProperty(value = "") - - public Integer getQuantity() { + + public Integer getQuantity() { return quantity; } @@ -134,9 +134,9 @@ public Order shipDate(OffsetDateTime shipDate) { * @return shipDate **/ @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { + + @Valid + public OffsetDateTime getShipDate() { return shipDate; } @@ -154,8 +154,8 @@ public Order status(StatusEnum status) { * @return status **/ @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { + + public StatusEnum getStatus() { return status; } @@ -173,8 +173,8 @@ public Order complete(Boolean complete) { * @return complete **/ @ApiModelProperty(value = "") - - public Boolean isComplete() { + + public Boolean isComplete() { return complete; } diff --git a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/Pet.java b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/Pet.java index 356030a9c2b..8dacc77b491 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/Pet.java +++ b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/Pet.java @@ -82,8 +82,8 @@ public Pet id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -101,9 +101,9 @@ public Pet category(Category category) { * @return category **/ @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { + + @Valid + public Category getCategory() { return category; } @@ -121,9 +121,9 @@ public Pet name(String name) { * @return name **/ @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull + @NotNull - public String getName() { + public String getName() { return name; } @@ -146,9 +146,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * @return photoUrls **/ @ApiModelProperty(required = true, value = "") - @NotNull + @NotNull - public List getPhotoUrls() { + public List getPhotoUrls() { return photoUrls; } @@ -174,8 +174,8 @@ public Pet addTagsItem(Tag tagsItem) { * @return tags **/ @ApiModelProperty(value = "") - @Valid - public List getTags() { + @Valid + public List getTags() { return tags; } @@ -193,8 +193,8 @@ public Pet status(StatusEnum status) { * @return status **/ @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { + + public StatusEnum getStatus() { return status; } diff --git a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/Tag.java b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/Tag.java index 100cd2fd225..30481908ec6 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/Tag.java +++ b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/Tag.java @@ -31,8 +31,8 @@ public Tag id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -50,8 +50,8 @@ public Tag name(String name) { * @return name **/ @ApiModelProperty(value = "") - - public String getName() { + + public String getName() { return name; } diff --git a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/User.java b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/User.java index 74ae59c77ab..f2658f87f74 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/User.java +++ b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/model/User.java @@ -49,8 +49,8 @@ public User id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -68,8 +68,8 @@ public User username(String username) { * @return username **/ @ApiModelProperty(value = "") - - public String getUsername() { + + public String getUsername() { return username; } @@ -87,8 +87,8 @@ public User firstName(String firstName) { * @return firstName **/ @ApiModelProperty(value = "") - - public String getFirstName() { + + public String getFirstName() { return firstName; } @@ -106,8 +106,8 @@ public User lastName(String lastName) { * @return lastName **/ @ApiModelProperty(value = "") - - public String getLastName() { + + public String getLastName() { return lastName; } @@ -125,8 +125,8 @@ public User email(String email) { * @return email **/ @ApiModelProperty(value = "") - - public String getEmail() { + + public String getEmail() { return email; } @@ -144,8 +144,8 @@ public User password(String password) { * @return password **/ @ApiModelProperty(value = "") - - public String getPassword() { + + public String getPassword() { return password; } @@ -163,8 +163,8 @@ public User phone(String phone) { * @return phone **/ @ApiModelProperty(value = "") - - public String getPhone() { + + public String getPhone() { return phone; } @@ -182,8 +182,8 @@ public User userStatus(Integer userStatus) { * @return userStatus **/ @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { + + public Integer getUserStatus() { return userStatus; } diff --git a/samples/server/petstore/java-inflector/inflector.yaml b/samples/server/petstore/java-inflector/inflector.yaml index 46ff092da8d..0cb93ac66bc 100644 --- a/samples/server/petstore/java-inflector/inflector.yaml +++ b/samples/server/petstore/java-inflector/inflector.yaml @@ -38,6 +38,7 @@ ModelReturn : io.swagger.model.ModelReturn Name : io.swagger.model.Name NumberOnly : io.swagger.model.NumberOnly OneOfAllPetsResponseItems : io.swagger.model.OneOfAllPetsResponseItems +OneOfSinglePetResponsePet : io.swagger.model.OneOfSinglePetResponsePet Order : io.swagger.model.Order OuterComposite : io.swagger.model.OuterComposite OuterEnum : io.swagger.model.OuterEnum diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/AllPetsResponse.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/AllPetsResponse.java index 9f8141102bd..67f6a40ad92 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/AllPetsResponse.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/AllPetsResponse.java @@ -1,18 +1,13 @@ package io.swagger.model; - import java.util.Objects; -import io.swagger.model.Animal; +import io.swagger.model.OneOfAllPetsResponseItems; import java.util.ArrayList; import java.util.List; -import org.springframework.validation.annotation.Validated; -import javax.validation.Valid; -import javax.validation.constraints.*; -/** - * AnimalFarm - */ -@Validated -public class AnimalFarm extends ArrayList { + + + +public class AllPetsResponse extends ArrayList { @Override public boolean equals(java.lang.Object o) { @@ -22,18 +17,19 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } + AllPetsResponse allPetsResponse = (AllPetsResponse) o; return true; } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); + sb.append("class AllPetsResponse {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Body6.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Body6.java index fe1cbe349b9..5138014fe3e 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Body6.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Body6.java @@ -1,63 +1,53 @@ package io.swagger.model; - import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.springframework.validation.annotation.Validated; -import javax.validation.Valid; -import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; -/** - * Tag - */ -@Validated -public class Tag { - @JsonProperty("id") - private Long id = null; - @JsonProperty("name") - private String name = null; - public Tag id(Long id) { - this.id = id; - return this; - } +public class Body6 { + @JsonProperty("name") + private String name = null; + @JsonProperty("status") + private String status = null; /** - * Get id - * @return id - **/ - @ApiModelProperty(value = "") - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Tag name(String name) { + * Updated name of the animal + **/ + public Body6 name(String name) { this.name = name; return this; } - /** - * Get name - * @return name - **/ - @ApiModelProperty(value = "") - + + @Schema(description = "Updated name of the animal") + @JsonProperty("name") public String getName() { return name; } - public void setName(String name) { this.name = name; } + /** + * Updated status of the animal + **/ + public Body6 status(String status) { + this.status = status; + return this; + } + + + @Schema(description = "Updated status of the animal") + @JsonProperty("status") + public String getStatus() { + return status; + } + public void setStatus(String status) { + this.status = status; + } + @Override public boolean equals(java.lang.Object o) { @@ -67,23 +57,22 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Tag tag = (Tag) o; - return Objects.equals(this.id, tag.id) && - Objects.equals(this.name, tag.name); + Body6 body6 = (Body6) o; + return Objects.equals(name, body6.name) && + Objects.equals(status, body6.status); } @Override public int hashCode() { - return Objects.hash(id, name); + return Objects.hash(name, status); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Tag {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("class Body6 {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Body7.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Body7.java index fe1cbe349b9..84d5ab18e5d 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Body7.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Body7.java @@ -1,63 +1,53 @@ package io.swagger.model; - import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.springframework.validation.annotation.Validated; -import javax.validation.Valid; -import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; -/** - * Tag - */ -@Validated -public class Tag { - @JsonProperty("id") - private Long id = null; - @JsonProperty("name") - private String name = null; - public Tag id(Long id) { - this.id = id; - return this; - } +public class Body7 { + @JsonProperty("name") + private String name = null; + @JsonProperty("status") + private String status = null; /** - * Get id - * @return id - **/ - @ApiModelProperty(value = "") - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Tag name(String name) { + * Updated name of the dog + **/ + public Body7 name(String name) { this.name = name; return this; } - /** - * Get name - * @return name - **/ - @ApiModelProperty(value = "") - + + @Schema(description = "Updated name of the dog") + @JsonProperty("name") public String getName() { return name; } - public void setName(String name) { this.name = name; } + /** + * Updated status of the dog + **/ + public Body7 status(String status) { + this.status = status; + return this; + } + + + @Schema(description = "Updated status of the dog") + @JsonProperty("status") + public String getStatus() { + return status; + } + public void setStatus(String status) { + this.status = status; + } + @Override public boolean equals(java.lang.Object o) { @@ -67,23 +57,22 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Tag tag = (Tag) o; - return Objects.equals(this.id, tag.id) && - Objects.equals(this.name, tag.name); + Body7 body7 = (Body7) o; + return Objects.equals(name, body7.name) && + Objects.equals(status, body7.status); } @Override public int hashCode() { - return Objects.hash(id, name); + return Objects.hash(name, status); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Tag {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("class Body7 {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Cat.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Cat.java index 686dead2b95..0445b264a61 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Cat.java @@ -8,7 +8,7 @@ -public class Cat extends Animal implements OneOfAllPetsResponseItems { +public class Cat extends Animal implements OneOfAllPetsResponseItems, OneOfSinglePetResponsePet { @JsonProperty("declawed") private Boolean declawed = null; /** diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Dog.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Dog.java index fc05e13360f..c7d91b0f3b2 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Dog.java @@ -8,7 +8,7 @@ -public class Dog extends Animal implements OneOfAllPetsResponseItems { +public class Dog extends Animal implements OneOfAllPetsResponseItems, OneOfSinglePetResponsePet { @JsonProperty("breed") private String breed = null; /** diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/OneOfSinglePetResponsePet.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/OneOfSinglePetResponsePet.java new file mode 100644 index 00000000000..748229c408f --- /dev/null +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/OneOfSinglePetResponsePet.java @@ -0,0 +1,7 @@ +package io.swagger.model; +/** +* OneOfSinglePetResponsePet +*/ +public interface OneOfSinglePetResponsePet { + +} diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/SinglePetResponse.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/SinglePetResponse.java index b39c912e672..69e22001335 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/SinglePetResponse.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/SinglePetResponse.java @@ -1,39 +1,31 @@ package io.swagger.model; - import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.springframework.validation.annotation.Validated; -import javax.validation.Valid; -import javax.validation.constraints.*; +import io.swagger.model.OneOfSinglePetResponsePet; +import io.swagger.v3.oas.annotations.media.Schema; -/** - * Client - */ -@Validated -public class Client { - @JsonProperty("client") - private String client = null; - public Client client(String client) { - this.client = client; - return this; - } - /** - * Get client - * @return client - **/ - @ApiModelProperty(value = "") - public String getClient() { - return client; +public class SinglePetResponse { + @JsonProperty("pet") + private OneOfSinglePetResponsePet pet = null; + /** + **/ + public SinglePetResponse pet(OneOfSinglePetResponsePet pet) { + this.pet = pet; + return this; } - public void setClient(String client) { - this.client = client; + + @Schema(description = "") + @JsonProperty("pet") + public OneOfSinglePetResponsePet getPet() { + return pet; + } + public void setPet(OneOfSinglePetResponsePet pet) { + this.pet = pet; } @@ -45,21 +37,20 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Client client = (Client) o; - return Objects.equals(this.client, client.client); + SinglePetResponse singlePetResponse = (SinglePetResponse) o; + return Objects.equals(pet, singlePetResponse.pet); } @Override public int hashCode() { - return Objects.hash(client); + return Objects.hash(pet); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Client {\n"); - - sb.append(" client: ").append(toIndentedString(client)).append("\n"); + sb.append("class SinglePetResponse {\n"); + sb.append(" pet: ").append(toIndentedString(pet)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/server/petstore/java-inflector/src/main/resources/openapi3.yaml b/samples/server/petstore/java-inflector/src/main/resources/openapi3.yaml index ffbc286871b..b568cebb325 100644 --- a/samples/server/petstore/java-inflector/src/main/resources/openapi3.yaml +++ b/samples/server/petstore/java-inflector/src/main/resources/openapi3.yaml @@ -105,11 +105,11 @@ paths: type: array items: type: string - default: available enum: - available - pending - sold + default: available responses: 200: description: successful operation @@ -700,10 +700,10 @@ paths: type: array items: type: string - default: $ enum: - '>' - $ + default: $ - name: enum_header_string in: header description: Header parameter enum test (string) @@ -712,11 +712,11 @@ paths: explode: false schema: type: string - default: -efg enum: - _abc - -efg - (xyz) + default: -efg - name: enum_query_string_array in: query description: Query parameter enum test (string array) @@ -727,10 +727,10 @@ paths: type: array items: type: string - default: $ enum: - '>' - $ + default: $ - name: enum_query_string in: query description: Query parameter enum test (string) @@ -739,11 +739,11 @@ paths: explode: true schema: type: string - default: -efg enum: - _abc - -efg - (xyz) + default: -efg - name: enum_query_integer in: query description: Query parameter enum test (double) @@ -1410,11 +1410,11 @@ components: name: Name EnumClass: type: string - default: -efg enum: - _abc - -efg - (xyz) + default: -efg List: type: object properties: @@ -1976,18 +1976,18 @@ components: description: Form parameter enum test (string array) items: type: string - default: $ enum: - '>' - $ + default: $ enum_form_string: type: string description: Form parameter enum test (string) - default: -efg enum: - _abc - -efg - (xyz) + default: -efg enum_query_double: type: number description: Query parameter enum test (double) diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml b/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml index c144aa9722b..18717a4adf3 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml @@ -33,7 +33,7 @@ 8079 stopit - -1 + 8080 60000 @@ -177,6 +177,16 @@ jackson-datatype-joda ${jackson-jaxrs-version} + + javax.xml.bind + jaxb-api + 2.2.6 + + + javax.activation + activation + 1.1.1 + diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/StoreApi.java index 804b06d9752..92b65658743 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/StoreApi.java @@ -80,7 +80,7 @@ public interface StoreApi { */ @POST @Path("/store/order") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Produces({ "application/xml", "application/json" }) @Operation(summary = "Place an order for a pet", tags={ "store" }) @ApiResponses(value = { diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/UserApi.java index 95681099a41..40f58e16f76 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/UserApi.java @@ -37,7 +37,7 @@ public interface UserApi { */ @POST @Path("/user") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Operation(summary = "Create user", tags={ "user" }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) @@ -49,7 +49,7 @@ public interface UserApi { */ @POST @Path("/user/createWithArray") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Operation(summary = "Creates list of users with given input array", tags={ "user" }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) @@ -61,7 +61,7 @@ public interface UserApi { */ @POST @Path("/user/createWithList") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Operation(summary = "Creates list of users with given input array", tags={ "user" }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java index dfbdc13dc59..8f7001076a7 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java @@ -1,10 +1,10 @@ package io.swagger.api.impl; import io.swagger.api.*; +import java.io.File; import io.swagger.model.ModelApiResponse; import io.swagger.model.Pet; - import java.io.InputStream; import java.io.OutputStream; import java.util.List; @@ -20,136 +20,95 @@ /** * Swagger Petstore * - *

This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. - * */ - public class PetApiServiceImpl implements PetApi { - - - /** * Add a new pet to the store * - */ - - public void addPet(Pet pet) { + public void addPet(Pet body) { // TODO: Implement... } - - /** * Deletes a pet * - */ - - public void deletePet(Integer petId, String apiKey) { + public void deletePet(Long petId, String apiKey) { // TODO: Implement... } - - /** * Finds Pets by status * - * Multiple status values can be provided with comma separated strings * - */ - public List findPetsByStatus(List status) { // TODO: Implement... return null; } - - /** * Finds Pets by tags * - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * - */ - public List findPetsByTags(List tags) { // TODO: Implement... return null; } - - /** * Find pet by ID * - * Returns a single pet * - */ - - public Pet getPetById(Integer petId) { + public Pet getPetById(Long petId) { // TODO: Implement... return null; } - - /** * Update an existing pet * - */ - - public void updatePet(Pet pet) { + public void updatePet(Pet body) { // TODO: Implement... } - - /** * Updates a pet in the store with form data * - */ - - public void updatePetWithForm(Integer petId, String name, String status) { + public void updatePetWithForm(Long petId, String name, String status) { // TODO: Implement... } - - /** * uploads an image * - */ - - public ModelApiResponse uploadFile(Integer petId, String additionalMetadata, org.apache.cxf.jaxrs.ext.multipart.Attachment fileDetails) { + public ModelApiResponse uploadFile(Long petId, String additionalMetadata, Attachment fileDetail) { // TODO: Implement... return null; } - } - diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java index 93bd01d4bb7..c752b191aeb 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java @@ -4,7 +4,6 @@ import java.util.Map; import io.swagger.model.Order; - import java.io.InputStream; import java.io.OutputStream; import java.util.List; @@ -16,83 +15,59 @@ import org.apache.cxf.jaxrs.ext.multipart.*; + /** * Swagger Petstore * - *

This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. - * */ - public class StoreApiServiceImpl implements StoreApi { - - - /** * Delete purchase order by ID * - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * - */ - public void deleteOrder(String orderId) { // TODO: Implement... } - - /** * Returns pet inventories by status * - * Returns a map of status codes to quantities * - */ - public Map getInventory() { // TODO: Implement... return null; } - - /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * - */ - - public Order getOrderById(Integer orderId) { + public Order getOrderById(Long orderId) { // TODO: Implement... return null; } - - /** * Place an order for a pet * - */ - - public Order placeOrder(Order order) { + public Order placeOrder(Order body) { // TODO: Implement... return null; } - } - diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java index c20773c86a7..fa4de74ee65 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java @@ -3,7 +3,6 @@ import io.swagger.api.*; import io.swagger.model.User; - import java.io.InputStream; import java.io.OutputStream; import java.util.List; @@ -15,139 +14,99 @@ import org.apache.cxf.jaxrs.ext.multipart.*; + /** * Swagger Petstore * - *

This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. - * */ - public class UserApiServiceImpl implements UserApi { - - - /** * Create user * - * This can only be done by the logged in user. * - */ - - public void createUser(User user) { + public void createUser(User body) { // TODO: Implement... } - - /** * Creates list of users with given input array * - */ - public void createUsersWithArrayInput(List body) { // TODO: Implement... } - - /** * Creates list of users with given input array * - */ - public void createUsersWithListInput(List body) { // TODO: Implement... } - - /** * Delete user * - * This can only be done by the logged in user. * - */ - public void deleteUser(String username) { // TODO: Implement... } - - /** * Get user by user name * - */ - public User getUserByName(String username) { // TODO: Implement... return null; } - - /** * Logs user into the system * - */ - public String loginUser(String username, String password) { // TODO: Implement... return null; } - - /** * Logs out current logged in user session * - */ - public void logoutUser() { // TODO: Implement... } - - /** * Updated user * - * This can only be done by the logged in user. * - */ - - public void updateUser(User user, String username) { + public void updateUser(User body, String username) { // TODO: Implement... } - } - diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/StoreApi.java index 849e19cfd13..43c151a485b 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/StoreApi.java @@ -85,7 +85,7 @@ public Response getOrderById( @Min(1L) @Max(5L) @POST @Path("/order") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Produces({ "application/xml", "application/json" }) @Operation(summary = "Place an order for a pet", description = "", tags={ "store" }) @ApiResponses(value = { diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/UserApi.java index 82dfb7ce828..6853d72b411 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/UserApi.java @@ -42,7 +42,7 @@ public class UserApi { @POST - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Operation(summary = "Create user", description = "This can only be done by the logged in user.", tags={ "user" }) @ApiResponses(value = { @@ -55,7 +55,7 @@ public Response createUser( @POST @Path("/createWithArray") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Operation(summary = "Creates list of users with given input array", description = "", tags={ "user" }) @ApiResponses(value = { @@ -68,7 +68,7 @@ public Response createUsersWithArrayInput( @POST @Path("/createWithList") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Operation(summary = "Creates list of users with given input array", description = "", tags={ "user" }) @ApiResponses(value = { diff --git a/samples/server/petstore/jaxrs-cxf-cdi/swagger.json b/samples/server/petstore/jaxrs-cxf-cdi/swagger.json index cd3584a61ad..6033894f333 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/swagger.json +++ b/samples/server/petstore/jaxrs-cxf-cdi/swagger.json @@ -76,7 +76,8 @@ }, "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] - } ] + } ], + "x-codegen-request-body-name" : "body" }, "post" : { "tags" : [ "pet" ], @@ -106,7 +107,8 @@ }, "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] - } ] + } ], + "x-codegen-request-body-name" : "body" } }, "/pet/findByStatus" : { @@ -126,8 +128,8 @@ "type" : "array", "items" : { "type" : "string", - "default" : "available", - "enum" : [ "available", "pending", "sold" ] + "enum" : [ "available", "pending", "sold" ], + "default" : "available" } } } ], @@ -420,7 +422,7 @@ "requestBody" : { "description" : "order placed for purchasing the pet", "content" : { - "*/*" : { + "application/json" : { "schema" : { "$ref" : "#/components/schemas/Order" } @@ -448,7 +450,8 @@ "description" : "Invalid Order", "content" : { } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/store/order/{orderId}" : { @@ -530,7 +533,7 @@ "requestBody" : { "description" : "Created user object", "content" : { - "*/*" : { + "application/json" : { "schema" : { "$ref" : "#/components/schemas/User" } @@ -543,7 +546,8 @@ "description" : "successful operation", "content" : { } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/user/createWithArray" : { @@ -554,7 +558,7 @@ "requestBody" : { "description" : "List of user object", "content" : { - "*/*" : { + "application/json" : { "schema" : { "type" : "array", "items" : { @@ -570,7 +574,8 @@ "description" : "successful operation", "content" : { } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/user/createWithList" : { @@ -581,7 +586,7 @@ "requestBody" : { "description" : "List of user object", "content" : { - "*/*" : { + "application/json" : { "schema" : { "type" : "array", "items" : { @@ -597,7 +602,8 @@ "description" : "successful operation", "content" : { } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/user/login" : { @@ -748,7 +754,8 @@ "description" : "User not found", "content" : { } } - } + }, + "x-codegen-request-body-name" : "body" }, "delete" : { "tags" : [ "user" ], diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/.swagger-codegen-ignore b/samples/server/petstore/jaxrs-cxf-non-spring-app/.swagger-codegen-ignore index c5fa491b4c5..70b88e71039 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/.swagger-codegen-ignore +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/.swagger-codegen-ignore @@ -21,3 +21,5 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md + +**/impl/* \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml b/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml index 65dc81c3cb3..062da0012bf 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml @@ -33,7 +33,7 @@ 8079 stopit - -1 + 8080 60000 @@ -177,6 +177,16 @@ jackson-datatype-joda ${jackson-jaxrs-version} + + javax.xml.bind + jaxb-api + 2.2.6 + + + javax.activation + activation + 1.1.1 + diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/StoreApi.java index 138fbb401f3..aabfa045b4f 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/StoreApi.java @@ -80,7 +80,7 @@ public interface StoreApi { */ @POST @Path("/store/order") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Produces({ "application/xml", "application/json" }) @Operation(summary = "Place an order for a pet", tags={ "store" }) @ApiResponses(value = { diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/UserApi.java index 86211f06e29..24a50c45a43 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/UserApi.java @@ -37,7 +37,7 @@ public interface UserApi { */ @POST @Path("/user") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Operation(summary = "Create user", tags={ "user" }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) @@ -49,7 +49,7 @@ public interface UserApi { */ @POST @Path("/user/createWithArray") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Operation(summary = "Creates list of users with given input array", tags={ "user" }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) @@ -61,7 +61,7 @@ public interface UserApi { */ @POST @Path("/user/createWithList") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Operation(summary = "Creates list of users with given input array", tags={ "user" }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) diff --git a/samples/server/petstore/jaxrs-cxf/pom.xml b/samples/server/petstore/jaxrs-cxf/pom.xml index f08387c9025..a1391b43a06 100644 --- a/samples/server/petstore/jaxrs-cxf/pom.xml +++ b/samples/server/petstore/jaxrs-cxf/pom.xml @@ -177,6 +177,16 @@ jackson-datatype-joda ${jackson-jaxrs-version} + + javax.xml.bind + jaxb-api + 2.2.6 + + + javax.activation + activation + 1.1.1 + diff --git a/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java index 3554e38790f..5f1d775bf26 100644 --- a/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java @@ -38,7 +38,7 @@ public void addPet(Pet body) { * Deletes a pet * */ - public void deletePet(Integer petId, String apiKey) { + public void deletePet(Long petId, String apiKey) { // TODO: Implement... @@ -74,7 +74,7 @@ public List findPetsByTags(List tags) { * Returns a single pet * */ - public Pet getPetById(Integer petId) { + public Pet getPetById(Long petId) { // TODO: Implement... return null; @@ -94,7 +94,7 @@ public void updatePet(Pet body) { * Updates a pet in the store with form data * */ - public void updatePetWithForm(Integer petId, String name, String status) { + public void updatePetWithForm(Long petId, String name, String status) { // TODO: Implement... @@ -104,7 +104,7 @@ public void updatePetWithForm(Integer petId, String name, String status) { * uploads an image * */ - public ModelApiResponse uploadFile(Integer petId, String additionalMetadata, Attachment fileDetail) { + public ModelApiResponse uploadFile(Long petId, String additionalMetadata, Attachment fileDetail) { // TODO: Implement... return null; diff --git a/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java index fbab14794eb..db4eec03ba9 100644 --- a/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java @@ -53,7 +53,7 @@ public Map getInventory() { * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * */ - public Order getOrderById(Integer orderId) { + public Order getOrderById(Long orderId) { // TODO: Implement... return null; diff --git a/samples/server/petstore/jaxrs-resteasy/default/build.gradle b/samples/server/petstore/jaxrs-resteasy/default/build.gradle index 21cf15d6b36..0256caf8c92 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/default/build.gradle @@ -17,11 +17,12 @@ dependencies { providedCompile 'org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final' compile 'io.swagger.core.v3:swagger-annotations:2.0.0' compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final' + compile 'org.apache.httpcomponents:httpclient:4.5.10' providedCompile 'javax.validation:validation-api:1.1.0.Final' compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.10' compile 'joda-time:joda-time:2.7' //TODO: swaggerFeature - compile 'io.swagger.core.v3:swagger-jaxrs2:2.0.0' + compile 'io.swagger.core.v3:swagger-jaxrs2:2.0.9' testCompile 'junit:junit:4.12', 'org.hamcrest:hamcrest-core:1.3' diff --git a/samples/server/petstore/jaxrs-resteasy/default/pom.xml b/samples/server/petstore/jaxrs-resteasy/default/pom.xml index 73581688a8c..cee0ffd0b1c 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/default/pom.xml @@ -158,6 +158,12 @@ + + org.apache.httpcomponents + httpclient + 4.5.10 + test + javax.validation @@ -177,7 +183,7 @@ - 2.0.0 + 2.0.9 9.2.9.v20150224 3.0.11.Final 1.6.3 diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/api/StoreApi.java index 21112674ae6..8750c76f7a9 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/api/StoreApi.java @@ -65,7 +65,7 @@ public interface StoreApi { @POST @Path("/order") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Produces({ "application/xml", "application/json" }) @Operation(summary = "Place an order for a pet", description = "", tags={ "store" }) @ApiResponses(value = { diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/api/UserApi.java index e9fd1166d74..ff4f1bde192 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/api/UserApi.java @@ -30,7 +30,7 @@ public interface UserApi { @POST - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Operation(summary = "Create user", description = "This can only be done by the logged in user.", tags={ "user" }) @ApiResponses(value = { @@ -40,7 +40,7 @@ public interface UserApi { @POST @Path("/createWithArray") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Operation(summary = "Creates list of users with given input array", description = "", tags={ "user" }) @ApiResponses(value = { @@ -50,7 +50,7 @@ public interface UserApi { @POST @Path("/createWithList") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Operation(summary = "Creates list of users with given input array", description = "", tags={ "user" }) @ApiResponses(value = { diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/api/StoreApi.java index 21112674ae6..8750c76f7a9 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/api/StoreApi.java @@ -65,7 +65,7 @@ public interface StoreApi { @POST @Path("/order") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Produces({ "application/xml", "application/json" }) @Operation(summary = "Place an order for a pet", description = "", tags={ "store" }) @ApiResponses(value = { diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/api/UserApi.java index e9fd1166d74..ff4f1bde192 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/api/UserApi.java @@ -30,7 +30,7 @@ public interface UserApi { @POST - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Operation(summary = "Create user", description = "This can only be done by the logged in user.", tags={ "user" }) @ApiResponses(value = { @@ -40,7 +40,7 @@ public interface UserApi { @POST @Path("/createWithArray") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Operation(summary = "Creates list of users with given input array", description = "", tags={ "user" }) @ApiResponses(value = { @@ -50,7 +50,7 @@ public interface UserApi { @POST @Path("/createWithList") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Operation(summary = "Creates list of users with given input array", description = "", tags={ "user" }) @ApiResponses(value = { diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/api/StoreApi.java index 21112674ae6..8750c76f7a9 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/api/StoreApi.java @@ -65,7 +65,7 @@ public interface StoreApi { @POST @Path("/order") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Produces({ "application/xml", "application/json" }) @Operation(summary = "Place an order for a pet", description = "", tags={ "store" }) @ApiResponses(value = { diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/api/UserApi.java index e9fd1166d74..ff4f1bde192 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/api/UserApi.java @@ -30,7 +30,7 @@ public interface UserApi { @POST - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Operation(summary = "Create user", description = "This can only be done by the logged in user.", tags={ "user" }) @ApiResponses(value = { @@ -40,7 +40,7 @@ public interface UserApi { @POST @Path("/createWithArray") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Operation(summary = "Creates list of users with given input array", description = "", tags={ "user" }) @ApiResponses(value = { @@ -50,7 +50,7 @@ public interface UserApi { @POST @Path("/createWithList") - @Consumes({ "*/*" }) + @Consumes({ "application/json" }) @Operation(summary = "Creates list of users with given input array", description = "", tags={ "user" }) @ApiResponses(value = { diff --git a/samples/server/petstore/jaxrs-resteasy/java8/build.gradle b/samples/server/petstore/jaxrs-resteasy/java8/build.gradle index d709bf26299..4d5b552abef 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/java8/build.gradle @@ -17,10 +17,11 @@ dependencies { providedCompile 'org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final' compile 'io.swagger.core.v3:swagger-annotations:2.0.0' compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final' + compile 'org.apache.httpcomponents:httpclient:4.5.10' providedCompile 'javax.validation:validation-api:1.1.0.Final' compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.10' //TODO: swaggerFeature - compile 'io.swagger.core.v3:swagger-jaxrs2:2.0.0' + compile 'io.swagger.core.v3:swagger-jaxrs2:2.0.9' testCompile 'junit:junit:4.12', 'org.hamcrest:hamcrest-core:1.3' diff --git a/samples/server/petstore/jaxrs-resteasy/java8/pom.xml b/samples/server/petstore/jaxrs-resteasy/java8/pom.xml index a8f9393258d..d625cd597df 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/java8/pom.xml @@ -153,6 +153,12 @@ + + org.apache.httpcomponents + httpclient + 4.5.10 + test + javax.validation @@ -172,7 +178,7 @@ - 2.0.0 + 2.0.9 9.2.9.v20150224 3.0.11.Final 1.6.3 diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/io/swagger/model/Order.java index e80533fd3a4..47800652658 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/io/swagger/model/Order.java @@ -101,7 +101,7 @@ public void setStatus(StatusEnum status) { @Schema(description = "") @JsonProperty("complete") - public Boolean isisComplete() { + public Boolean isComplete() { return complete; } public void setComplete(Boolean complete) { diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build.gradle b/samples/server/petstore/jaxrs-resteasy/joda/build.gradle index 21cf15d6b36..0256caf8c92 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/joda/build.gradle @@ -17,11 +17,12 @@ dependencies { providedCompile 'org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final' compile 'io.swagger.core.v3:swagger-annotations:2.0.0' compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final' + compile 'org.apache.httpcomponents:httpclient:4.5.10' providedCompile 'javax.validation:validation-api:1.1.0.Final' compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.10' compile 'joda-time:joda-time:2.7' //TODO: swaggerFeature - compile 'io.swagger.core.v3:swagger-jaxrs2:2.0.0' + compile 'io.swagger.core.v3:swagger-jaxrs2:2.0.9' testCompile 'junit:junit:4.12', 'org.hamcrest:hamcrest-core:1.3' diff --git a/samples/server/petstore/jaxrs-resteasy/joda/pom.xml b/samples/server/petstore/jaxrs-resteasy/joda/pom.xml index 7e072b3109f..f3e5f06887d 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/joda/pom.xml @@ -158,6 +158,12 @@ + + org.apache.httpcomponents + httpclient + 4.5.10 + test + javax.validation @@ -177,7 +183,7 @@ - 2.0.0 + 2.0.9 9.2.9.v20150224 3.0.11.Final 1.6.3 diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/AnotherFakeApi.java index acb45542678..ca3ed0f8676 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/AnotherFakeApi.java @@ -21,7 +21,7 @@ @Path("/another-fake") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-09-04T10:31:08.444-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-10-08T21:26:16.639+02:00[Europe/Rome]") public interface AnotherFakeApi { @PATCH diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/FakeApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/FakeApi.java index b4c9d483776..c61ff6ed7a9 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/FakeApi.java @@ -23,7 +23,7 @@ @Path("/fake") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-09-04T10:31:08.444-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-10-08T21:26:16.639+02:00[Europe/Rome]") public interface FakeApi { @POST diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/FakeClassnameTestApi.java index aa1346ceabe..2439d7782db 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/FakeClassnameTestApi.java @@ -21,7 +21,7 @@ @Path("/fake_classname_test") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-09-04T10:31:08.444-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-10-08T21:26:16.639+02:00[Europe/Rome]") public interface FakeClassnameTestApi { @PATCH diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/PetApi.java index b6f308ed830..c6b07adccfa 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/PetApi.java @@ -23,7 +23,7 @@ @Path("/pet") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-09-04T10:31:08.444-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-10-08T21:26:16.639+02:00[Europe/Rome]") public interface PetApi { @POST diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/StoreApi.java index 9a59eac3b37..02b2e0cac0c 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/StoreApi.java @@ -22,7 +22,7 @@ @Path("/store") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-09-04T10:31:08.444-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-10-08T21:26:16.639+02:00[Europe/Rome]") public interface StoreApi { @DELETE diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/UserApi.java index cb190874b68..cbea6a7caff 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/UserApi.java @@ -21,7 +21,7 @@ @Path("/user") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-09-04T10:31:08.444-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-10-08T21:26:16.639+02:00[Europe/Rome]") public interface UserApi { @POST diff --git a/samples/server/petstore/jaxrs-spec-interface/swagger.json b/samples/server/petstore/jaxrs-spec-interface/swagger.json index c8940d0a22e..b42b1b9e209 100644 --- a/samples/server/petstore/jaxrs-spec-interface/swagger.json +++ b/samples/server/petstore/jaxrs-spec-interface/swagger.json @@ -76,7 +76,8 @@ }, "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] - } ] + } ], + "x-codegen-request-body-name" : "body" }, "post" : { "tags" : [ "pet" ], @@ -106,7 +107,8 @@ }, "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] - } ] + } ], + "x-codegen-request-body-name" : "body" } }, "/pet/findByStatus" : { @@ -126,8 +128,8 @@ "type" : "array", "items" : { "type" : "string", - "default" : "available", - "enum" : [ "available", "pending", "sold" ] + "enum" : [ "available", "pending", "sold" ], + "default" : "available" } } } ], @@ -448,7 +450,8 @@ "description" : "Invalid Order", "content" : { } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/store/order/{order_id}" : { @@ -543,7 +546,8 @@ "description" : "successful operation", "content" : { } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/user/createWithArray" : { @@ -570,7 +574,8 @@ "description" : "successful operation", "content" : { } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/user/createWithList" : { @@ -597,7 +602,8 @@ "description" : "successful operation", "content" : { } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/user/login" : { @@ -748,7 +754,8 @@ "description" : "User not found", "content" : { } } - } + }, + "x-codegen-request-body-name" : "body" }, "delete" : { "tags" : [ "user" ], @@ -806,7 +813,8 @@ }, "security" : [ { "api_key_query" : [ ] - } ] + } ], + "x-codegen-request-body-name" : "body" } }, "/fake" : { @@ -825,8 +833,8 @@ "type" : "array", "items" : { "type" : "string", - "default" : "$", - "enum" : [ ">", "$" ] + "enum" : [ ">", "$" ], + "default" : "$" } } }, { @@ -835,8 +843,8 @@ "description" : "Header parameter enum test (string)", "schema" : { "type" : "string", - "default" : "-efg", - "enum" : [ "_abc", "-efg", "(xyz)" ] + "enum" : [ "_abc", "-efg", "(xyz)" ], + "default" : "-efg" } }, { "name" : "enum_query_string_array", @@ -848,8 +856,8 @@ "type" : "array", "items" : { "type" : "string", - "default" : "$", - "enum" : [ ">", "$" ] + "enum" : [ ">", "$" ], + "default" : "$" } } }, { @@ -858,8 +866,8 @@ "description" : "Query parameter enum test (string)", "schema" : { "type" : "string", - "default" : "-efg", - "enum" : [ "_abc", "-efg", "(xyz)" ] + "enum" : [ "_abc", "-efg", "(xyz)" ], + "default" : "-efg" } }, { "name" : "enum_query_integer", @@ -881,15 +889,15 @@ "description" : "Form parameter enum test (string array)", "items" : { "type" : "string", - "default" : "$", - "enum" : [ ">", "$" ] + "enum" : [ ">", "$" ], + "default" : "$" } }, "enum_form_string" : { "type" : "string", "description" : "Form parameter enum test (string)", - "default" : "-efg", - "enum" : [ "_abc", "-efg", "(xyz)" ] + "enum" : [ "_abc", "-efg", "(xyz)" ], + "default" : "-efg" }, "enum_query_double" : { "type" : "number", @@ -1136,7 +1144,8 @@ } } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/fake/outer/number" : { @@ -1166,7 +1175,8 @@ } } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/fake/outer/string" : { @@ -1196,7 +1206,8 @@ } } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/fake/outer/boolean" : { @@ -1226,7 +1237,8 @@ } } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/fake/outer/composite" : { @@ -1256,7 +1268,8 @@ } } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/fake/jsonFormData" : { @@ -1316,7 +1329,8 @@ "description" : "successful operation", "content" : { } } - } + }, + "x-codegen-request-body-name" : "param" } }, "/another-fake/dummy" : { @@ -1347,7 +1361,8 @@ } } } - } + }, + "x-codegen-request-body-name" : "body" } } }, @@ -1706,8 +1721,8 @@ }, "EnumClass" : { "type" : "string", - "default" : "-efg", - "enum" : [ "_abc", "-efg", "(xyz)" ] + "enum" : [ "_abc", "-efg", "(xyz)" ], + "default" : "-efg" }, "Enum_Test" : { "type" : "object", diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/AnotherFakeApi.java index 6014f781f89..5242ca617c0 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/AnotherFakeApi.java @@ -21,7 +21,7 @@ @Path("/another-fake") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-09-04T10:22:43.994-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-10-08T21:26:13.815+02:00[Europe/Rome]") public class AnotherFakeApi { @PATCH diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/FakeApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/FakeApi.java index 38485478fa0..3c497954929 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/FakeApi.java @@ -23,7 +23,7 @@ @Path("/fake") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-09-04T10:22:43.994-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-10-08T21:26:13.815+02:00[Europe/Rome]") public class FakeApi { @POST diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/FakeClassnameTestApi.java index 125375acd2e..12ff8db321e 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/FakeClassnameTestApi.java @@ -21,7 +21,7 @@ @Path("/fake_classname_test") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-09-04T10:22:43.994-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-10-08T21:26:13.815+02:00[Europe/Rome]") public class FakeClassnameTestApi { @PATCH diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/PetApi.java index 98e466feb37..49b7b724545 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/PetApi.java @@ -23,7 +23,7 @@ @Path("/pet") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-09-04T10:22:43.994-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-10-08T21:26:13.815+02:00[Europe/Rome]") public class PetApi { @POST diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/StoreApi.java index 0e1595859c4..5df73edce94 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/StoreApi.java @@ -22,7 +22,7 @@ @Path("/store") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-09-04T10:22:43.994-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-10-08T21:26:13.815+02:00[Europe/Rome]") public class StoreApi { @DELETE diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/UserApi.java index 06f36349500..c3203a7df4a 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/UserApi.java @@ -21,7 +21,7 @@ @Path("/user") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-09-04T10:22:43.994-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2019-10-08T21:26:13.815+02:00[Europe/Rome]") public class UserApi { @POST diff --git a/samples/server/petstore/jaxrs-spec/swagger.json b/samples/server/petstore/jaxrs-spec/swagger.json index c8940d0a22e..b42b1b9e209 100644 --- a/samples/server/petstore/jaxrs-spec/swagger.json +++ b/samples/server/petstore/jaxrs-spec/swagger.json @@ -76,7 +76,8 @@ }, "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] - } ] + } ], + "x-codegen-request-body-name" : "body" }, "post" : { "tags" : [ "pet" ], @@ -106,7 +107,8 @@ }, "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] - } ] + } ], + "x-codegen-request-body-name" : "body" } }, "/pet/findByStatus" : { @@ -126,8 +128,8 @@ "type" : "array", "items" : { "type" : "string", - "default" : "available", - "enum" : [ "available", "pending", "sold" ] + "enum" : [ "available", "pending", "sold" ], + "default" : "available" } } } ], @@ -448,7 +450,8 @@ "description" : "Invalid Order", "content" : { } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/store/order/{order_id}" : { @@ -543,7 +546,8 @@ "description" : "successful operation", "content" : { } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/user/createWithArray" : { @@ -570,7 +574,8 @@ "description" : "successful operation", "content" : { } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/user/createWithList" : { @@ -597,7 +602,8 @@ "description" : "successful operation", "content" : { } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/user/login" : { @@ -748,7 +754,8 @@ "description" : "User not found", "content" : { } } - } + }, + "x-codegen-request-body-name" : "body" }, "delete" : { "tags" : [ "user" ], @@ -806,7 +813,8 @@ }, "security" : [ { "api_key_query" : [ ] - } ] + } ], + "x-codegen-request-body-name" : "body" } }, "/fake" : { @@ -825,8 +833,8 @@ "type" : "array", "items" : { "type" : "string", - "default" : "$", - "enum" : [ ">", "$" ] + "enum" : [ ">", "$" ], + "default" : "$" } } }, { @@ -835,8 +843,8 @@ "description" : "Header parameter enum test (string)", "schema" : { "type" : "string", - "default" : "-efg", - "enum" : [ "_abc", "-efg", "(xyz)" ] + "enum" : [ "_abc", "-efg", "(xyz)" ], + "default" : "-efg" } }, { "name" : "enum_query_string_array", @@ -848,8 +856,8 @@ "type" : "array", "items" : { "type" : "string", - "default" : "$", - "enum" : [ ">", "$" ] + "enum" : [ ">", "$" ], + "default" : "$" } } }, { @@ -858,8 +866,8 @@ "description" : "Query parameter enum test (string)", "schema" : { "type" : "string", - "default" : "-efg", - "enum" : [ "_abc", "-efg", "(xyz)" ] + "enum" : [ "_abc", "-efg", "(xyz)" ], + "default" : "-efg" } }, { "name" : "enum_query_integer", @@ -881,15 +889,15 @@ "description" : "Form parameter enum test (string array)", "items" : { "type" : "string", - "default" : "$", - "enum" : [ ">", "$" ] + "enum" : [ ">", "$" ], + "default" : "$" } }, "enum_form_string" : { "type" : "string", "description" : "Form parameter enum test (string)", - "default" : "-efg", - "enum" : [ "_abc", "-efg", "(xyz)" ] + "enum" : [ "_abc", "-efg", "(xyz)" ], + "default" : "-efg" }, "enum_query_double" : { "type" : "number", @@ -1136,7 +1144,8 @@ } } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/fake/outer/number" : { @@ -1166,7 +1175,8 @@ } } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/fake/outer/string" : { @@ -1196,7 +1206,8 @@ } } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/fake/outer/boolean" : { @@ -1226,7 +1237,8 @@ } } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/fake/outer/composite" : { @@ -1256,7 +1268,8 @@ } } } - } + }, + "x-codegen-request-body-name" : "body" } }, "/fake/jsonFormData" : { @@ -1316,7 +1329,8 @@ "description" : "successful operation", "content" : { } } - } + }, + "x-codegen-request-body-name" : "param" } }, "/another-fake/dummy" : { @@ -1347,7 +1361,8 @@ } } } - } + }, + "x-codegen-request-body-name" : "body" } } }, @@ -1706,8 +1721,8 @@ }, "EnumClass" : { "type" : "string", - "default" : "-efg", - "enum" : [ "_abc", "-efg", "(xyz)" ] + "enum" : [ "_abc", "-efg", "(xyz)" ], + "default" : "-efg" }, "Enum_Test" : { "type" : "object", diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs/jersey1-useTags/.swagger-codegen/VERSION index 096bf47efe3..a81b3f2a0b8 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/.swagger-codegen/VERSION +++ b/samples/server/petstore/jaxrs/jersey1-useTags/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.12-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/AnotherFakeApi.java index d26219d8d53..0c0b48bb5ca 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/AnotherFakeApi.java @@ -26,7 +26,8 @@ import javax.ws.rs.core.SecurityContext; import javax.ws.rs.*; -@Path("/AnotherFake") +@Path("/another-fake/dummy") + @io.swagger.annotations.Api(description = "the AnotherFake API") @@ -41,8 +42,9 @@ public class AnotherFakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) public Response testSpecialTags( - @ApiParam(value = "client model" ,required=true) Client body - , + @ApiParam(value = "client model" ,required=true) Client body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testSpecialTags(body,securityContext); diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/FakeApi.java index e8f53f32f5b..c118300287a 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/FakeApi.java @@ -28,7 +28,8 @@ import javax.ws.rs.core.SecurityContext; import javax.ws.rs.*; -@Path("/Fake") +@Path("/fake") + @io.swagger.annotations.Api(description = "the Fake API") @@ -36,57 +37,61 @@ public class FakeApi { private final FakeApiService delegate = FakeApiServiceFactory.getFakeApi(); @POST - + @Path("/outer/boolean") @Consumes({ "*/*" }) @Produces({ "*/*" }) @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) public Response fakeOuterBooleanSerialize( - @ApiParam(value = "Input boolean as post body" ) Boolean body - , + @ApiParam(value = "Input boolean as post body" ) Boolean body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterBooleanSerialize(body,securityContext); } @POST - + @Path("/outer/composite") @Consumes({ "*/*" }) @Produces({ "*/*" }) @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) public Response fakeOuterCompositeSerialize( - @ApiParam(value = "Input composite as post body" ) OuterComposite body - , + @ApiParam(value = "Input composite as post body" ) OuterComposite body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterCompositeSerialize(body,securityContext); } @POST - + @Path("/outer/number") @Consumes({ "*/*" }) @Produces({ "*/*" }) @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) public Response fakeOuterNumberSerialize( - @ApiParam(value = "Input number as post body" ) BigDecimal body - , + @ApiParam(value = "Input number as post body" ) BigDecimal body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterNumberSerialize(body,securityContext); } @POST - + @Path("/outer/string") @Consumes({ "*/*" }) @Produces({ "*/*" }) @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer string types", response = String.class, tags={ "fake" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output string", response = String.class) }) public Response fakeOuterStringSerialize( - @ApiParam(value = "Input string as post body" ) String body - , + @ApiParam(value = "Input string as post body" ) String body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterStringSerialize(body,securityContext); @@ -99,8 +104,9 @@ public Response fakeOuterStringSerialize( @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) public Response testClientModel( - @ApiParam(value = "client model" ,required=true) Client body - , + @ApiParam(value = "client model" ,required=true) Client body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testClientModel(body,securityContext); @@ -109,13 +115,15 @@ public Response testClientModel( @Consumes({ "application/xml; charset=utf-8", "application/json; charset=utf-8" }) - @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = Void.class, tags={ "fake" }) + @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "http_basic_test") }, tags={ "fake" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) public Response testEndpointParameters( - @ApiParam(value = "" ,required=true) Object body - , + @ApiParam(value = "" ,required=true) Object body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testEndpointParameters(body,securityContext); @@ -129,47 +137,58 @@ public Response testEndpointParameters( @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) }) public Response testEnumParameters( - @ApiParam(value = "" ) Object body - , - @ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $" + @ApiParam(value = "" ) Object body + +, + @ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $" )@HeaderParam("enum_header_string_array") List enumHeaderStringArray - - , - @ApiParam(value = "Header parameter enum test (string)" )@HeaderParam("enum_header_string") String enumHeaderString - - , - @ApiParam(value = "Query parameter enum test (string array)", allowableValues=">, $" -) @QueryParam("enum_query_string_array") List enumQueryStringArray , - @ApiParam(value = "Query parameter enum test (string)") @QueryParam("enum_query_string") String enumQueryString , - @ApiParam(value = "Query parameter enum test (double)") @QueryParam("enum_query_integer") Integer enumQueryInteger , + + +, + @ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)" +)@HeaderParam("enum_header_string") String enumHeaderString + + +, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues=">, $" +) @QueryParam("enum_query_string_array") List enumQueryStringArray +, + @ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)" +) @QueryParam("enum_query_string") String enumQueryString +, + @ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2" +) @QueryParam("enum_query_integer") Integer enumQueryInteger +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testEnumParameters(body,enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,securityContext); } @POST - + @Path("/inline-additionalProperties") @Consumes({ "application/json" }) @io.swagger.annotations.ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response testInlineAdditionalProperties( - @ApiParam(value = "request body" ,required=true) Map body - , + @ApiParam(value = "request body" ,required=true) Map body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testInlineAdditionalProperties(body,securityContext); } @GET - + @Path("/jsonFormData") @Consumes({ "application/json" }) @io.swagger.annotations.ApiOperation(value = "test json serialization of form data", notes = "", response = Void.class, tags={ "fake" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response testJsonFormData( - @ApiParam(value = "" ,required=true) Object body - , + @ApiParam(value = "" ,required=true) Object body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testJsonFormData(body,securityContext); diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/FakeClassnameTags123Api.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/FakeClassnameTags123Api.java index fd3ffe307a6..81b71a2d9bf 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/FakeClassnameTags123Api.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/FakeClassnameTags123Api.java @@ -26,7 +26,8 @@ import javax.ws.rs.core.SecurityContext; import javax.ws.rs.*; -@Path("/FakeClassnameTags123") +@Path("/fake_classname_test") + @io.swagger.annotations.Api(description = "the FakeClassnameTags123 API") @@ -37,12 +38,14 @@ public class FakeClassnameTags123Api { @Consumes({ "application/json" }) @Produces({ "application/json" }) - @io.swagger.annotations.ApiOperation(value = "To test class name in snake case", notes = "", response = Client.class, tags={ "fake_classname_tags 123#$%^" }) + @io.swagger.annotations.ApiOperation(value = "To test class name in snake case", notes = "", response = Client.class, authorizations = { + @io.swagger.annotations.Authorization(value = "api_key_query") }, tags={ "fake_classname_tags 123#$%^" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) public Response testClassname( - @ApiParam(value = "client model" ,required=true) Client body - , + @ApiParam(value = "client model" ,required=true) Client body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testClassname(body,securityContext); diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/PetApi.java index 244a76e8e29..c30073ac710 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/PetApi.java @@ -28,7 +28,8 @@ import javax.ws.rs.core.SecurityContext; import javax.ws.rs.*; -@Path("/Pet") +@Path("/pet") + @io.swagger.annotations.Api(description = "the Pet API") @@ -39,72 +40,87 @@ public class PetApi { @Consumes({ "application/json", "application/xml" }) - @io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, tags={ "pet" }) + @io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "", description = "") }) }, tags={ "pet" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) public Response addPet( - @ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body - , + @ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.addPet(body,securityContext); } @DELETE + @Path("/{petId}") - - @io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, tags={ "pet" }) + @io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "", description = "") }) }, tags={ "pet" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) public Response deletePet( - @ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Integer petId , - @ApiParam(value = "" )@HeaderParam("api_key") String apiKey - - , + @ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId +, + @ApiParam(value = "" )@HeaderParam("api_key") String apiKey + + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.deletePet(petId,apiKey,securityContext); } @GET - + @Path("/findByStatus") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", tags={ "pet" }) + @io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "", description = "") }) }, tags={ "pet" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) public Response findPetsByStatus( - @ApiParam(value = "Status values that need to be considered for filter",required=true, allowableValues="available, pending, sold" -) @QueryParam("status") List status , + @ApiParam(value = "Status values that need to be considered for filter",required=true, allowableValues="available, pending, sold" +) @QueryParam("status") List status +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByStatus(status,securityContext); } @GET - + @Path("/findByTags") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", tags={ "pet" }) + @io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "", description = "") }) }, tags={ "pet" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) public Response findPetsByTags( - @ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List tags , + @ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List tags +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByTags(tags,securityContext); } @GET - + @Path("/{petId}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, tags={ "pet" }) + @io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = { + @io.swagger.annotations.Authorization(value = "api_key") }, tags={ "pet" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class) }) public Response getPetById( - @ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Integer petId , + @ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.getPetById(petId,securityContext); @@ -113,47 +129,60 @@ public Response getPetById( @Consumes({ "application/json", "application/xml" }) - @io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, tags={ "pet" }) + @io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "", description = "") }) }, tags={ "pet" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class), @io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) }) public Response updatePet( - @ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body - , + @ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.updatePet(body,securityContext); } @POST - + @Path("/{petId}") @Consumes({ "application/x-www-form-urlencoded" }) - @io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, tags={ "pet" }) + @io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "", description = "") }) }, tags={ "pet" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) public Response updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Integer petId , - @ApiParam(value = "") @FormParam("name") String name, - @ApiParam(value = "") @FormParam("status") String status, + @ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId +, + @ApiParam(value = "") @FormParam("name") String name +, + @ApiParam(value = "") @FormParam("status") String status +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.updatePetWithForm(petId,name,status,securityContext); } @POST - + @Path("/{petId}/uploadImage") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, tags={ "pet" }) + @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "", description = "") }) }, tags={ "pet" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) public Response uploadFile( - @ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Integer petId , - @FormDataParam("additionalMetadata") String additionalMetadata, - @FormDataParam("file") InputStream inputStream, - @FormDataParam("file") FormDataContentDisposition fileDetail, + @ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId +, + @ApiParam(value = "") @FormParam("additionalMetadata") String additionalMetadata +, + @FormDataParam("file") InputStream fileInputStream, + @FormDataParam("file") FormDataContentDisposition fileDetail +, @Context SecurityContext securityContext) throws NotFoundException { - return delegate.uploadFile(petId,additionalMetadata,inputStream, fileDetail,securityContext); + return delegate.uploadFile(petId,additionalMetadata, fileInputStream, fileDetail,securityContext); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/PetApiService.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/PetApiService.java index 24006d4d49b..a7206601fe8 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/PetApiService.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/PetApiService.java @@ -24,18 +24,18 @@ public abstract class PetApiService { public abstract Response addPet(Pet body,SecurityContext securityContext) throws NotFoundException; - public abstract Response deletePet(Integer petId,String apiKey,SecurityContext securityContext) + public abstract Response deletePet(Long petId,String apiKey,SecurityContext securityContext) throws NotFoundException; public abstract Response findPetsByStatus( @NotNull List status,SecurityContext securityContext) throws NotFoundException; public abstract Response findPetsByTags( @NotNull List tags,SecurityContext securityContext) throws NotFoundException; - public abstract Response getPetById(Integer petId,SecurityContext securityContext) + public abstract Response getPetById(Long petId,SecurityContext securityContext) throws NotFoundException; public abstract Response updatePet(Pet body,SecurityContext securityContext) throws NotFoundException; - public abstract Response updatePetWithForm(Integer petId,String name,String status,SecurityContext securityContext) + public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) throws NotFoundException; - public abstract Response uploadFile(Integer petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) + public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/StoreApi.java index 32f194ac2ba..da3927532e2 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/StoreApi.java @@ -27,7 +27,8 @@ import javax.ws.rs.core.SecurityContext; import javax.ws.rs.*; -@Path("/Store") +@Path("/store") + @io.swagger.annotations.Api(description = "the Store API") @@ -35,7 +36,7 @@ public class StoreApi { private final StoreApiService delegate = StoreApiServiceFactory.getStoreApi(); @DELETE - + @Path("/order/{order_id}") @io.swagger.annotations.ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = Void.class, tags={ "store" }) @@ -43,25 +44,27 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) public Response deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("order_id") String orderId , + @ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("order_id") String orderId +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteOrder(orderId,securityContext); } @GET - + @Path("/inventory") @Produces({ "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", tags={ "store" }) + @io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { + @io.swagger.annotations.Authorization(value = "api_key") }, tags={ "store" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) public Response getInventory( - @Context SecurityContext securityContext) + @Context SecurityContext securityContext) throws NotFoundException { return delegate.getInventory(securityContext); } @GET - + @Path("/order/{order_id}") @Produces({ "application/xml", "application/json" }) @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store" }) @@ -70,13 +73,15 @@ public Response getInventory( @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) public Response getOrderById( - @ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Integer orderId , + @ApiParam(value = "ID of pet that needs to be fetched",required=true, allowableValues="range=[1, 5]" +) @PathParam("order_id") Long orderId +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.getOrderById(orderId,securityContext); } @POST - + @Path("/order") @Consumes({ "*/*" }) @Produces({ "application/xml", "application/json" }) @io.swagger.annotations.ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store" }) @@ -84,8 +89,9 @@ public Response getOrderById( @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Void.class) }) public Response placeOrder( - @ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body - , + @ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.placeOrder(body,securityContext); diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/StoreApiService.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/StoreApiService.java index 6e3aa870f40..3ade47901d9 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/StoreApiService.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/StoreApiService.java @@ -25,7 +25,7 @@ public abstract Response deleteOrder(String orderId,SecurityContext securityCont throws NotFoundException; public abstract Response getInventory(SecurityContext securityContext) throws NotFoundException; - public abstract Response getOrderById( @DecimalMin("1") @DecimalMax("5")Integer orderId,SecurityContext securityContext) + public abstract Response getOrderById( @Min(1L) @Max(5L)Long orderId,SecurityContext securityContext) throws NotFoundException; public abstract Response placeOrder(Order body,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/UserApi.java index 3d58b25a282..c1c82ef1784 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/UserApi.java @@ -26,7 +26,8 @@ import javax.ws.rs.core.SecurityContext; import javax.ws.rs.*; -@Path("/User") +@Path("/user") + @io.swagger.annotations.Api(description = "the User API") @@ -41,42 +42,45 @@ public class UserApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response createUser( - @ApiParam(value = "Created user object" ,required=true) User body - , + @ApiParam(value = "Created user object" ,required=true) User body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.createUser(body,securityContext); } @POST - + @Path("/createWithArray") @Consumes({ "*/*" }) @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response createUsersWithArrayInput( - @ApiParam(value = "List of user object" ,required=true) List body - , + @ApiParam(value = "List of user object" ,required=true) List body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithArrayInput(body,securityContext); } @POST - + @Path("/createWithList") @Consumes({ "*/*" }) @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response createUsersWithListInput( - @ApiParam(value = "List of user object" ,required=true) List body - , + @ApiParam(value = "List of user object" ,required=true) List body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithListInput(body,securityContext); } @DELETE - + @Path("/{username}") @io.swagger.annotations.ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user" }) @@ -84,13 +88,14 @@ public Response createUsersWithListInput( @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) public Response deleteUser( - @ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username , + @ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteUser(username,securityContext); } @GET - + @Path("/{username}") @Produces({ "application/xml", "application/json" }) @io.swagger.annotations.ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user" }) @@ -99,13 +104,14 @@ public Response deleteUser( @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) public Response getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathParam("username") String username , + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathParam("username") String username +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.getUserByName(username,securityContext); } @GET - + @Path("/login") @Produces({ "application/xml", "application/json" }) @io.swagger.annotations.ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user" }) @@ -113,26 +119,28 @@ public Response getUserByName( @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) public Response loginUser( - @ApiParam(value = "The user name for login",required=true) @QueryParam("username") String username , - @ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password , + @ApiParam(value = "The user name for login",required=true) @QueryParam("username") String username +, + @ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.loginUser(username,password,securityContext); } @GET - + @Path("/logout") @io.swagger.annotations.ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response logoutUser( - @Context SecurityContext securityContext) + @Context SecurityContext securityContext) throws NotFoundException { return delegate.logoutUser(securityContext); } @PUT - + @Path("/{username}") @Consumes({ "*/*" }) @io.swagger.annotations.ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user" }) @@ -140,9 +148,11 @@ public Response logoutUser( @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) public Response updateUser( - @ApiParam(value = "Updated user object" ,required=true) User body - , - @ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username , + @ApiParam(value = "Updated user object" ,required=true) User body + +, + @ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.updateUser(body,username,securityContext); diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Animal.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Animal.java index 1c2a822fee4..9cd1af240b0 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Animal.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Cat.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Cat.java index 1f0449b4b63..df6e24cba78 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Cat.java @@ -38,7 +38,7 @@ public Cat declawed(Boolean declawed) { **/ @JsonProperty("declawed") @ApiModelProperty(value = "") - public Boolean isisDeclawed() { + public Boolean isDeclawed() { return declawed; } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/HasOnlyReadOnly.java index adfc0d118fc..1078c17ab18 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/HasOnlyReadOnly.java @@ -29,11 +29,6 @@ public class HasOnlyReadOnly { @JsonProperty("foo") private String foo = null; - public HasOnlyReadOnly bar(String bar) { - this.bar = bar; - return this; - } - /** * Get bar * @return bar @@ -44,15 +39,6 @@ public String getBar() { return bar; } - public void setBar(String bar) { - this.bar = bar; - } - - public HasOnlyReadOnly foo(String foo) { - this.foo = foo; - return this; - } - /** * Get foo * @return foo @@ -63,10 +49,6 @@ public String getFoo() { return foo; } - public void setFoo(String foo) { - this.foo = foo; - } - @Override public boolean equals(java.lang.Object o) { diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Name.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Name.java index 5c32f497180..fdbebeff8d5 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Name.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Name.java @@ -56,11 +56,6 @@ public void setName(Integer name) { this.name = name; } - public Name snakeCase(Integer snakeCase) { - this.snakeCase = snakeCase; - return this; - } - /** * Get snakeCase * @return snakeCase @@ -71,10 +66,6 @@ public Integer getSnakeCase() { return snakeCase; } - public void setSnakeCase(Integer snakeCase) { - this.snakeCase = snakeCase; - } - public Name property(String property) { this.property = property; return this; @@ -94,11 +85,6 @@ public void setProperty(String property) { this.property = property; } - public Name _123Number(Integer _123Number) { - this._123Number = _123Number; - return this; - } - /** * Get _123Number * @return _123Number @@ -109,10 +95,6 @@ public Integer get123Number() { return _123Number; } - public void set123Number(Integer _123Number) { - this._123Number = _123Number; - } - @Override public boolean equals(java.lang.Object o) { diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Order.java index 95ea1f5c188..99b7b83d687 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Order.java @@ -181,7 +181,7 @@ public Order complete(Boolean complete) { **/ @JsonProperty("complete") @ApiModelProperty(value = "") - public Boolean isisComplete() { + public Boolean isComplete() { return complete; } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ReadOnlyFirst.java index 4284284ac2e..591c3aeae7c 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ReadOnlyFirst.java @@ -29,11 +29,6 @@ public class ReadOnlyFirst { @JsonProperty("baz") private String baz = null; - public ReadOnlyFirst bar(String bar) { - this.bar = bar; - return this; - } - /** * Get bar * @return bar @@ -44,10 +39,6 @@ public String getBar() { return bar; } - public void setBar(String bar) { - this.bar = bar; - } - public ReadOnlyFirst baz(String baz) { this.baz = baz; return this; diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java index 99e7e1b884d..64deec5d528 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java @@ -29,7 +29,7 @@ public Response addPet(Pet body, SecurityContext securityContext) return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response deletePet(Integer petId, String apiKey, SecurityContext securityContext) + public Response deletePet(Long petId, String apiKey, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); @@ -47,7 +47,7 @@ public Response findPetsByTags( @NotNull List tags, SecurityContext secu return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response getPetById(Integer petId, SecurityContext securityContext) + public Response getPetById(Long petId, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); @@ -59,13 +59,13 @@ public Response updatePet(Pet body, SecurityContext securityContext) return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response updatePetWithForm(Integer petId, String name, String status, SecurityContext securityContext) + public Response updatePetWithForm(Long petId, String name, String status, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response uploadFile(Integer petId, String additionalMetadata, InputStream fileInputStream, FormDataContentDisposition fileDetail, SecurityContext securityContext) + public Response uploadFile(Long petId, String additionalMetadata, InputStream fileInputStream, FormDataContentDisposition fileDetail, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java index 253e2b203ef..4ef00b91122 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java @@ -34,7 +34,7 @@ public Response getInventory(SecurityContext securityContext) return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response getOrderById( @DecimalMin("1") @DecimalMax("5")Integer orderId, SecurityContext securityContext) + public Response getOrderById( @Min(1L) @Max(5L)Long orderId, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/jaxrs/jersey1/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs/jersey1/.swagger-codegen/VERSION index 096bf47efe3..a81b3f2a0b8 100644 --- a/samples/server/petstore/jaxrs/jersey1/.swagger-codegen/VERSION +++ b/samples/server/petstore/jaxrs/jersey1/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.12-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/AnotherFakeApi.java index d850b99b895..d5352c2ef96 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/AnotherFakeApi.java @@ -26,6 +26,7 @@ import javax.ws.rs.core.SecurityContext; import javax.ws.rs.*; + @Path("/another-fake") @@ -41,8 +42,9 @@ public class AnotherFakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) public Response testSpecialTags( - @ApiParam(value = "client model" ,required=true) Client body - , + @ApiParam(value = "client model" ,required=true) Client body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testSpecialTags(body,securityContext); diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/FakeApi.java index 21360a9675b..24b1d9e57d1 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/FakeApi.java @@ -28,6 +28,7 @@ import javax.ws.rs.core.SecurityContext; import javax.ws.rs.*; + @Path("/fake") @@ -43,8 +44,9 @@ public class FakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) public Response fakeOuterBooleanSerialize( - @ApiParam(value = "Input boolean as post body" ) Boolean body - , + @ApiParam(value = "Input boolean as post body" ) Boolean body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterBooleanSerialize(body,securityContext); @@ -57,8 +59,9 @@ public Response fakeOuterBooleanSerialize( @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) public Response fakeOuterCompositeSerialize( - @ApiParam(value = "Input composite as post body" ) OuterComposite body - , + @ApiParam(value = "Input composite as post body" ) OuterComposite body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterCompositeSerialize(body,securityContext); @@ -71,8 +74,9 @@ public Response fakeOuterCompositeSerialize( @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) public Response fakeOuterNumberSerialize( - @ApiParam(value = "Input number as post body" ) BigDecimal body - , + @ApiParam(value = "Input number as post body" ) BigDecimal body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterNumberSerialize(body,securityContext); @@ -85,8 +89,9 @@ public Response fakeOuterNumberSerialize( @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "Output string", response = String.class) }) public Response fakeOuterStringSerialize( - @ApiParam(value = "Input string as post body" ) String body - , + @ApiParam(value = "Input string as post body" ) String body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.fakeOuterStringSerialize(body,securityContext); @@ -99,8 +104,9 @@ public Response fakeOuterStringSerialize( @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) public Response testClientModel( - @ApiParam(value = "client model" ,required=true) Client body - , + @ApiParam(value = "client model" ,required=true) Client body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testClientModel(body,securityContext); @@ -109,13 +115,15 @@ public Response testClientModel( @Consumes({ "application/xml; charset=utf-8", "application/json; charset=utf-8" }) - @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = Void.class, tags={ "fake" }) + @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "http_basic_test") }, tags={ "fake" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) public Response testEndpointParameters( - @ApiParam(value = "" ,required=true) Object body - , + @ApiParam(value = "" ,required=true) Object body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testEndpointParameters(body,securityContext); @@ -129,19 +137,28 @@ public Response testEndpointParameters( @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) }) public Response testEnumParameters( - @ApiParam(value = "" ) Object body - , - @ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $" + @ApiParam(value = "" ) Object body + +, + @ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $" )@HeaderParam("enum_header_string_array") List enumHeaderStringArray - - , - @ApiParam(value = "Header parameter enum test (string)" )@HeaderParam("enum_header_string") String enumHeaderString - - , - @ApiParam(value = "Query parameter enum test (string array)", allowableValues=">, $" -) @QueryParam("enum_query_string_array") List enumQueryStringArray , - @ApiParam(value = "Query parameter enum test (string)") @QueryParam("enum_query_string") String enumQueryString , - @ApiParam(value = "Query parameter enum test (double)") @QueryParam("enum_query_integer") Integer enumQueryInteger , + + +, + @ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)" +)@HeaderParam("enum_header_string") String enumHeaderString + + +, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues=">, $" +) @QueryParam("enum_query_string_array") List enumQueryStringArray +, + @ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)" +) @QueryParam("enum_query_string") String enumQueryString +, + @ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2" +) @QueryParam("enum_query_integer") Integer enumQueryInteger +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testEnumParameters(body,enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,securityContext); @@ -154,8 +171,9 @@ public Response testEnumParameters( @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response testInlineAdditionalProperties( - @ApiParam(value = "request body" ,required=true) Map body - , + @ApiParam(value = "request body" ,required=true) Map body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testInlineAdditionalProperties(body,securityContext); @@ -168,8 +186,9 @@ public Response testInlineAdditionalProperties( @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response testJsonFormData( - @ApiParam(value = "" ,required=true) Object body - , + @ApiParam(value = "" ,required=true) Object body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testJsonFormData(body,securityContext); diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/FakeClassnameTestApi.java index 5e52adba9c4..2b29e2e228c 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/FakeClassnameTestApi.java @@ -26,6 +26,7 @@ import javax.ws.rs.core.SecurityContext; import javax.ws.rs.*; + @Path("/fake_classname_test") @@ -37,12 +38,14 @@ public class FakeClassnameTestApi { @Consumes({ "application/json" }) @Produces({ "application/json" }) - @io.swagger.annotations.ApiOperation(value = "To test class name in snake case", notes = "", response = Client.class, tags={ "fake_classname_tags 123#$%^" }) + @io.swagger.annotations.ApiOperation(value = "To test class name in snake case", notes = "", response = Client.class, authorizations = { + @io.swagger.annotations.Authorization(value = "api_key_query") }, tags={ "fake_classname_tags 123#$%^" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) public Response testClassname( - @ApiParam(value = "client model" ,required=true) Client body - , + @ApiParam(value = "client model" ,required=true) Client body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.testClassname(body,securityContext); diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/PetApi.java index a13978d4638..5556ba1fece 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/PetApi.java @@ -28,6 +28,7 @@ import javax.ws.rs.core.SecurityContext; import javax.ws.rs.*; + @Path("/pet") @@ -39,12 +40,15 @@ public class PetApi { @Consumes({ "application/json", "application/xml" }) - @io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, tags={ "pet" }) + @io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "", description = "") }) }, tags={ "pet" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) public Response addPet( - @ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body - , + @ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.addPet(body,securityContext); @@ -53,14 +57,18 @@ public Response addPet( @Path("/{petId}") - @io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, tags={ "pet" }) + @io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "", description = "") }) }, tags={ "pet" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) public Response deletePet( - @ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Integer petId , - @ApiParam(value = "" )@HeaderParam("api_key") String apiKey - - , + @ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId +, + @ApiParam(value = "" )@HeaderParam("api_key") String apiKey + + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.deletePet(petId,apiKey,securityContext); @@ -69,13 +77,16 @@ public Response deletePet( @Path("/findByStatus") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", tags={ "pet" }) + @io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "", description = "") }) }, tags={ "pet" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) public Response findPetsByStatus( - @ApiParam(value = "Status values that need to be considered for filter",required=true, allowableValues="available, pending, sold" -) @QueryParam("status") List status , + @ApiParam(value = "Status values that need to be considered for filter",required=true, allowableValues="available, pending, sold" +) @QueryParam("status") List status +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByStatus(status,securityContext); @@ -84,12 +95,15 @@ public Response findPetsByStatus( @Path("/findByTags") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", tags={ "pet" }) + @io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "", description = "") }) }, tags={ "pet" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) public Response findPetsByTags( - @ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List tags , + @ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List tags +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByTags(tags,securityContext); @@ -98,13 +112,15 @@ public Response findPetsByTags( @Path("/{petId}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, tags={ "pet" }) + @io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = { + @io.swagger.annotations.Authorization(value = "api_key") }, tags={ "pet" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class) }) public Response getPetById( - @ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Integer petId , + @ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.getPetById(petId,securityContext); @@ -113,14 +129,17 @@ public Response getPetById( @Consumes({ "application/json", "application/xml" }) - @io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, tags={ "pet" }) + @io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "", description = "") }) }, tags={ "pet" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class), @io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) }) public Response updatePet( - @ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body - , + @ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.updatePet(body,securityContext); @@ -129,13 +148,18 @@ public Response updatePet( @Path("/{petId}") @Consumes({ "application/x-www-form-urlencoded" }) - @io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, tags={ "pet" }) + @io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "", description = "") }) }, tags={ "pet" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) public Response updatePetWithForm( - @ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Integer petId , - @ApiParam(value = "") @FormParam("name") String name, - @ApiParam(value = "") @FormParam("status") String status, + @ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId +, + @ApiParam(value = "") @FormParam("name") String name +, + @ApiParam(value = "") @FormParam("status") String status +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.updatePetWithForm(petId,name,status,securityContext); @@ -144,16 +168,21 @@ public Response updatePetWithForm( @Path("/{petId}/uploadImage") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, tags={ "pet" }) + @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "", description = "") }) }, tags={ "pet" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) public Response uploadFile( - @ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Integer petId , - @FormDataParam("additionalMetadata") String additionalMetadata, - @FormDataParam("file") InputStream inputStream, - @FormDataParam("file") FormDataContentDisposition fileDetail, + @ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId +, + @ApiParam(value = "") @FormParam("additionalMetadata") String additionalMetadata +, + @FormDataParam("file") InputStream fileInputStream, + @FormDataParam("file") FormDataContentDisposition fileDetail +, @Context SecurityContext securityContext) throws NotFoundException { - return delegate.uploadFile(petId,additionalMetadata,inputStream, fileDetail,securityContext); + return delegate.uploadFile(petId,additionalMetadata, fileInputStream, fileDetail,securityContext); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/PetApiService.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/PetApiService.java index 24006d4d49b..a7206601fe8 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/PetApiService.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/PetApiService.java @@ -24,18 +24,18 @@ public abstract class PetApiService { public abstract Response addPet(Pet body,SecurityContext securityContext) throws NotFoundException; - public abstract Response deletePet(Integer petId,String apiKey,SecurityContext securityContext) + public abstract Response deletePet(Long petId,String apiKey,SecurityContext securityContext) throws NotFoundException; public abstract Response findPetsByStatus( @NotNull List status,SecurityContext securityContext) throws NotFoundException; public abstract Response findPetsByTags( @NotNull List tags,SecurityContext securityContext) throws NotFoundException; - public abstract Response getPetById(Integer petId,SecurityContext securityContext) + public abstract Response getPetById(Long petId,SecurityContext securityContext) throws NotFoundException; public abstract Response updatePet(Pet body,SecurityContext securityContext) throws NotFoundException; - public abstract Response updatePetWithForm(Integer petId,String name,String status,SecurityContext securityContext) + public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) throws NotFoundException; - public abstract Response uploadFile(Integer petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) + public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/StoreApi.java index 98d6f7d756c..942bdc7a93e 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/StoreApi.java @@ -27,6 +27,7 @@ import javax.ws.rs.core.SecurityContext; import javax.ws.rs.*; + @Path("/store") @@ -43,7 +44,8 @@ public class StoreApi { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) public Response deleteOrder( - @ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("order_id") String orderId , + @ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("order_id") String orderId +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteOrder(orderId,securityContext); @@ -52,11 +54,12 @@ public Response deleteOrder( @Path("/inventory") @Produces({ "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", tags={ "store" }) + @io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { + @io.swagger.annotations.Authorization(value = "api_key") }, tags={ "store" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) public Response getInventory( - @Context SecurityContext securityContext) + @Context SecurityContext securityContext) throws NotFoundException { return delegate.getInventory(securityContext); } @@ -70,7 +73,9 @@ public Response getInventory( @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) public Response getOrderById( - @ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Integer orderId , + @ApiParam(value = "ID of pet that needs to be fetched",required=true, allowableValues="range=[1, 5]" +) @PathParam("order_id") Long orderId +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.getOrderById(orderId,securityContext); @@ -84,8 +89,9 @@ public Response getOrderById( @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Void.class) }) public Response placeOrder( - @ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body - , + @ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.placeOrder(body,securityContext); diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/StoreApiService.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/StoreApiService.java index 6e3aa870f40..3ade47901d9 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/StoreApiService.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/StoreApiService.java @@ -25,7 +25,7 @@ public abstract Response deleteOrder(String orderId,SecurityContext securityCont throws NotFoundException; public abstract Response getInventory(SecurityContext securityContext) throws NotFoundException; - public abstract Response getOrderById( @DecimalMin("1") @DecimalMax("5")Integer orderId,SecurityContext securityContext) + public abstract Response getOrderById( @Min(1L) @Max(5L)Long orderId,SecurityContext securityContext) throws NotFoundException; public abstract Response placeOrder(Order body,SecurityContext securityContext) throws NotFoundException; diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/UserApi.java index 71ae40f3c4e..08cd8acd508 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/UserApi.java @@ -26,6 +26,7 @@ import javax.ws.rs.core.SecurityContext; import javax.ws.rs.*; + @Path("/user") @@ -41,8 +42,9 @@ public class UserApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response createUser( - @ApiParam(value = "Created user object" ,required=true) User body - , + @ApiParam(value = "Created user object" ,required=true) User body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.createUser(body,securityContext); @@ -55,8 +57,9 @@ public Response createUser( @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response createUsersWithArrayInput( - @ApiParam(value = "List of user object" ,required=true) List body - , + @ApiParam(value = "List of user object" ,required=true) List body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithArrayInput(body,securityContext); @@ -69,8 +72,9 @@ public Response createUsersWithArrayInput( @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response createUsersWithListInput( - @ApiParam(value = "List of user object" ,required=true) List body - , + @ApiParam(value = "List of user object" ,required=true) List body + +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithListInput(body,securityContext); @@ -84,7 +88,8 @@ public Response createUsersWithListInput( @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) public Response deleteUser( - @ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username , + @ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteUser(username,securityContext); @@ -99,7 +104,8 @@ public Response deleteUser( @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) public Response getUserByName( - @ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathParam("username") String username , + @ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathParam("username") String username +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.getUserByName(username,securityContext); @@ -113,8 +119,10 @@ public Response getUserByName( @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) public Response loginUser( - @ApiParam(value = "The user name for login",required=true) @QueryParam("username") String username , - @ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password , + @ApiParam(value = "The user name for login",required=true) @QueryParam("username") String username +, + @ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.loginUser(username,password,securityContext); @@ -127,7 +135,7 @@ public Response loginUser( @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response logoutUser( - @Context SecurityContext securityContext) + @Context SecurityContext securityContext) throws NotFoundException { return delegate.logoutUser(securityContext); } @@ -140,9 +148,11 @@ public Response logoutUser( @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) public Response updateUser( - @ApiParam(value = "Updated user object" ,required=true) User body - , - @ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username , + @ApiParam(value = "Updated user object" ,required=true) User body + +, + @ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username +, @Context SecurityContext securityContext) throws NotFoundException { return delegate.updateUser(body,username,securityContext); diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Animal.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Animal.java index 1c2a822fee4..9cd1af240b0 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Animal.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Cat.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Cat.java index 1f0449b4b63..df6e24cba78 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Cat.java @@ -38,7 +38,7 @@ public Cat declawed(Boolean declawed) { **/ @JsonProperty("declawed") @ApiModelProperty(value = "") - public Boolean isisDeclawed() { + public Boolean isDeclawed() { return declawed; } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/HasOnlyReadOnly.java index adfc0d118fc..1078c17ab18 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/HasOnlyReadOnly.java @@ -29,11 +29,6 @@ public class HasOnlyReadOnly { @JsonProperty("foo") private String foo = null; - public HasOnlyReadOnly bar(String bar) { - this.bar = bar; - return this; - } - /** * Get bar * @return bar @@ -44,15 +39,6 @@ public String getBar() { return bar; } - public void setBar(String bar) { - this.bar = bar; - } - - public HasOnlyReadOnly foo(String foo) { - this.foo = foo; - return this; - } - /** * Get foo * @return foo @@ -63,10 +49,6 @@ public String getFoo() { return foo; } - public void setFoo(String foo) { - this.foo = foo; - } - @Override public boolean equals(java.lang.Object o) { diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Name.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Name.java index 5c32f497180..fdbebeff8d5 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Name.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Name.java @@ -56,11 +56,6 @@ public void setName(Integer name) { this.name = name; } - public Name snakeCase(Integer snakeCase) { - this.snakeCase = snakeCase; - return this; - } - /** * Get snakeCase * @return snakeCase @@ -71,10 +66,6 @@ public Integer getSnakeCase() { return snakeCase; } - public void setSnakeCase(Integer snakeCase) { - this.snakeCase = snakeCase; - } - public Name property(String property) { this.property = property; return this; @@ -94,11 +85,6 @@ public void setProperty(String property) { this.property = property; } - public Name _123Number(Integer _123Number) { - this._123Number = _123Number; - return this; - } - /** * Get _123Number * @return _123Number @@ -109,10 +95,6 @@ public Integer get123Number() { return _123Number; } - public void set123Number(Integer _123Number) { - this._123Number = _123Number; - } - @Override public boolean equals(java.lang.Object o) { diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Order.java index 95ea1f5c188..99b7b83d687 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Order.java @@ -181,7 +181,7 @@ public Order complete(Boolean complete) { **/ @JsonProperty("complete") @ApiModelProperty(value = "") - public Boolean isisComplete() { + public Boolean isComplete() { return complete; } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ReadOnlyFirst.java index 4284284ac2e..591c3aeae7c 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ReadOnlyFirst.java @@ -29,11 +29,6 @@ public class ReadOnlyFirst { @JsonProperty("baz") private String baz = null; - public ReadOnlyFirst bar(String bar) { - this.bar = bar; - return this; - } - /** * Get bar * @return bar @@ -44,10 +39,6 @@ public String getBar() { return bar; } - public void setBar(String bar) { - this.bar = bar; - } - public ReadOnlyFirst baz(String baz) { this.baz = baz; return this; diff --git a/samples/server/petstore/jaxrs/jersey1/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey1/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java index 99e7e1b884d..64deec5d528 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey1/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java @@ -29,7 +29,7 @@ public Response addPet(Pet body, SecurityContext securityContext) return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response deletePet(Integer petId, String apiKey, SecurityContext securityContext) + public Response deletePet(Long petId, String apiKey, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); @@ -47,7 +47,7 @@ public Response findPetsByTags( @NotNull List tags, SecurityContext secu return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response getPetById(Integer petId, SecurityContext securityContext) + public Response getPetById(Long petId, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); @@ -59,13 +59,13 @@ public Response updatePet(Pet body, SecurityContext securityContext) return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response updatePetWithForm(Integer petId, String name, String status, SecurityContext securityContext) + public Response updatePetWithForm(Long petId, String name, String status, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response uploadFile(Integer petId, String additionalMetadata, InputStream fileInputStream, FormDataContentDisposition fileDetail, SecurityContext securityContext) + public Response uploadFile(Long petId, String additionalMetadata, InputStream fileInputStream, FormDataContentDisposition fileDetail, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/jaxrs/jersey1/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey1/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java index 253e2b203ef..4ef00b91122 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey1/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java @@ -34,7 +34,7 @@ public Response getInventory(SecurityContext securityContext) return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response getOrderById( @DecimalMin("1") @DecimalMax("5")Integer orderId, SecurityContext securityContext) + public Response getOrderById( @Min(1L) @Max(5L)Long orderId, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/jaxrs/jersey2/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs/jersey2/.swagger-codegen/VERSION index 096bf47efe3..a81b3f2a0b8 100644 --- a/samples/server/petstore/jaxrs/jersey2/.swagger-codegen/VERSION +++ b/samples/server/petstore/jaxrs/jersey2/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.12-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/AnotherFakeApi.java index a9f5dd07631..be5a04898a1 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/AnotherFakeApi.java @@ -31,6 +31,7 @@ import javax.ws.rs.*; import javax.validation.constraints.*; + @Path("/another-fake") diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/FakeApi.java index 75a7b972108..95e9b12eb54 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/FakeApi.java @@ -33,6 +33,7 @@ import javax.ws.rs.*; import javax.validation.constraints.*; + @Path("/fake") @@ -129,7 +130,8 @@ public Response testClientModel(@Parameter(description = "client model" ,require @Consumes({ "application/xml; charset=utf-8", "application/json; charset=utf-8" }) - @Operation(summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", description = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", tags={ "fake" }) + @Operation(summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", description = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", security = { + @SecurityRequirement(name = "http_basic_test") }, tags={ "fake" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -156,12 +158,15 @@ public Response testEnumParameters(@Parameter(description = "" ) Object body )@HeaderParam("enum_header_string_array") List enumHeaderStringArray , -@Parameter(description = "Header parameter enum test (string)" )@HeaderParam("enum_header_string") String enumHeaderString +@Parameter(description = "Header parameter enum test (string)" , schema=@Schema(allowableValues={ "_abc", "-efg", "(xyz)" }) +)@HeaderParam("enum_header_string") String enumHeaderString ,@Parameter(description = "Query parameter enum test (string array)", schema=@Schema(allowableValues={ ">", "$" }) ) @QueryParam("enum_query_string_array") List enumQueryStringArray -,@Parameter(description = "Query parameter enum test (string)") @QueryParam("enum_query_string") String enumQueryString -,@Parameter(description = "Query parameter enum test (double)") @QueryParam("enum_query_integer") Integer enumQueryInteger +,@Parameter(description = "Query parameter enum test (string)", schema=@Schema(allowableValues={ "_abc", "-efg", "(xyz)" }) +) @QueryParam("enum_query_string") String enumQueryString +,@Parameter(description = "Query parameter enum test (double)", schema=@Schema(allowableValues={ "1", "-2" }) +) @QueryParam("enum_query_integer") Integer enumQueryInteger ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.testEnumParameters(body,enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,securityContext); diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/FakeClassnameTestApi.java index c068422238c..12ee85ffa51 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/FakeClassnameTestApi.java @@ -31,6 +31,7 @@ import javax.ws.rs.*; import javax.validation.constraints.*; + @Path("/fake_classname_test") @@ -62,7 +63,8 @@ public FakeClassnameTestApi(@Context ServletConfig servletContext) { @Consumes({ "application/json" }) @Produces({ "application/json" }) - @Operation(summary = "To test class name in snake case", description = "", tags={ "fake_classname_tags 123#$%^" }) + @Operation(summary = "To test class name in snake case", description = "", security = { + @SecurityRequirement(name = "api_key_query") }, tags={ "fake_classname_tags 123#$%^" }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Client.class))) }) public Response testClassname(@Parameter(description = "client model" ,required=true) Client body diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/PetApi.java index 92df31f3caf..a50cb6e3dfb 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/PetApi.java @@ -33,6 +33,7 @@ import javax.ws.rs.*; import javax.validation.constraints.*; + @Path("/pet") @@ -64,7 +65,9 @@ public PetApi(@Context ServletConfig servletContext) { @Consumes({ "application/json", "application/xml" }) - @Operation(summary = "Add a new pet to the store", description = "", tags={ "pet" }) + @Operation(summary = "Add a new pet to the store", description = "", security = { + @SecurityRequirement(name = "petstore_auth", scopes = { + "" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) public Response addPet(@Parameter(description = "Pet object that needs to be added to the store" ,required=true) Pet body @@ -77,10 +80,12 @@ public Response addPet(@Parameter(description = "Pet object that needs to be add @Path("/{petId}") - @Operation(summary = "Deletes a pet", description = "", tags={ "pet" }) + @Operation(summary = "Deletes a pet", description = "", security = { + @SecurityRequirement(name = "petstore_auth", scopes = { + "" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid pet value") }) - public Response deletePet(@Parameter(description = "Pet id to delete",required=true) @PathParam("petId") Integer petId + public Response deletePet(@Parameter(description = "Pet id to delete",required=true) @PathParam("petId") Long petId , @Parameter(description = "" )@HeaderParam("api_key") String apiKey @@ -92,7 +97,9 @@ public Response deletePet(@Parameter(description = "Pet id to delete",required=t @Path("/findByStatus") @Produces({ "application/xml", "application/json" }) - @Operation(summary = "Finds Pets by status", description = "Multiple status values can be provided with comma separated strings", tags={ "pet" }) + @Operation(summary = "Finds Pets by status", description = "Multiple status values can be provided with comma separated strings", security = { + @SecurityRequirement(name = "petstore_auth", scopes = { + "" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @@ -107,7 +114,9 @@ public Response findPetsByStatus(@Parameter(description = "Status values that ne @Path("/findByTags") @Produces({ "application/xml", "application/json" }) - @Operation(summary = "Finds Pets by tags", description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", tags={ "pet" }) + @Operation(summary = "Finds Pets by tags", description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", security = { + @SecurityRequirement(name = "petstore_auth", scopes = { + "" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @@ -121,14 +130,15 @@ public Response findPetsByTags(@Parameter(description = "Tags to filter by",requ @Path("/{petId}") @Produces({ "application/xml", "application/json" }) - @Operation(summary = "Find pet by ID", description = "Returns a single pet", tags={ "pet" }) + @Operation(summary = "Find pet by ID", description = "Returns a single pet", security = { + @SecurityRequirement(name = "api_key") }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Pet.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @ApiResponse(responseCode = "404", description = "Pet not found") }) - public Response getPetById(@Parameter(description = "ID of pet to return",required=true) @PathParam("petId") Integer petId + public Response getPetById(@Parameter(description = "ID of pet to return",required=true) @PathParam("petId") Long petId ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getPetById(petId,securityContext); @@ -137,7 +147,9 @@ public Response getPetById(@Parameter(description = "ID of pet to return",requir @Consumes({ "application/json", "application/xml" }) - @Operation(summary = "Update an existing pet", description = "", tags={ "pet" }) + @Operation(summary = "Update an existing pet", description = "", security = { + @SecurityRequirement(name = "petstore_auth", scopes = { + "" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -154,10 +166,12 @@ public Response updatePet(@Parameter(description = "Pet object that needs to be @Path("/{petId}") @Consumes({ "application/x-www-form-urlencoded" }) - @Operation(summary = "Updates a pet in the store with form data", description = "", tags={ "pet" }) + @Operation(summary = "Updates a pet in the store with form data", description = "", security = { + @SecurityRequirement(name = "petstore_auth", scopes = { + "" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) - public Response updatePetWithForm(@Parameter(description = "ID of pet that needs to be updated",required=true) @PathParam("petId") Integer petId + public Response updatePetWithForm(@Parameter(description = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId ,@Parameter(description = "") @FormParam("name") String name ,@Parameter(description = "") @FormParam("status") String status ,@Context SecurityContext securityContext) @@ -168,11 +182,13 @@ public Response updatePetWithForm(@Parameter(description = "ID of pet that needs @Path("/{petId}/uploadImage") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - @Operation(summary = "uploads an image", description = "", tags={ "pet" }) + @Operation(summary = "uploads an image", description = "", security = { + @SecurityRequirement(name = "petstore_auth", scopes = { + "" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) - public Response uploadFile(@Parameter(description = "ID of pet to update",required=true) @PathParam("petId") Integer petId -,@Parameter(description = "")@FormDataParam("additionalMetadata") String additionalMetadata + public Response uploadFile(@Parameter(description = "ID of pet to update",required=true) @PathParam("petId") Long petId +,@Parameter(description = "") @FormParam("additionalMetadata") String additionalMetadata ,@FormDataParam("file") InputStream fileInputStream, @FormDataParam("file") FormDataContentDisposition fileDetail ,@Context SecurityContext securityContext) diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/PetApiService.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/PetApiService.java index 0bb9a6082f1..e8814d9852b 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/PetApiService.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/PetApiService.java @@ -20,11 +20,11 @@ import javax.validation.constraints.*; public abstract class PetApiService { public abstract Response addPet(Pet body,SecurityContext securityContext) throws NotFoundException; - public abstract Response deletePet(Integer petId,String apiKey,SecurityContext securityContext) throws NotFoundException; + public abstract Response deletePet(Long petId,String apiKey,SecurityContext securityContext) throws NotFoundException; public abstract Response findPetsByStatus( @NotNull List status,SecurityContext securityContext) throws NotFoundException; public abstract Response findPetsByTags( @NotNull List tags,SecurityContext securityContext) throws NotFoundException; - public abstract Response getPetById(Integer petId,SecurityContext securityContext) throws NotFoundException; + public abstract Response getPetById(Long petId,SecurityContext securityContext) throws NotFoundException; public abstract Response updatePet(Pet body,SecurityContext securityContext) throws NotFoundException; - public abstract Response updatePetWithForm(Integer petId,String name,String status,SecurityContext securityContext) throws NotFoundException; - public abstract Response uploadFile(Integer petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException; + public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) throws NotFoundException; + public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/StoreApi.java index 010bc4896f1..8f484a0efef 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/StoreApi.java @@ -32,6 +32,7 @@ import javax.ws.rs.*; import javax.validation.constraints.*; + @Path("/store") @@ -77,7 +78,8 @@ public Response deleteOrder(@Parameter(description = "ID of the order that needs @Path("/inventory") @Produces({ "application/json" }) - @Operation(summary = "Returns pet inventories by status", description = "Returns a map of status codes to quantities", tags={ "store" }) + @Operation(summary = "Returns pet inventories by status", description = "Returns a map of status codes to quantities", security = { + @SecurityRequirement(name = "api_key") }, tags={ "store" }) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) public Response getInventory(@Context SecurityContext securityContext) @@ -95,7 +97,8 @@ public Response getInventory(@Context SecurityContext securityContext) @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @ApiResponse(responseCode = "404", description = "Order not found") }) - public Response getOrderById(@Parameter(description = "ID of pet that needs to be fetched",required=true) @PathParam("order_id") Integer orderId + public Response getOrderById(@Parameter(description = "ID of pet that needs to be fetched",required=true, schema=@Schema(allowableValues={ }, minimum="1", maximum="5") +) @PathParam("order_id") Long orderId ,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getOrderById(orderId,securityContext); diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/StoreApiService.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/StoreApiService.java index 78f41961557..e7b00edc8e3 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/StoreApiService.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/StoreApiService.java @@ -20,6 +20,6 @@ public abstract class StoreApiService { public abstract Response deleteOrder(String orderId,SecurityContext securityContext) throws NotFoundException; public abstract Response getInventory(SecurityContext securityContext) throws NotFoundException; - public abstract Response getOrderById( @DecimalMin("1") @DecimalMax("5")Integer orderId,SecurityContext securityContext) throws NotFoundException; + public abstract Response getOrderById( @Min(1L) @Max(5L)Long orderId,SecurityContext securityContext) throws NotFoundException; public abstract Response placeOrder(Order body,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/UserApi.java index 1d8a7826c6c..576ede46728 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/UserApi.java @@ -31,6 +31,7 @@ import javax.ws.rs.*; import javax.validation.constraints.*; + @Path("/user") diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Animal.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Animal.java index 70648b25398..e210153eedb 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Animal.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.*; diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Cat.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Cat.java index 7de62df1c44..74d9cf3e60b 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Cat.java @@ -37,7 +37,7 @@ public Cat declawed(Boolean declawed) { **/ @JsonProperty("declawed") @Schema(description = "") - public Boolean isisDeclawed() { + public Boolean isDeclawed() { return declawed; } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/HasOnlyReadOnly.java index 60022f88a18..d326c6f0d47 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/HasOnlyReadOnly.java @@ -28,11 +28,6 @@ public class HasOnlyReadOnly { @JsonProperty("foo") private String foo = null; - public HasOnlyReadOnly bar(String bar) { - this.bar = bar; - return this; - } - /** * Get bar * @return bar @@ -43,15 +38,6 @@ public String getBar() { return bar; } - public void setBar(String bar) { - this.bar = bar; - } - - public HasOnlyReadOnly foo(String foo) { - this.foo = foo; - return this; - } - /** * Get foo * @return foo @@ -62,10 +48,6 @@ public String getFoo() { return foo; } - public void setFoo(String foo) { - this.foo = foo; - } - @Override public boolean equals(java.lang.Object o) { diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Name.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Name.java index 8845b589f42..9d4ebbfc926 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Name.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Name.java @@ -55,11 +55,6 @@ public void setName(Integer name) { this.name = name; } - public Name snakeCase(Integer snakeCase) { - this.snakeCase = snakeCase; - return this; - } - /** * Get snakeCase * @return snakeCase @@ -70,10 +65,6 @@ public Integer getSnakeCase() { return snakeCase; } - public void setSnakeCase(Integer snakeCase) { - this.snakeCase = snakeCase; - } - public Name property(String property) { this.property = property; return this; @@ -93,11 +84,6 @@ public void setProperty(String property) { this.property = property; } - public Name _123Number(Integer _123Number) { - this._123Number = _123Number; - return this; - } - /** * Get _123Number * @return _123Number @@ -108,10 +94,6 @@ public Integer get123Number() { return _123Number; } - public void set123Number(Integer _123Number) { - this._123Number = _123Number; - } - @Override public boolean equals(java.lang.Object o) { diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Order.java index 171c8b558a1..8de2c9a764a 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Order.java @@ -180,7 +180,7 @@ public Order complete(Boolean complete) { **/ @JsonProperty("complete") @Schema(description = "") - public Boolean isisComplete() { + public Boolean isComplete() { return complete; } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ReadOnlyFirst.java index c73c20c96ee..ba23f66d5cd 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ReadOnlyFirst.java @@ -28,11 +28,6 @@ public class ReadOnlyFirst { @JsonProperty("baz") private String baz = null; - public ReadOnlyFirst bar(String bar) { - this.bar = bar; - return this; - } - /** * Get bar * @return bar @@ -43,10 +38,6 @@ public String getBar() { return bar; } - public void setBar(String bar) { - this.bar = bar; - } - public ReadOnlyFirst baz(String baz) { this.baz = baz; return this; diff --git a/samples/server/petstore/jaxrs/jersey2/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java index 02109eb3f0f..64729b4c832 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java @@ -25,7 +25,7 @@ public Response addPet(Pet body, SecurityContext securityContext) throws NotFoun return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response deletePet(Integer petId, String apiKey, SecurityContext securityContext) throws NotFoundException { + public Response deletePet(Long petId, String apiKey, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @@ -40,7 +40,7 @@ public Response findPetsByTags( @NotNull List tags, SecurityContext secu return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response getPetById(Integer petId, SecurityContext securityContext) throws NotFoundException { + public Response getPetById(Long petId, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @@ -50,12 +50,12 @@ public Response updatePet(Pet body, SecurityContext securityContext) throws NotF return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response updatePetWithForm(Integer petId, String name, String status, SecurityContext securityContext) throws NotFoundException { + public Response updatePetWithForm(Long petId, String name, String status, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response uploadFile(Integer petId, String additionalMetadata, InputStream fileInputStream, FormDataContentDisposition fileDetail, SecurityContext securityContext) throws NotFoundException { + public Response uploadFile(Long petId, String additionalMetadata, InputStream fileInputStream, FormDataContentDisposition fileDetail, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } diff --git a/samples/server/petstore/jaxrs/jersey2/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java index 3be21edcdef..1515c628266 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java @@ -29,7 +29,7 @@ public Response getInventory(SecurityContext securityContext) throws NotFoundExc return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override - public Response getOrderById( @DecimalMin("1") @DecimalMax("5")Integer orderId, SecurityContext securityContext) throws NotFoundException { + public Response getOrderById( @Min(1L) @Max(5L)Long orderId, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/AdditionalPropertiesClass.java index 7a0480942dc..8336e873b62 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/AdditionalPropertiesClass.java @@ -43,8 +43,8 @@ public AdditionalPropertiesClass putMapPropertyItem(String key, String mapProper * @return mapProperty **/ @ApiModelProperty(value = "") - - public Map getMapProperty() { + + public Map getMapProperty() { return mapProperty; } @@ -70,8 +70,8 @@ public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map> getMapOfMapProperty() { + @Valid + public Map> getMapOfMapProperty() { return mapOfMapProperty; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Animal.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Animal.java index 9b87842a33a..ea1ae0b80fa 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Animal.java @@ -38,9 +38,9 @@ public Animal className(String className) { * @return className **/ @ApiModelProperty(required = true, value = "") - @NotNull + @NotNull - public String getClassName() { + public String getClassName() { return className; } @@ -58,8 +58,8 @@ public Animal color(String color) { * @return color **/ @ApiModelProperty(value = "") - - public String getColor() { + + public String getColor() { return color; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/AnimalFarm.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/AnimalFarm.java index be9c113dd57..9f8141102bd 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/AnimalFarm.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/AnimalFarm.java @@ -12,7 +12,6 @@ * AnimalFarm */ @Validated - public class AnimalFarm extends ArrayList { @Override @@ -51,4 +50,3 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index 32689ac4677..56bb24f8db0 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -39,8 +39,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * @return arrayArrayNumber **/ @ApiModelProperty(value = "") - @Valid - public List> getArrayArrayNumber() { + @Valid + public List> getArrayArrayNumber() { return arrayArrayNumber; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ArrayOfNumberOnly.java index bfa5a9f93cb..755a759279a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ArrayOfNumberOnly.java @@ -39,8 +39,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * @return arrayNumber **/ @ApiModelProperty(value = "") - @Valid - public List getArrayNumber() { + @Valid + public List getArrayNumber() { return arrayNumber; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ArrayTest.java index 6687d035d68..e6445115aa1 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ArrayTest.java @@ -47,8 +47,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * @return arrayOfString **/ @ApiModelProperty(value = "") - - public List getArrayOfString() { + + public List getArrayOfString() { return arrayOfString; } @@ -74,8 +74,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * @return arrayArrayOfInteger **/ @ApiModelProperty(value = "") - @Valid - public List> getArrayArrayOfInteger() { + @Valid + public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -101,8 +101,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * @return arrayArrayOfModel **/ @ApiModelProperty(value = "") - @Valid - public List> getArrayArrayOfModel() { + @Valid + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Capitalization.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Capitalization.java index aab595df944..d8543c6891b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Capitalization.java @@ -42,8 +42,8 @@ public Capitalization smallCamel(String smallCamel) { * @return smallCamel **/ @ApiModelProperty(value = "") - - public String getSmallCamel() { + + public String getSmallCamel() { return smallCamel; } @@ -61,8 +61,8 @@ public Capitalization capitalCamel(String capitalCamel) { * @return capitalCamel **/ @ApiModelProperty(value = "") - - public String getCapitalCamel() { + + public String getCapitalCamel() { return capitalCamel; } @@ -80,8 +80,8 @@ public Capitalization smallSnake(String smallSnake) { * @return smallSnake **/ @ApiModelProperty(value = "") - - public String getSmallSnake() { + + public String getSmallSnake() { return smallSnake; } @@ -99,8 +99,8 @@ public Capitalization capitalSnake(String capitalSnake) { * @return capitalSnake **/ @ApiModelProperty(value = "") - - public String getCapitalSnake() { + + public String getCapitalSnake() { return capitalSnake; } @@ -118,8 +118,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * @return scAETHFlowPoints **/ @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { + + public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -137,8 +137,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * @return ATT_NAME **/ @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { + + public String getATTNAME() { return ATT_NAME; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Cat.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Cat.java index b50613a803b..57a997fcc28 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Cat.java @@ -28,8 +28,8 @@ public Cat declawed(Boolean declawed) { * @return declawed **/ @ApiModelProperty(value = "") - - public Boolean isDeclawed() { + + public Boolean isDeclawed() { return declawed; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Category.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Category.java index 5532a04ae9f..18a490416dc 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Category.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Category.java @@ -30,8 +30,8 @@ public Category id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -49,8 +49,8 @@ public Category name(String name) { * @return name **/ @ApiModelProperty(value = "") - - public String getName() { + + public String getName() { return name; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ClassModel.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ClassModel.java index 9955637e6fa..0e9f017a133 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ClassModel.java @@ -28,8 +28,8 @@ public ClassModel propertyClass(String propertyClass) { * @return propertyClass **/ @ApiModelProperty(value = "") - - public String getPropertyClass() { + + public String getPropertyClass() { return propertyClass; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Client.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Client.java index b39c912e672..6b8db75349f 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Client.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Client.java @@ -27,8 +27,8 @@ public Client client(String client) { * @return client **/ @ApiModelProperty(value = "") - - public String getClient() { + + public String getClient() { return client; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Dog.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Dog.java index d059c6f2141..06d9e5598af 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Dog.java @@ -28,8 +28,8 @@ public Dog breed(String breed) { * @return breed **/ @ApiModelProperty(value = "") - - public String getBreed() { + + public String getBreed() { return breed; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/EnumArrays.java index b0204d3e4de..409315bbd24 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/EnumArrays.java @@ -94,8 +94,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * @return justSymbol **/ @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { + + public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -121,8 +121,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * @return arrayEnum **/ @ApiModelProperty(value = "") - - public List getArrayEnum() { + + public List getArrayEnum() { return arrayEnum; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/EnumTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/EnumTest.java index 8098382bb96..7019893a954 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/EnumTest.java @@ -130,8 +130,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * @return enumString **/ @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { + + public EnumStringEnum getEnumString() { return enumString; } @@ -149,8 +149,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * @return enumInteger **/ @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { + + public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -168,8 +168,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * @return enumNumber **/ @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { + + public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -187,9 +187,9 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * @return outerEnum **/ @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { + + @Valid + public OuterEnum getOuterEnum() { return outerEnum; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/FormatTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/FormatTest.java index 31baad91203..672de48de13 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/FormatTest.java @@ -69,8 +69,8 @@ public FormatTest integer(Integer integer) { * @return integer **/ @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { + + @Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -90,8 +90,8 @@ public FormatTest int32(Integer int32) { * @return int32 **/ @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { + + @Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -109,8 +109,8 @@ public FormatTest int64(Long int64) { * @return int64 **/ @ApiModelProperty(value = "") - - public Long getInt64() { + + public Long getInt64() { return int64; } @@ -130,10 +130,10 @@ public FormatTest number(BigDecimal number) { * @return number **/ @ApiModelProperty(required = true, value = "") - @NotNull + @NotNull - @Valid -@DecimalMin("32") @DecimalMax("543") public BigDecimal getNumber() { + @Valid + @DecimalMin("32") @DecimalMax("543") public BigDecimal getNumber() { return number; } @@ -153,8 +153,8 @@ public FormatTest _float(Float _float) { * @return _float **/ @ApiModelProperty(value = "") - -@DecimalMin("54") @DecimalMax("987") public Float getFloat() { + + @DecimalMin("54") @DecimalMax("987") public Float getFloat() { return _float; } @@ -174,8 +174,8 @@ public FormatTest _double(Double _double) { * @return _double **/ @ApiModelProperty(value = "") - -@DecimalMin("67") @DecimalMax("123") public Double getDouble() { + + @DecimalMin("67") @DecimalMax("123") public Double getDouble() { return _double; } @@ -193,8 +193,8 @@ public FormatTest string(String string) { * @return string **/ @ApiModelProperty(value = "") - -@Pattern(regexp="/[a-z]/i") public String getString() { + + @Pattern(regexp="/[a-z]/i") public String getString() { return string; } @@ -212,9 +212,9 @@ public FormatTest _byte(String _byte) { * @return _byte **/ @ApiModelProperty(required = true, value = "") - @NotNull + @NotNull -@Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$") public String getByte() { + @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$") public String getByte() { return _byte; } @@ -232,8 +232,8 @@ public FormatTest binary(String binary) { * @return binary **/ @ApiModelProperty(value = "") - - public String getBinary() { + + public String getBinary() { return binary; } @@ -251,10 +251,10 @@ public FormatTest date(LocalDate date) { * @return date **/ @ApiModelProperty(required = true, value = "") - @NotNull + @NotNull - @Valid - public LocalDate getDate() { + @Valid + public LocalDate getDate() { return date; } @@ -272,9 +272,9 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * @return dateTime **/ @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { + + @Valid + public OffsetDateTime getDateTime() { return dateTime; } @@ -292,9 +292,9 @@ public FormatTest uuid(UUID uuid) { * @return uuid **/ @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { + + @Valid + public UUID getUuid() { return uuid; } @@ -312,9 +312,9 @@ public FormatTest password(String password) { * @return password **/ @ApiModelProperty(required = true, value = "") - @NotNull + @NotNull - public String getPassword() { + public String getPassword() { return password; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/HasOnlyReadOnly.java index 5e136bd340e..63a73f191ff 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/HasOnlyReadOnly.java @@ -30,8 +30,8 @@ public HasOnlyReadOnly bar(String bar) { * @return bar **/ @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { + + public String getBar() { return bar; } @@ -49,8 +49,8 @@ public HasOnlyReadOnly foo(String foo) { * @return foo **/ @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { + + public String getFoo() { return foo; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/MapTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/MapTest.java index e5a695ce75a..8cfef67fa04 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/MapTest.java @@ -74,8 +74,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * @return mapMapOfString **/ @ApiModelProperty(value = "") - @Valid - public Map> getMapMapOfString() { + @Valid + public Map> getMapMapOfString() { return mapMapOfString; } @@ -101,8 +101,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * @return mapOfEnumString **/ @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { + + public Map getMapOfEnumString() { return mapOfEnumString; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index 94576804f73..165e31b3744 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -40,9 +40,9 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * @return uuid **/ @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { + + @Valid + public UUID getUuid() { return uuid; } @@ -60,9 +60,9 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * @return dateTime **/ @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { + + @Valid + public OffsetDateTime getDateTime() { return dateTime; } @@ -88,8 +88,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * @return map **/ @ApiModelProperty(value = "") - @Valid - public Map getMap() { + @Valid + public Map getMap() { return map; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Model200Response.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Model200Response.java index 5def53ca42b..1fa0f8ca246 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Model200Response.java @@ -31,8 +31,8 @@ public Model200Response name(Integer name) { * @return name **/ @ApiModelProperty(value = "") - - public Integer getName() { + + public Integer getName() { return name; } @@ -50,8 +50,8 @@ public Model200Response propertyClass(String propertyClass) { * @return propertyClass **/ @ApiModelProperty(value = "") - - public String getPropertyClass() { + + public String getPropertyClass() { return propertyClass; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ModelApiResponse.java index 13c1fe4f385..3695d387200 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ModelApiResponse.java @@ -33,8 +33,8 @@ public ModelApiResponse code(Integer code) { * @return code **/ @ApiModelProperty(value = "") - - public Integer getCode() { + + public Integer getCode() { return code; } @@ -52,8 +52,8 @@ public ModelApiResponse type(String type) { * @return type **/ @ApiModelProperty(value = "") - - public String getType() { + + public String getType() { return type; } @@ -71,8 +71,8 @@ public ModelApiResponse message(String message) { * @return message **/ @ApiModelProperty(value = "") - - public String getMessage() { + + public String getMessage() { return message; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ModelReturn.java index a2f5abacefc..ece6ea53921 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ModelReturn.java @@ -28,8 +28,8 @@ public ModelReturn _return(Integer _return) { * @return _return **/ @ApiModelProperty(value = "") - - public Integer getReturn() { + + public Integer getReturn() { return _return; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Name.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Name.java index 019d45720c6..42dac519b12 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Name.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Name.java @@ -37,9 +37,9 @@ public Name name(Integer name) { * @return name **/ @ApiModelProperty(required = true, value = "") - @NotNull + @NotNull - public Integer getName() { + public Integer getName() { return name; } @@ -57,8 +57,8 @@ public Name snakeCase(Integer snakeCase) { * @return snakeCase **/ @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { + + public Integer getSnakeCase() { return snakeCase; } @@ -76,8 +76,8 @@ public Name property(String property) { * @return property **/ @ApiModelProperty(value = "") - - public String getProperty() { + + public String getProperty() { return property; } @@ -95,8 +95,8 @@ public Name _123Number(Integer _123Number) { * @return _123Number **/ @ApiModelProperty(readOnly = true, value = "") - - public Integer get123Number() { + + public Integer get123Number() { return _123Number; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/NumberOnly.java index 7c2a5a84bcd..d5de387f649 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/NumberOnly.java @@ -28,9 +28,9 @@ public NumberOnly justNumber(BigDecimal justNumber) { * @return justNumber **/ @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { + + @Valid + public BigDecimal getJustNumber() { return justNumber; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Order.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Order.java index 1d911c148b2..8dbbee6f873 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Order.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Order.java @@ -76,8 +76,8 @@ public Order id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -95,8 +95,8 @@ public Order petId(Long petId) { * @return petId **/ @ApiModelProperty(value = "") - - public Long getPetId() { + + public Long getPetId() { return petId; } @@ -114,8 +114,8 @@ public Order quantity(Integer quantity) { * @return quantity **/ @ApiModelProperty(value = "") - - public Integer getQuantity() { + + public Integer getQuantity() { return quantity; } @@ -133,9 +133,9 @@ public Order shipDate(OffsetDateTime shipDate) { * @return shipDate **/ @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { + + @Valid + public OffsetDateTime getShipDate() { return shipDate; } @@ -153,8 +153,8 @@ public Order status(StatusEnum status) { * @return status **/ @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { + + public StatusEnum getStatus() { return status; } @@ -172,8 +172,8 @@ public Order complete(Boolean complete) { * @return complete **/ @ApiModelProperty(value = "") - - public Boolean isComplete() { + + public Boolean isComplete() { return complete; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/OuterComposite.java index b2ce112f432..b9b7e2aa58f 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/OuterComposite.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/OuterComposite.java @@ -34,9 +34,9 @@ public OuterComposite myNumber(BigDecimal myNumber) { * @return myNumber **/ @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { + + @Valid + public BigDecimal getMyNumber() { return myNumber; } @@ -54,8 +54,8 @@ public OuterComposite myString(String myString) { * @return myString **/ @ApiModelProperty(value = "") - - public String getMyString() { + + public String getMyString() { return myString; } @@ -73,8 +73,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { + + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Pet.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Pet.java index 95e269be8df..444c5c74ef3 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Pet.java @@ -81,8 +81,8 @@ public Pet id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -100,9 +100,9 @@ public Pet category(Category category) { * @return category **/ @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { + + @Valid + public Category getCategory() { return category; } @@ -120,9 +120,9 @@ public Pet name(String name) { * @return name **/ @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull + @NotNull - public String getName() { + public String getName() { return name; } @@ -145,9 +145,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * @return photoUrls **/ @ApiModelProperty(required = true, value = "") - @NotNull + @NotNull - public List getPhotoUrls() { + public List getPhotoUrls() { return photoUrls; } @@ -173,8 +173,8 @@ public Pet addTagsItem(Tag tagsItem) { * @return tags **/ @ApiModelProperty(value = "") - @Valid - public List getTags() { + @Valid + public List getTags() { return tags; } @@ -192,8 +192,8 @@ public Pet status(StatusEnum status) { * @return status **/ @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { + + public StatusEnum getStatus() { return status; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ReadOnlyFirst.java index 99d1b0efa76..923cdb6cca7 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/ReadOnlyFirst.java @@ -30,8 +30,8 @@ public ReadOnlyFirst bar(String bar) { * @return bar **/ @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { + + public String getBar() { return bar; } @@ -49,8 +49,8 @@ public ReadOnlyFirst baz(String baz) { * @return baz **/ @ApiModelProperty(value = "") - - public String getBaz() { + + public String getBaz() { return baz; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/SpecialModelName.java index 927f8a25cd3..f789d6849f0 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/SpecialModelName.java @@ -27,8 +27,8 @@ public class SpecialModelName { * @return $specialPropertyName **/ @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { + + public Long get$SpecialPropertyName() { return $specialPropertyName; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Tag.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Tag.java index 73a7d36cf4d..f34b3b4c8f2 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/Tag.java @@ -13,7 +13,6 @@ * Tag */ @Validated - public class Tag { @JsonProperty("id") private Long id = null; @@ -31,9 +30,8 @@ public Tag id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - - public Long getId() { + + public Long getId() { return id; } @@ -51,9 +49,8 @@ public Tag name(String name) { * @return name **/ @ApiModelProperty(value = "") - - - public String getName() { + + public String getName() { return name; } @@ -102,4 +99,3 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/User.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/User.java index c61076ac939..9e896f4fcfa 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/User.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/model/User.java @@ -48,8 +48,8 @@ public User id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -67,8 +67,8 @@ public User username(String username) { * @return username **/ @ApiModelProperty(value = "") - - public String getUsername() { + + public String getUsername() { return username; } @@ -86,8 +86,8 @@ public User firstName(String firstName) { * @return firstName **/ @ApiModelProperty(value = "") - - public String getFirstName() { + + public String getFirstName() { return firstName; } @@ -105,8 +105,8 @@ public User lastName(String lastName) { * @return lastName **/ @ApiModelProperty(value = "") - - public String getLastName() { + + public String getLastName() { return lastName; } @@ -124,8 +124,8 @@ public User email(String email) { * @return email **/ @ApiModelProperty(value = "") - - public String getEmail() { + + public String getEmail() { return email; } @@ -143,8 +143,8 @@ public User password(String password) { * @return password **/ @ApiModelProperty(value = "") - - public String getPassword() { + + public String getPassword() { return password; } @@ -162,8 +162,8 @@ public User phone(String phone) { * @return phone **/ @ApiModelProperty(value = "") - - public String getPhone() { + + public String getPhone() { return phone; } @@ -181,8 +181,8 @@ public User userStatus(Integer userStatus) { * @return userStatus **/ @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { + + public Integer getUserStatus() { return userStatus; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/AdditionalPropertiesClass.java index be1333dcbe2..72f51fe463f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/AdditionalPropertiesClass.java @@ -43,8 +43,8 @@ public AdditionalPropertiesClass putMapPropertyItem(String key, String mapProper * @return mapProperty **/ @ApiModelProperty(value = "") - - public Map getMapProperty() { + + public Map getMapProperty() { return mapProperty; } @@ -70,8 +70,8 @@ public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map> getMapOfMapProperty() { + @Valid + public Map> getMapOfMapProperty() { return mapOfMapProperty; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Animal.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Animal.java index 9b87842a33a..ea1ae0b80fa 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Animal.java @@ -38,9 +38,9 @@ public Animal className(String className) { * @return className **/ @ApiModelProperty(required = true, value = "") - @NotNull + @NotNull - public String getClassName() { + public String getClassName() { return className; } @@ -58,8 +58,8 @@ public Animal color(String color) { * @return color **/ @ApiModelProperty(value = "") - - public String getColor() { + + public String getColor() { return color; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index 46db820b9a8..c26231eac92 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -39,8 +39,8 @@ public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayAr * @return arrayArrayNumber **/ @ApiModelProperty(value = "") - @Valid - public List> getArrayArrayNumber() { + @Valid + public List> getArrayArrayNumber() { return arrayArrayNumber; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ArrayOfNumberOnly.java index 0a7d44e0bfb..388dff8e4c5 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ArrayOfNumberOnly.java @@ -39,8 +39,8 @@ public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { * @return arrayNumber **/ @ApiModelProperty(value = "") - @Valid - public List getArrayNumber() { + @Valid + public List getArrayNumber() { return arrayNumber; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ArrayTest.java index e7596046079..26950cc6a74 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ArrayTest.java @@ -47,8 +47,8 @@ public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { * @return arrayOfString **/ @ApiModelProperty(value = "") - - public List getArrayOfString() { + + public List getArrayOfString() { return arrayOfString; } @@ -74,8 +74,8 @@ public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) * @return arrayArrayOfInteger **/ @ApiModelProperty(value = "") - @Valid - public List> getArrayArrayOfInteger() { + @Valid + public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -101,8 +101,8 @@ public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelI * @return arrayArrayOfModel **/ @ApiModelProperty(value = "") - @Valid - public List> getArrayArrayOfModel() { + @Valid + public List> getArrayArrayOfModel() { return arrayArrayOfModel; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Capitalization.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Capitalization.java index aab595df944..d8543c6891b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Capitalization.java @@ -42,8 +42,8 @@ public Capitalization smallCamel(String smallCamel) { * @return smallCamel **/ @ApiModelProperty(value = "") - - public String getSmallCamel() { + + public String getSmallCamel() { return smallCamel; } @@ -61,8 +61,8 @@ public Capitalization capitalCamel(String capitalCamel) { * @return capitalCamel **/ @ApiModelProperty(value = "") - - public String getCapitalCamel() { + + public String getCapitalCamel() { return capitalCamel; } @@ -80,8 +80,8 @@ public Capitalization smallSnake(String smallSnake) { * @return smallSnake **/ @ApiModelProperty(value = "") - - public String getSmallSnake() { + + public String getSmallSnake() { return smallSnake; } @@ -99,8 +99,8 @@ public Capitalization capitalSnake(String capitalSnake) { * @return capitalSnake **/ @ApiModelProperty(value = "") - - public String getCapitalSnake() { + + public String getCapitalSnake() { return capitalSnake; } @@ -118,8 +118,8 @@ public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { * @return scAETHFlowPoints **/ @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { + + public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -137,8 +137,8 @@ public Capitalization ATT_NAME(String ATT_NAME) { * @return ATT_NAME **/ @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { + + public String getATTNAME() { return ATT_NAME; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Cat.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Cat.java index b50613a803b..57a997fcc28 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Cat.java @@ -28,8 +28,8 @@ public Cat declawed(Boolean declawed) { * @return declawed **/ @ApiModelProperty(value = "") - - public Boolean isDeclawed() { + + public Boolean isDeclawed() { return declawed; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Category.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Category.java index 5532a04ae9f..18a490416dc 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Category.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Category.java @@ -30,8 +30,8 @@ public Category id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -49,8 +49,8 @@ public Category name(String name) { * @return name **/ @ApiModelProperty(value = "") - - public String getName() { + + public String getName() { return name; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ClassModel.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ClassModel.java index 9955637e6fa..0e9f017a133 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ClassModel.java @@ -28,8 +28,8 @@ public ClassModel propertyClass(String propertyClass) { * @return propertyClass **/ @ApiModelProperty(value = "") - - public String getPropertyClass() { + + public String getPropertyClass() { return propertyClass; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Client.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Client.java index 82e3f9f1116..6b8db75349f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Client.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Client.java @@ -13,7 +13,6 @@ * Client */ @Validated - public class Client { @JsonProperty("client") private String client = null; @@ -28,9 +27,8 @@ public Client client(String client) { * @return client **/ @ApiModelProperty(value = "") - - - public String getClient() { + + public String getClient() { return client; } @@ -77,4 +75,3 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Dog.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Dog.java index d059c6f2141..06d9e5598af 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Dog.java @@ -28,8 +28,8 @@ public Dog breed(String breed) { * @return breed **/ @ApiModelProperty(value = "") - - public String getBreed() { + + public String getBreed() { return breed; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/EnumArrays.java index de497236673..97e0c408dad 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/EnumArrays.java @@ -94,8 +94,8 @@ public EnumArrays justSymbol(JustSymbolEnum justSymbol) { * @return justSymbol **/ @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { + + public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -121,8 +121,8 @@ public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { * @return arrayEnum **/ @ApiModelProperty(value = "") - - public List getArrayEnum() { + + public List getArrayEnum() { return arrayEnum; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/EnumTest.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/EnumTest.java index 8098382bb96..7019893a954 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/EnumTest.java @@ -130,8 +130,8 @@ public EnumTest enumString(EnumStringEnum enumString) { * @return enumString **/ @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { + + public EnumStringEnum getEnumString() { return enumString; } @@ -149,8 +149,8 @@ public EnumTest enumInteger(EnumIntegerEnum enumInteger) { * @return enumInteger **/ @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { + + public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -168,8 +168,8 @@ public EnumTest enumNumber(EnumNumberEnum enumNumber) { * @return enumNumber **/ @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { + + public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -187,9 +187,9 @@ public EnumTest outerEnum(OuterEnum outerEnum) { * @return outerEnum **/ @ApiModelProperty(value = "") - - @Valid - public OuterEnum getOuterEnum() { + + @Valid + public OuterEnum getOuterEnum() { return outerEnum; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/FormatTest.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/FormatTest.java index 22ce82c19c4..ec2c6b8db62 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/FormatTest.java @@ -69,8 +69,8 @@ public FormatTest integer(Integer integer) { * @return integer **/ @ApiModelProperty(value = "") - -@Min(10) @Max(100) public Integer getInteger() { + + @Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -90,8 +90,8 @@ public FormatTest int32(Integer int32) { * @return int32 **/ @ApiModelProperty(value = "") - -@Min(20) @Max(200) public Integer getInt32() { + + @Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -109,8 +109,8 @@ public FormatTest int64(Long int64) { * @return int64 **/ @ApiModelProperty(value = "") - - public Long getInt64() { + + public Long getInt64() { return int64; } @@ -130,10 +130,10 @@ public FormatTest number(BigDecimal number) { * @return number **/ @ApiModelProperty(required = true, value = "") - @NotNull + @NotNull - @Valid -@DecimalMin("32") @DecimalMax("543") public BigDecimal getNumber() { + @Valid + @DecimalMin("32") @DecimalMax("543") public BigDecimal getNumber() { return number; } @@ -153,8 +153,8 @@ public FormatTest _float(Float _float) { * @return _float **/ @ApiModelProperty(value = "") - -@DecimalMin("54") @DecimalMax("987") public Float getFloat() { + + @DecimalMin("54") @DecimalMax("987") public Float getFloat() { return _float; } @@ -174,8 +174,8 @@ public FormatTest _double(Double _double) { * @return _double **/ @ApiModelProperty(value = "") - -@DecimalMin("67") @DecimalMax("123") public Double getDouble() { + + @DecimalMin("67") @DecimalMax("123") public Double getDouble() { return _double; } @@ -193,8 +193,8 @@ public FormatTest string(String string) { * @return string **/ @ApiModelProperty(value = "") - -@Pattern(regexp="/[a-z]/i") public String getString() { + + @Pattern(regexp="/[a-z]/i") public String getString() { return string; } @@ -212,9 +212,9 @@ public FormatTest _byte(String _byte) { * @return _byte **/ @ApiModelProperty(required = true, value = "") - @NotNull + @NotNull -@Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$") public String getByte() { + @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$") public String getByte() { return _byte; } @@ -232,8 +232,8 @@ public FormatTest binary(String binary) { * @return binary **/ @ApiModelProperty(value = "") - - public String getBinary() { + + public String getBinary() { return binary; } @@ -251,10 +251,10 @@ public FormatTest date(LocalDate date) { * @return date **/ @ApiModelProperty(required = true, value = "") - @NotNull + @NotNull - @Valid - public LocalDate getDate() { + @Valid + public LocalDate getDate() { return date; } @@ -272,9 +272,9 @@ public FormatTest dateTime(OffsetDateTime dateTime) { * @return dateTime **/ @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { + + @Valid + public OffsetDateTime getDateTime() { return dateTime; } @@ -292,9 +292,9 @@ public FormatTest uuid(UUID uuid) { * @return uuid **/ @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { + + @Valid + public UUID getUuid() { return uuid; } @@ -312,9 +312,9 @@ public FormatTest password(String password) { * @return password **/ @ApiModelProperty(required = true, value = "") - @NotNull + @NotNull - public String getPassword() { + public String getPassword() { return password; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/HasOnlyReadOnly.java index 5e136bd340e..63a73f191ff 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/HasOnlyReadOnly.java @@ -30,8 +30,8 @@ public HasOnlyReadOnly bar(String bar) { * @return bar **/ @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { + + public String getBar() { return bar; } @@ -49,8 +49,8 @@ public HasOnlyReadOnly foo(String foo) { * @return foo **/ @ApiModelProperty(readOnly = true, value = "") - - public String getFoo() { + + public String getFoo() { return foo; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/MapTest.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/MapTest.java index dd42f96d372..7dbb0c78ad9 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/MapTest.java @@ -74,8 +74,8 @@ public MapTest putMapMapOfStringItem(String key, Map mapMapOfStr * @return mapMapOfString **/ @ApiModelProperty(value = "") - @Valid - public Map> getMapMapOfString() { + @Valid + public Map> getMapMapOfString() { return mapMapOfString; } @@ -101,8 +101,8 @@ public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) * @return mapOfEnumString **/ @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { + + public Map getMapOfEnumString() { return mapOfEnumString; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index bd25b85e5ca..d374bab89cc 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -40,9 +40,9 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { * @return uuid **/ @ApiModelProperty(value = "") - - @Valid - public UUID getUuid() { + + @Valid + public UUID getUuid() { return uuid; } @@ -60,9 +60,9 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateT * @return dateTime **/ @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getDateTime() { + + @Valid + public OffsetDateTime getDateTime() { return dateTime; } @@ -88,8 +88,8 @@ public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal * @return map **/ @ApiModelProperty(value = "") - @Valid - public Map getMap() { + @Valid + public Map getMap() { return map; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Model200Response.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Model200Response.java index 5def53ca42b..1fa0f8ca246 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Model200Response.java @@ -31,8 +31,8 @@ public Model200Response name(Integer name) { * @return name **/ @ApiModelProperty(value = "") - - public Integer getName() { + + public Integer getName() { return name; } @@ -50,8 +50,8 @@ public Model200Response propertyClass(String propertyClass) { * @return propertyClass **/ @ApiModelProperty(value = "") - - public String getPropertyClass() { + + public String getPropertyClass() { return propertyClass; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ModelApiResponse.java index 13c1fe4f385..3695d387200 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ModelApiResponse.java @@ -33,8 +33,8 @@ public ModelApiResponse code(Integer code) { * @return code **/ @ApiModelProperty(value = "") - - public Integer getCode() { + + public Integer getCode() { return code; } @@ -52,8 +52,8 @@ public ModelApiResponse type(String type) { * @return type **/ @ApiModelProperty(value = "") - - public String getType() { + + public String getType() { return type; } @@ -71,8 +71,8 @@ public ModelApiResponse message(String message) { * @return message **/ @ApiModelProperty(value = "") - - public String getMessage() { + + public String getMessage() { return message; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ModelReturn.java index a2f5abacefc..ece6ea53921 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ModelReturn.java @@ -28,8 +28,8 @@ public ModelReturn _return(Integer _return) { * @return _return **/ @ApiModelProperty(value = "") - - public Integer getReturn() { + + public Integer getReturn() { return _return; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Name.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Name.java index 019d45720c6..42dac519b12 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Name.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Name.java @@ -37,9 +37,9 @@ public Name name(Integer name) { * @return name **/ @ApiModelProperty(required = true, value = "") - @NotNull + @NotNull - public Integer getName() { + public Integer getName() { return name; } @@ -57,8 +57,8 @@ public Name snakeCase(Integer snakeCase) { * @return snakeCase **/ @ApiModelProperty(readOnly = true, value = "") - - public Integer getSnakeCase() { + + public Integer getSnakeCase() { return snakeCase; } @@ -76,8 +76,8 @@ public Name property(String property) { * @return property **/ @ApiModelProperty(value = "") - - public String getProperty() { + + public String getProperty() { return property; } @@ -95,8 +95,8 @@ public Name _123Number(Integer _123Number) { * @return _123Number **/ @ApiModelProperty(readOnly = true, value = "") - - public Integer get123Number() { + + public Integer get123Number() { return _123Number; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/NumberOnly.java index 7c2a5a84bcd..d5de387f649 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/NumberOnly.java @@ -28,9 +28,9 @@ public NumberOnly justNumber(BigDecimal justNumber) { * @return justNumber **/ @ApiModelProperty(value = "") - - @Valid - public BigDecimal getJustNumber() { + + @Valid + public BigDecimal getJustNumber() { return justNumber; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Order.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Order.java index 6481fd4be04..2158b0759c5 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Order.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Order.java @@ -76,8 +76,8 @@ public Order id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -95,8 +95,8 @@ public Order petId(Long petId) { * @return petId **/ @ApiModelProperty(value = "") - - public Long getPetId() { + + public Long getPetId() { return petId; } @@ -114,8 +114,8 @@ public Order quantity(Integer quantity) { * @return quantity **/ @ApiModelProperty(value = "") - - public Integer getQuantity() { + + public Integer getQuantity() { return quantity; } @@ -133,9 +133,9 @@ public Order shipDate(OffsetDateTime shipDate) { * @return shipDate **/ @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { + + @Valid + public OffsetDateTime getShipDate() { return shipDate; } @@ -153,8 +153,8 @@ public Order status(StatusEnum status) { * @return status **/ @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { + + public StatusEnum getStatus() { return status; } @@ -172,8 +172,8 @@ public Order complete(Boolean complete) { * @return complete **/ @ApiModelProperty(value = "") - - public Boolean isComplete() { + + public Boolean isComplete() { return complete; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/OuterComposite.java index b2ce112f432..b9b7e2aa58f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/OuterComposite.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/OuterComposite.java @@ -34,9 +34,9 @@ public OuterComposite myNumber(BigDecimal myNumber) { * @return myNumber **/ @ApiModelProperty(value = "") - - @Valid - public BigDecimal getMyNumber() { + + @Valid + public BigDecimal getMyNumber() { return myNumber; } @@ -54,8 +54,8 @@ public OuterComposite myString(String myString) { * @return myString **/ @ApiModelProperty(value = "") - - public String getMyString() { + + public String getMyString() { return myString; } @@ -73,8 +73,8 @@ public OuterComposite myBoolean(Boolean myBoolean) { * @return myBoolean **/ @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { + + public Boolean getMyBoolean() { return myBoolean; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Pet.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Pet.java index 70358e0e6a6..4f464def950 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Pet.java @@ -81,8 +81,8 @@ public Pet id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -100,9 +100,9 @@ public Pet category(Category category) { * @return category **/ @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { + + @Valid + public Category getCategory() { return category; } @@ -120,9 +120,9 @@ public Pet name(String name) { * @return name **/ @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull + @NotNull - public String getName() { + public String getName() { return name; } @@ -145,9 +145,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * @return photoUrls **/ @ApiModelProperty(required = true, value = "") - @NotNull + @NotNull - public List getPhotoUrls() { + public List getPhotoUrls() { return photoUrls; } @@ -173,8 +173,8 @@ public Pet addTagsItem(Tag tagsItem) { * @return tags **/ @ApiModelProperty(value = "") - @Valid - public List getTags() { + @Valid + public List getTags() { return tags; } @@ -192,8 +192,8 @@ public Pet status(StatusEnum status) { * @return status **/ @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { + + public StatusEnum getStatus() { return status; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ReadOnlyFirst.java index 99d1b0efa76..923cdb6cca7 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/ReadOnlyFirst.java @@ -30,8 +30,8 @@ public ReadOnlyFirst bar(String bar) { * @return bar **/ @ApiModelProperty(readOnly = true, value = "") - - public String getBar() { + + public String getBar() { return bar; } @@ -49,8 +49,8 @@ public ReadOnlyFirst baz(String baz) { * @return baz **/ @ApiModelProperty(value = "") - - public String getBaz() { + + public String getBaz() { return baz; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/SpecialModelName.java index 927f8a25cd3..f789d6849f0 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/SpecialModelName.java @@ -27,8 +27,8 @@ public class SpecialModelName { * @return $specialPropertyName **/ @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { + + public Long get$SpecialPropertyName() { return $specialPropertyName; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Tag.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Tag.java index 73a7d36cf4d..f34b3b4c8f2 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/Tag.java @@ -13,7 +13,6 @@ * Tag */ @Validated - public class Tag { @JsonProperty("id") private Long id = null; @@ -31,9 +30,8 @@ public Tag id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - - public Long getId() { + + public Long getId() { return id; } @@ -51,9 +49,8 @@ public Tag name(String name) { * @return name **/ @ApiModelProperty(value = "") - - - public String getName() { + + public String getName() { return name; } @@ -102,4 +99,3 @@ private String toIndentedString(java.lang.Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/User.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/User.java index c61076ac939..9e896f4fcfa 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/User.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/model/User.java @@ -48,8 +48,8 @@ public User id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -67,8 +67,8 @@ public User username(String username) { * @return username **/ @ApiModelProperty(value = "") - - public String getUsername() { + + public String getUsername() { return username; } @@ -86,8 +86,8 @@ public User firstName(String firstName) { * @return firstName **/ @ApiModelProperty(value = "") - - public String getFirstName() { + + public String getFirstName() { return firstName; } @@ -105,8 +105,8 @@ public User lastName(String lastName) { * @return lastName **/ @ApiModelProperty(value = "") - - public String getLastName() { + + public String getLastName() { return lastName; } @@ -124,8 +124,8 @@ public User email(String email) { * @return email **/ @ApiModelProperty(value = "") - - public String getEmail() { + + public String getEmail() { return email; } @@ -143,8 +143,8 @@ public User password(String password) { * @return password **/ @ApiModelProperty(value = "") - - public String getPassword() { + + public String getPassword() { return password; } @@ -162,8 +162,8 @@ public User phone(String phone) { * @return phone **/ @ApiModelProperty(value = "") - - public String getPhone() { + + public String getPhone() { return phone; } @@ -181,8 +181,8 @@ public User userStatus(Integer userStatus) { * @return userStatus **/ @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { + + public Integer getUserStatus() { return userStatus; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/PetApi.java index 66112ffb5b9..8d96755ac58 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/PetApi.java @@ -28,8 +28,10 @@ public interface PetApi { @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "", description = "") }) }, tags={ "pet", }) + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 405, message = "Invalid input") }) @ApiImplicitParams({ @@ -41,8 +43,10 @@ public interface PetApi { @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "", description = "") }) }, tags={ "pet", }) + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid pet value") }) @ApiImplicitParams({ @@ -53,8 +57,10 @@ public interface PetApi { @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "", description = "") }) }, tags={ "pet", }) + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 400, message = "Invalid status value") }) @@ -67,8 +73,10 @@ public interface PetApi { @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "", description = "") }) }, tags={ "pet", }) + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 400, message = "Invalid tag value") }) @@ -95,8 +103,10 @@ public interface PetApi { @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "", description = "") }) }, tags={ "pet", }) + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied"), @ApiResponse(code = 404, message = "Pet not found"), @@ -110,8 +120,10 @@ public interface PetApi { @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "", description = "") }) }, tags={ "pet", }) + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 405, message = "Invalid input") }) @ApiImplicitParams({ @@ -123,8 +135,10 @@ public interface PetApi { @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "", description = "") }) }, tags={ "pet", }) + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @ApiImplicitParams({ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/StoreApi.java index 894df14f6bb..aa0b2ef62c0 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/StoreApi.java @@ -70,7 +70,7 @@ public interface StoreApi { }) @RequestMapping(value = "/store/order", produces = { "application/xml", "application/json" }, - consumes = { "*/*" }, + consumes = { "application/json" }, method = RequestMethod.POST) ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody Order body); diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/UserApi.java index 13b940c1fa3..d5ad32d36a3 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/UserApi.java @@ -31,7 +31,7 @@ public interface UserApi { @ApiImplicitParams({ }) @RequestMapping(value = "/user", - consumes = { "*/*" }, + consumes = { "application/json" }, method = RequestMethod.POST) ResponseEntity createUser(@ApiParam(value = "Created user object" ,required=true ) @Valid @RequestBody User body); @@ -42,7 +42,7 @@ public interface UserApi { @ApiImplicitParams({ }) @RequestMapping(value = "/user/createWithArray", - consumes = { "*/*" }, + consumes = { "application/json" }, method = RequestMethod.POST) ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody List body); @@ -53,7 +53,7 @@ public interface UserApi { @ApiImplicitParams({ }) @RequestMapping(value = "/user/createWithList", - consumes = { "*/*" }, + consumes = { "application/json" }, method = RequestMethod.POST) ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody List body); diff --git a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/Category.java b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/Category.java index 517db24e7da..bca2d21fead 100644 --- a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/Category.java +++ b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/Category.java @@ -31,8 +31,8 @@ public Category id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -50,8 +50,8 @@ public Category name(String name) { * @return name **/ @ApiModelProperty(value = "") - - public String getName() { + + public String getName() { return name; } diff --git a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/ModelApiResponse.java index 931ef0b2449..bcb1016ab7a 100644 --- a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/ModelApiResponse.java @@ -34,8 +34,8 @@ public ModelApiResponse code(Integer code) { * @return code **/ @ApiModelProperty(value = "") - - public Integer getCode() { + + public Integer getCode() { return code; } @@ -53,8 +53,8 @@ public ModelApiResponse type(String type) { * @return type **/ @ApiModelProperty(value = "") - - public String getType() { + + public String getType() { return type; } @@ -72,8 +72,8 @@ public ModelApiResponse message(String message) { * @return message **/ @ApiModelProperty(value = "") - - public String getMessage() { + + public String getMessage() { return message; } diff --git a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/Order.java b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/Order.java index c050ffa65b3..477ca91e8d7 100644 --- a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/Order.java +++ b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/Order.java @@ -77,8 +77,8 @@ public Order id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -96,8 +96,8 @@ public Order petId(Long petId) { * @return petId **/ @ApiModelProperty(value = "") - - public Long getPetId() { + + public Long getPetId() { return petId; } @@ -115,8 +115,8 @@ public Order quantity(Integer quantity) { * @return quantity **/ @ApiModelProperty(value = "") - - public Integer getQuantity() { + + public Integer getQuantity() { return quantity; } @@ -134,9 +134,9 @@ public Order shipDate(OffsetDateTime shipDate) { * @return shipDate **/ @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { + + @Valid + public OffsetDateTime getShipDate() { return shipDate; } @@ -154,8 +154,8 @@ public Order status(StatusEnum status) { * @return status **/ @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { + + public StatusEnum getStatus() { return status; } @@ -173,8 +173,8 @@ public Order complete(Boolean complete) { * @return complete **/ @ApiModelProperty(value = "") - - public Boolean isComplete() { + + public Boolean isComplete() { return complete; } diff --git a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/Pet.java b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/Pet.java index 4b31fa850c4..da7b750c31c 100644 --- a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/Pet.java @@ -82,8 +82,8 @@ public Pet id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -101,9 +101,9 @@ public Pet category(Category category) { * @return category **/ @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { + + @Valid + public Category getCategory() { return category; } @@ -121,9 +121,9 @@ public Pet name(String name) { * @return name **/ @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull + @NotNull - public String getName() { + public String getName() { return name; } @@ -146,9 +146,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * @return photoUrls **/ @ApiModelProperty(required = true, value = "") - @NotNull + @NotNull - public List getPhotoUrls() { + public List getPhotoUrls() { return photoUrls; } @@ -174,8 +174,8 @@ public Pet addTagsItem(Tag tagsItem) { * @return tags **/ @ApiModelProperty(value = "") - @Valid - public List getTags() { + @Valid + public List getTags() { return tags; } @@ -193,8 +193,8 @@ public Pet status(StatusEnum status) { * @return status **/ @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { + + public StatusEnum getStatus() { return status; } diff --git a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/Tag.java b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/Tag.java index 100cd2fd225..30481908ec6 100644 --- a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/Tag.java @@ -31,8 +31,8 @@ public Tag id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -50,8 +50,8 @@ public Tag name(String name) { * @return name **/ @ApiModelProperty(value = "") - - public String getName() { + + public String getName() { return name; } diff --git a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/User.java b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/User.java index 74ae59c77ab..f2658f87f74 100644 --- a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/User.java +++ b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/model/User.java @@ -49,8 +49,8 @@ public User id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -68,8 +68,8 @@ public User username(String username) { * @return username **/ @ApiModelProperty(value = "") - - public String getUsername() { + + public String getUsername() { return username; } @@ -87,8 +87,8 @@ public User firstName(String firstName) { * @return firstName **/ @ApiModelProperty(value = "") - - public String getFirstName() { + + public String getFirstName() { return firstName; } @@ -106,8 +106,8 @@ public User lastName(String lastName) { * @return lastName **/ @ApiModelProperty(value = "") - - public String getLastName() { + + public String getLastName() { return lastName; } @@ -125,8 +125,8 @@ public User email(String email) { * @return email **/ @ApiModelProperty(value = "") - - public String getEmail() { + + public String getEmail() { return email; } @@ -144,8 +144,8 @@ public User password(String password) { * @return password **/ @ApiModelProperty(value = "") - - public String getPassword() { + + public String getPassword() { return password; } @@ -163,8 +163,8 @@ public User phone(String phone) { * @return phone **/ @ApiModelProperty(value = "") - - public String getPhone() { + + public String getPhone() { return phone; } @@ -182,8 +182,8 @@ public User userStatus(Integer userStatus) { * @return userStatus **/ @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { + + public Integer getUserStatus() { return userStatus; } diff --git a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/Category.java b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/Category.java index 517db24e7da..bca2d21fead 100644 --- a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/Category.java +++ b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/Category.java @@ -31,8 +31,8 @@ public Category id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -50,8 +50,8 @@ public Category name(String name) { * @return name **/ @ApiModelProperty(value = "") - - public String getName() { + + public String getName() { return name; } diff --git a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/ModelApiResponse.java index 931ef0b2449..bcb1016ab7a 100644 --- a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/ModelApiResponse.java @@ -34,8 +34,8 @@ public ModelApiResponse code(Integer code) { * @return code **/ @ApiModelProperty(value = "") - - public Integer getCode() { + + public Integer getCode() { return code; } @@ -53,8 +53,8 @@ public ModelApiResponse type(String type) { * @return type **/ @ApiModelProperty(value = "") - - public String getType() { + + public String getType() { return type; } @@ -72,8 +72,8 @@ public ModelApiResponse message(String message) { * @return message **/ @ApiModelProperty(value = "") - - public String getMessage() { + + public String getMessage() { return message; } diff --git a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/Order.java b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/Order.java index c050ffa65b3..477ca91e8d7 100644 --- a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/Order.java +++ b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/Order.java @@ -77,8 +77,8 @@ public Order id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -96,8 +96,8 @@ public Order petId(Long petId) { * @return petId **/ @ApiModelProperty(value = "") - - public Long getPetId() { + + public Long getPetId() { return petId; } @@ -115,8 +115,8 @@ public Order quantity(Integer quantity) { * @return quantity **/ @ApiModelProperty(value = "") - - public Integer getQuantity() { + + public Integer getQuantity() { return quantity; } @@ -134,9 +134,9 @@ public Order shipDate(OffsetDateTime shipDate) { * @return shipDate **/ @ApiModelProperty(value = "") - - @Valid - public OffsetDateTime getShipDate() { + + @Valid + public OffsetDateTime getShipDate() { return shipDate; } @@ -154,8 +154,8 @@ public Order status(StatusEnum status) { * @return status **/ @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { + + public StatusEnum getStatus() { return status; } @@ -173,8 +173,8 @@ public Order complete(Boolean complete) { * @return complete **/ @ApiModelProperty(value = "") - - public Boolean isComplete() { + + public Boolean isComplete() { return complete; } diff --git a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/Pet.java b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/Pet.java index 4b31fa850c4..da7b750c31c 100644 --- a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/Pet.java @@ -82,8 +82,8 @@ public Pet id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -101,9 +101,9 @@ public Pet category(Category category) { * @return category **/ @ApiModelProperty(value = "") - - @Valid - public Category getCategory() { + + @Valid + public Category getCategory() { return category; } @@ -121,9 +121,9 @@ public Pet name(String name) { * @return name **/ @ApiModelProperty(example = "doggie", required = true, value = "") - @NotNull + @NotNull - public String getName() { + public String getName() { return name; } @@ -146,9 +146,9 @@ public Pet addPhotoUrlsItem(String photoUrlsItem) { * @return photoUrls **/ @ApiModelProperty(required = true, value = "") - @NotNull + @NotNull - public List getPhotoUrls() { + public List getPhotoUrls() { return photoUrls; } @@ -174,8 +174,8 @@ public Pet addTagsItem(Tag tagsItem) { * @return tags **/ @ApiModelProperty(value = "") - @Valid - public List getTags() { + @Valid + public List getTags() { return tags; } @@ -193,8 +193,8 @@ public Pet status(StatusEnum status) { * @return status **/ @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { + + public StatusEnum getStatus() { return status; } diff --git a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/Tag.java b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/Tag.java index 100cd2fd225..30481908ec6 100644 --- a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/Tag.java @@ -31,8 +31,8 @@ public Tag id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -50,8 +50,8 @@ public Tag name(String name) { * @return name **/ @ApiModelProperty(value = "") - - public String getName() { + + public String getName() { return name; } diff --git a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/User.java b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/User.java index 74ae59c77ab..f2658f87f74 100644 --- a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/User.java +++ b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/model/User.java @@ -49,8 +49,8 @@ public User id(Long id) { * @return id **/ @ApiModelProperty(value = "") - - public Long getId() { + + public Long getId() { return id; } @@ -68,8 +68,8 @@ public User username(String username) { * @return username **/ @ApiModelProperty(value = "") - - public String getUsername() { + + public String getUsername() { return username; } @@ -87,8 +87,8 @@ public User firstName(String firstName) { * @return firstName **/ @ApiModelProperty(value = "") - - public String getFirstName() { + + public String getFirstName() { return firstName; } @@ -106,8 +106,8 @@ public User lastName(String lastName) { * @return lastName **/ @ApiModelProperty(value = "") - - public String getLastName() { + + public String getLastName() { return lastName; } @@ -125,8 +125,8 @@ public User email(String email) { * @return email **/ @ApiModelProperty(value = "") - - public String getEmail() { + + public String getEmail() { return email; } @@ -144,8 +144,8 @@ public User password(String password) { * @return password **/ @ApiModelProperty(value = "") - - public String getPassword() { + + public String getPassword() { return password; } @@ -163,8 +163,8 @@ public User phone(String phone) { * @return phone **/ @ApiModelProperty(value = "") - - public String getPhone() { + + public String getPhone() { return phone; } @@ -182,8 +182,8 @@ public User userStatus(Integer userStatus) { * @return userStatus **/ @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { + + public Integer getUserStatus() { return userStatus; } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/io/swagger/api/PetApi.java index eba66d975a1..27deb813861 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/api/PetApi.java @@ -28,8 +28,10 @@ public interface PetApi { @ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "", description = "") }) }, tags={ "pet", }) + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping(value = "/pet", @@ -39,8 +41,10 @@ public interface PetApi { @ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "", description = "") }) }, tags={ "pet", }) + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid pet value") }) @RequestMapping(value = "/pet/{petId}", @@ -49,8 +53,10 @@ public interface PetApi { @ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "", description = "") }) }, tags={ "pet", }) + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 400, message = "Invalid status value") }) @@ -61,8 +67,10 @@ public interface PetApi { @ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "", description = "") }) }, tags={ "pet", }) + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 400, message = "Invalid tag value") }) @@ -85,8 +93,10 @@ public interface PetApi { @ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "", description = "") }) }, tags={ "pet", }) + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied"), @ApiResponse(code = 404, message = "Pet not found"), @@ -98,8 +108,10 @@ public interface PetApi { @ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "", description = "") }) }, tags={ "pet", }) + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 405, message = "Invalid input") }) @RequestMapping(value = "/pet/{petId}", @@ -109,8 +121,10 @@ public interface PetApi { @ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "", description = "") }) }, tags={ "pet", }) + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) }, tags={ "pet", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @RequestMapping(value = "/pet/{petId}/uploadImage", diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/springboot/src/main/java/io/swagger/api/StoreApi.java index c1004385290..dd755b20893 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/api/StoreApi.java @@ -62,7 +62,7 @@ public interface StoreApi { @ApiResponse(code = 400, message = "Invalid Order") }) @RequestMapping(value = "/store/order", produces = { "application/xml", "application/json" }, - consumes = { "*/*" }, + consumes = { "application/json" }, method = RequestMethod.POST) ResponseEntity placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody Order body); diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/io/swagger/api/UserApi.java index 2efd9693808..6c2185d9d50 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/api/UserApi.java @@ -29,7 +29,7 @@ public interface UserApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping(value = "/user", - consumes = { "*/*" }, + consumes = { "application/json" }, method = RequestMethod.POST) ResponseEntity createUser(@ApiParam(value = "Created user object" ,required=true ) @Valid @RequestBody User body); @@ -38,7 +38,7 @@ public interface UserApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping(value = "/user/createWithArray", - consumes = { "*/*" }, + consumes = { "application/json" }, method = RequestMethod.POST) ResponseEntity createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody List body); @@ -47,7 +47,7 @@ public interface UserApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation") }) @RequestMapping(value = "/user/createWithList", - consumes = { "*/*" }, + consumes = { "application/json" }, method = RequestMethod.POST) ResponseEntity createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody List body);